From 995a35fb3d42c42666e3a48d77271389fd99c8f3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 07:14:07 +0000 Subject: [PATCH 01/10] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 219e38751e2..73bded4b9ee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1915 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc732ca8d1d7f1c11a1ee579060ddfd8f953a3ad94fd5053056b53370129d040.yml openapi_spec_hash: a3e1e833dfe13845abd1e2227993a979 -config_hash: 6b8d4cb6cfb2bdcc28988fb6e9769676 +config_hash: 9e3a3f3e68822e0dc6f40af202c6c57e From fbe4969d2d8b61c2e8c635543297a04e14435391 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 11:42:28 +0000 Subject: [PATCH 02/10] feat: feat(silences): add a new alert silencing api --- .stats.yml | 4 +- alerting/alerting.go | 2 + alerting/silence.go | 574 ++++++++++++++++++++++++++++++++ alerting/silence_test.go | 158 +++++++++ api.md | 18 + scripts/detect-breaking-changes | 1 + 6 files changed, 755 insertions(+), 2 deletions(-) create mode 100644 alerting/silence.go create mode 100644 alerting/silence_test.go diff --git a/.stats.yml b/.stats.yml index 73bded4b9ee..ca528942873 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1915 +configured_endpoints: 1920 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc732ca8d1d7f1c11a1ee579060ddfd8f953a3ad94fd5053056b53370129d040.yml openapi_spec_hash: a3e1e833dfe13845abd1e2227993a979 -config_hash: 9e3a3f3e68822e0dc6f40af202c6c57e +config_hash: 9adcf483820db7d64c827c03d68d005f diff --git a/alerting/alerting.go b/alerting/alerting.go index ea0473a00e5..7465dbe241e 100644 --- a/alerting/alerting.go +++ b/alerting/alerting.go @@ -18,6 +18,7 @@ type AlertingService struct { Destinations *DestinationService History *HistoryService Policies *PolicyService + Silences *SilenceService } // NewAlertingService generates a new service that applies the given options to @@ -30,5 +31,6 @@ func NewAlertingService(opts ...option.RequestOption) (r *AlertingService) { r.Destinations = NewDestinationService(opts...) r.History = NewHistoryService(opts...) r.Policies = NewPolicyService(opts...) + r.Silences = NewSilenceService(opts...) return } diff --git a/alerting/silence.go b/alerting/silence.go new file mode 100644 index 00000000000..3650ddd5bd2 --- /dev/null +++ b/alerting/silence.go @@ -0,0 +1,574 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package alerting + +import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" +) + +// SilenceService contains methods and other services that help with interacting +// with the cloudflare API. +// +// Note, unlike clients, this service does not read variables from the environment +// automatically. You should not instantiate this service directly, and instead use +// the [NewSilenceService] method instead. +type SilenceService struct { + Options []option.RequestOption +} + +// NewSilenceService generates a new service that applies the given options to each +// request. These options are applied after the parent client's options (if there +// is one), and before any request-specific options. +func NewSilenceService(opts ...option.RequestOption) (r *SilenceService) { + r = &SilenceService{} + r.Options = opts + return +} + +// Creates a new silence for an account. +func (r *SilenceService) New(ctx context.Context, params SilenceNewParams, opts ...option.RequestOption) (res *SilenceNewResponse, err error) { + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/alerting/v3/silences", params.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &res, opts...) + return +} + +// Updates existing silences for an account. +func (r *SilenceService) Update(ctx context.Context, params SilenceUpdateParams, opts ...option.RequestOption) (res *pagination.SinglePage[SilenceUpdateResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/alerting/v3/silences", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPut, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Updates existing silences for an account. +func (r *SilenceService) UpdateAutoPaging(ctx context.Context, params SilenceUpdateParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[SilenceUpdateResponse] { + return pagination.NewSinglePageAutoPager(r.Update(ctx, params, opts...)) +} + +// Gets a list of silences for an account. +func (r *SilenceService) List(ctx context.Context, query SilenceListParams, opts ...option.RequestOption) (res *pagination.SinglePage[SilenceListResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/alerting/v3/silences", query.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Gets a list of silences for an account. +func (r *SilenceService) ListAutoPaging(ctx context.Context, query SilenceListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[SilenceListResponse] { + return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...)) +} + +// Deletes an existing silence for an account. +func (r *SilenceService) Delete(ctx context.Context, silenceID string, body SilenceDeleteParams, opts ...option.RequestOption) (res *SilenceDeleteResponse, err error) { + opts = slices.Concat(r.Options, opts) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if silenceID == "" { + err = errors.New("missing required silence_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/alerting/v3/silences/%s", body.AccountID, silenceID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &res, opts...) + return +} + +// Gets a specific silence for an account. +func (r *SilenceService) Get(ctx context.Context, silenceID string, query SilenceGetParams, opts ...option.RequestOption) (res *SilenceGetResponse, err error) { + var env SilenceGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if silenceID == "" { + err = errors.New("missing required silence_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/alerting/v3/silences/%s", query.AccountID, silenceID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type SilenceNewResponse struct { + Errors []SilenceNewResponseError `json:"errors,required"` + Messages []SilenceNewResponseMessage `json:"messages,required"` + // Whether the API call was successful + Success SilenceNewResponseSuccess `json:"success,required"` + JSON silenceNewResponseJSON `json:"-"` +} + +// silenceNewResponseJSON contains the JSON metadata for the struct +// [SilenceNewResponse] +type silenceNewResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceNewResponseJSON) RawJSON() string { + return r.raw +} + +type SilenceNewResponseError struct { + Message string `json:"message,required"` + Code int64 `json:"code"` + JSON silenceNewResponseErrorJSON `json:"-"` +} + +// silenceNewResponseErrorJSON contains the JSON metadata for the struct +// [SilenceNewResponseError] +type silenceNewResponseErrorJSON struct { + Message apijson.Field + Code apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceNewResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceNewResponseErrorJSON) RawJSON() string { + return r.raw +} + +type SilenceNewResponseMessage struct { + Message string `json:"message,required"` + Code int64 `json:"code"` + JSON silenceNewResponseMessageJSON `json:"-"` +} + +// silenceNewResponseMessageJSON contains the JSON metadata for the struct +// [SilenceNewResponseMessage] +type silenceNewResponseMessageJSON struct { + Message apijson.Field + Code apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceNewResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceNewResponseMessageJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type SilenceNewResponseSuccess bool + +const ( + SilenceNewResponseSuccessTrue SilenceNewResponseSuccess = true +) + +func (r SilenceNewResponseSuccess) IsKnown() bool { + switch r { + case SilenceNewResponseSuccessTrue: + return true + } + return false +} + +type SilenceUpdateResponse struct { + // Silence ID + ID string `json:"id"` + // When the silence was created. + CreatedAt string `json:"created_at"` + // When the silence ends. + EndTime string `json:"end_time"` + // The unique identifier of a notification policy + PolicyID string `json:"policy_id"` + // When the silence starts. + StartTime string `json:"start_time"` + // When the silence was modified. + UpdatedAt string `json:"updated_at"` + JSON silenceUpdateResponseJSON `json:"-"` +} + +// silenceUpdateResponseJSON contains the JSON metadata for the struct +// [SilenceUpdateResponse] +type silenceUpdateResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + EndTime apijson.Field + PolicyID apijson.Field + StartTime apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceUpdateResponseJSON) RawJSON() string { + return r.raw +} + +type SilenceListResponse struct { + // Silence ID + ID string `json:"id"` + // When the silence was created. + CreatedAt string `json:"created_at"` + // When the silence ends. + EndTime string `json:"end_time"` + // The unique identifier of a notification policy + PolicyID string `json:"policy_id"` + // When the silence starts. + StartTime string `json:"start_time"` + // When the silence was modified. + UpdatedAt string `json:"updated_at"` + JSON silenceListResponseJSON `json:"-"` +} + +// silenceListResponseJSON contains the JSON metadata for the struct +// [SilenceListResponse] +type silenceListResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + EndTime apijson.Field + PolicyID apijson.Field + StartTime apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceListResponseJSON) RawJSON() string { + return r.raw +} + +type SilenceDeleteResponse struct { + Errors []SilenceDeleteResponseError `json:"errors,required"` + Messages []SilenceDeleteResponseMessage `json:"messages,required"` + // Whether the API call was successful + Success SilenceDeleteResponseSuccess `json:"success,required"` + JSON silenceDeleteResponseJSON `json:"-"` +} + +// silenceDeleteResponseJSON contains the JSON metadata for the struct +// [SilenceDeleteResponse] +type silenceDeleteResponseJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type SilenceDeleteResponseError struct { + Message string `json:"message,required"` + Code int64 `json:"code"` + JSON silenceDeleteResponseErrorJSON `json:"-"` +} + +// silenceDeleteResponseErrorJSON contains the JSON metadata for the struct +// [SilenceDeleteResponseError] +type silenceDeleteResponseErrorJSON struct { + Message apijson.Field + Code apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceDeleteResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceDeleteResponseErrorJSON) RawJSON() string { + return r.raw +} + +type SilenceDeleteResponseMessage struct { + Message string `json:"message,required"` + Code int64 `json:"code"` + JSON silenceDeleteResponseMessageJSON `json:"-"` +} + +// silenceDeleteResponseMessageJSON contains the JSON metadata for the struct +// [SilenceDeleteResponseMessage] +type silenceDeleteResponseMessageJSON struct { + Message apijson.Field + Code apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceDeleteResponseMessage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceDeleteResponseMessageJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type SilenceDeleteResponseSuccess bool + +const ( + SilenceDeleteResponseSuccessTrue SilenceDeleteResponseSuccess = true +) + +func (r SilenceDeleteResponseSuccess) IsKnown() bool { + switch r { + case SilenceDeleteResponseSuccessTrue: + return true + } + return false +} + +type SilenceGetResponse struct { + // Silence ID + ID string `json:"id"` + // When the silence was created. + CreatedAt string `json:"created_at"` + // When the silence ends. + EndTime string `json:"end_time"` + // The unique identifier of a notification policy + PolicyID string `json:"policy_id"` + // When the silence starts. + StartTime string `json:"start_time"` + // When the silence was modified. + UpdatedAt string `json:"updated_at"` + JSON silenceGetResponseJSON `json:"-"` +} + +// silenceGetResponseJSON contains the JSON metadata for the struct +// [SilenceGetResponse] +type silenceGetResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + EndTime apijson.Field + PolicyID apijson.Field + StartTime apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceGetResponseJSON) RawJSON() string { + return r.raw +} + +type SilenceNewParams struct { + // The account id + AccountID param.Field[string] `path:"account_id,required"` + Body []SilenceNewParamsBody `json:"body,required"` +} + +func (r SilenceNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.Body) +} + +type SilenceNewParamsBody struct { + // When the silence ends. + EndTime param.Field[string] `json:"end_time"` + // The unique identifier of a notification policy + PolicyID param.Field[string] `json:"policy_id"` + // When the silence starts. + StartTime param.Field[string] `json:"start_time"` +} + +func (r SilenceNewParamsBody) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SilenceUpdateParams struct { + // The account id + AccountID param.Field[string] `path:"account_id,required"` + Body []SilenceUpdateParamsBody `json:"body,required"` +} + +func (r SilenceUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.Body) +} + +type SilenceUpdateParamsBody struct { + // Silence ID + ID param.Field[string] `json:"id"` + // When the silence ends. + EndTime param.Field[string] `json:"end_time"` + // When the silence starts. + StartTime param.Field[string] `json:"start_time"` +} + +func (r SilenceUpdateParamsBody) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SilenceListParams struct { + // The account id + AccountID param.Field[string] `path:"account_id,required"` +} + +type SilenceDeleteParams struct { + // The account id + AccountID param.Field[string] `path:"account_id,required"` +} + +type SilenceGetParams struct { + // The account id + AccountID param.Field[string] `path:"account_id,required"` +} + +type SilenceGetResponseEnvelope struct { + Errors []SilenceGetResponseEnvelopeErrors `json:"errors,required"` + Messages []SilenceGetResponseEnvelopeMessages `json:"messages,required"` + // Whether the API call was successful + Success SilenceGetResponseEnvelopeSuccess `json:"success,required"` + Result SilenceGetResponse `json:"result"` + JSON silenceGetResponseEnvelopeJSON `json:"-"` +} + +// silenceGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [SilenceGetResponseEnvelope] +type silenceGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SilenceGetResponseEnvelopeErrors struct { + Message string `json:"message,required"` + Code int64 `json:"code"` + JSON silenceGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// silenceGetResponseEnvelopeErrorsJSON contains the JSON metadata for the struct +// [SilenceGetResponseEnvelopeErrors] +type silenceGetResponseEnvelopeErrorsJSON struct { + Message apijson.Field + Code apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type SilenceGetResponseEnvelopeMessages struct { + Message string `json:"message,required"` + Code int64 `json:"code"` + JSON silenceGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// silenceGetResponseEnvelopeMessagesJSON contains the JSON metadata for the struct +// [SilenceGetResponseEnvelopeMessages] +type silenceGetResponseEnvelopeMessagesJSON struct { + Message apijson.Field + Code apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SilenceGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r silenceGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful +type SilenceGetResponseEnvelopeSuccess bool + +const ( + SilenceGetResponseEnvelopeSuccessTrue SilenceGetResponseEnvelopeSuccess = true +) + +func (r SilenceGetResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case SilenceGetResponseEnvelopeSuccessTrue: + return true + } + return false +} diff --git a/alerting/silence_test.go b/alerting/silence_test.go new file mode 100644 index 00000000000..834da337474 --- /dev/null +++ b/alerting/silence_test.go @@ -0,0 +1,158 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package alerting_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/alerting" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestSilenceNew(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Alerting.Silences.New(context.TODO(), alerting.SilenceNewParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Body: []alerting.SilenceNewParamsBody{{ + EndTime: cloudflare.F("2022-01-01T00:00:00Z"), + PolicyID: cloudflare.F("0da2b59ef118439d8097bdfb215203c9"), + StartTime: cloudflare.F("2022-01-01T00:00:00Z"), + }}, + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSilenceUpdate(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Alerting.Silences.Update(context.TODO(), alerting.SilenceUpdateParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Body: []alerting.SilenceUpdateParamsBody{{ + ID: cloudflare.F("f878e90c23f44126ae3cfc399f646977"), + EndTime: cloudflare.F("2022-01-01T00:00:00Z"), + StartTime: cloudflare.F("2022-01-01T00:00:00Z"), + }}, + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSilenceList(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Alerting.Silences.List(context.TODO(), alerting.SilenceListParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSilenceDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Alerting.Silences.Delete( + context.TODO(), + "f878e90c23f44126ae3cfc399f646977", + alerting.SilenceDeleteParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSilenceGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Alerting.Silences.Get( + context.TODO(), + "f878e90c23f44126ae3cfc399f646977", + alerting.SilenceGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/api.md b/api.md index e202d68c530..8e7870f25d3 100644 --- a/api.md +++ b/api.md @@ -4679,6 +4679,24 @@ Methods: - client.Alerting.Policies.Delete(ctx context.Context, policyID string, body alerting.PolicyDeleteParams) (alerting.PolicyDeleteResponse, error) - client.Alerting.Policies.Get(ctx context.Context, policyID string, query alerting.PolicyGetParams) (alerting.Policy, error) +## Silences + +Response Types: + +- alerting.SilenceNewResponse +- alerting.SilenceUpdateResponse +- alerting.SilenceListResponse +- alerting.SilenceDeleteResponse +- alerting.SilenceGetResponse + +Methods: + +- client.Alerting.Silences.New(ctx context.Context, params alerting.SilenceNewParams) (alerting.SilenceNewResponse, error) +- client.Alerting.Silences.Update(ctx context.Context, params alerting.SilenceUpdateParams) (pagination.SinglePage[alerting.SilenceUpdateResponse], error) +- client.Alerting.Silences.List(ctx context.Context, query alerting.SilenceListParams) (pagination.SinglePage[alerting.SilenceListResponse], error) +- client.Alerting.Silences.Delete(ctx context.Context, silenceID string, body alerting.SilenceDeleteParams) (alerting.SilenceDeleteResponse, error) +- client.Alerting.Silences.Get(ctx context.Context, silenceID string, query alerting.SilenceGetParams) (alerting.SilenceGetResponse, error) + # D1 Response Types: diff --git a/scripts/detect-breaking-changes b/scripts/detect-breaking-changes index a920fb77828..03175062b53 100755 --- a/scripts/detect-breaking-changes +++ b/scripts/detect-breaking-changes @@ -320,6 +320,7 @@ TEST_PATHS=( alerting/destinationwebhook_test.go alerting/history_test.go alerting/policy_test.go + alerting/silence_test.go d1/database_test.go r2/bucket_test.go r2/bucketlifecycle_test.go From eeba3ecc248d718e4501a6c57293e75e716a9931 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 18:23:26 +0000 Subject: [PATCH 03/10] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ca528942873..995525f09e8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1920 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc732ca8d1d7f1c11a1ee579060ddfd8f953a3ad94fd5053056b53370129d040.yml openapi_spec_hash: a3e1e833dfe13845abd1e2227993a979 -config_hash: 9adcf483820db7d64c827c03d68d005f +config_hash: 5db158a1c8842e25189f18302ac68d5b From 79e30c72cf690ed8d0bd0ad33748537570d177e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 19:03:03 +0000 Subject: [PATCH 04/10] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 995525f09e8..3ae69e57ea2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1920 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc732ca8d1d7f1c11a1ee579060ddfd8f953a3ad94fd5053056b53370129d040.yml openapi_spec_hash: a3e1e833dfe13845abd1e2227993a979 -config_hash: 5db158a1c8842e25189f18302ac68d5b +config_hash: e4fdda880afe9a26b032ec5128e42dc2 From 86f0a73093fe70cec9766b585281f396ec500c76 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 19:10:50 +0000 Subject: [PATCH 05/10] chore(api): update composite API spec --- .stats.yml | 6 +- abuse_reports/abusereport.go | 82 +- accounts/logaudit.go | 29 +- accounts/logaudit_test.go | 6 +- api.md | 232 +- browser_rendering/content.go | 4 +- browser_rendering/content_test.go | 6 +- browser_rendering/json_test.go | 6 +- browser_rendering/link_test.go | 6 +- browser_rendering/markdown_test.go | 6 +- browser_rendering/pdf_test.go | 6 +- browser_rendering/scrape_test.go | 6 +- browser_rendering/screenshot_test.go | 6 +- browser_rendering/snapshot.go | 25 + browser_rendering/snapshot_test.go | 6 +- cloudforce_one/threatevent.go | 56 +- cloudforce_one/threatevent_test.go | 34 +- email_security/investigate.go | 848 -- email_security/investigate_test.go | 87 - email_security/investigatedetection.go | 357 - email_security/investigatedetection_test.go | 44 - email_security/investigatemove.go | 192 - email_security/investigatemove_test.go | 72 - email_security/investigatepreview.go | 163 - email_security/investigatepreview_test.go | 70 - email_security/investigateraw.go | 85 - email_security/investigateraw_test.go | 44 - email_security/investigatereclassify.go | 92 - email_security/investigatereclassify_test.go | 47 - email_security/investigaterelease.go | 76 - email_security/investigaterelease_test.go | 41 - email_security/investigatetrace.go | 183 - email_security/investigatetrace_test.go | 44 - email_security/settingallowpolicy.go | 718 - email_security/settingallowpolicy_test.go | 185 - email_security/settingblocksender.go | 590 - email_security/settingblocksender_test.go | 167 - email_security/settingdomain.go | 1154 -- email_security/settingdomain_test.go | 171 - .../settingimpersonationregistry.go | 517 - .../settingimpersonationregistry_test.go | 164 - email_security/settingtrusteddomain.go | 615 - email_security/settingtrusteddomain_test.go | 173 - email_security/submission.go | 250 - email_security/submission_test.go | 52 - iam/permissiongroup.go | 148 +- pages/project.go | 12298 ++++++++++++++-- pages/project_test.go | 660 +- pages/projectdeployment.go | 3116 +++- pages/projectdeployment_test.go | 2 - pages/projectdeploymenthistorylog.go | 126 +- pages/projectdomain.go | 595 +- pages/projectdomain_test.go | 5 +- radar/aibot.go | 207 +- radar/aibotsummary.go | 69 +- radar/aiinference.go | 138 +- radar/aiinferencesummary.go | 138 +- radar/aiinferencetimeseriesgroupsummary.go | 138 +- radar/aitimeseriesgroup.go | 276 +- radar/annotation.go | 92 + radar/annotation_test.go | 19 +- radar/annotationoutage.go | 29 + radar/annotationoutage_test.go | 1 + radar/as112.go | 207 +- radar/as112summary.go | 414 +- radar/as112timeseriesgroup.go | 414 +- radar/as112top.go | 276 +- radar/attacklayer3.go | 207 +- radar/attacklayer3summary.go | 483 +- radar/attacklayer3timeseriesgroup.go | 483 +- radar/attacklayer3top.go | 207 +- radar/attacklayer3toplocation.go | 138 +- radar/attacklayer7.go | 207 +- radar/attacklayer7summary.go | 483 +- radar/attacklayer7timeseriesgroup.go | 483 +- radar/attacklayer7top.go | 207 +- radar/attacklayer7topase.go | 69 +- radar/attacklayer7toplocation.go | 138 +- radar/bgp.go | 69 +- radar/bgpip.go | 69 +- radar/bot.go | 207 +- radar/botwebcrawler.go | 138 +- radar/ct.go | 207 +- radar/dns.go | 207 +- radar/dnssummary.go | 690 +- radar/dnstimeseriesgroup.go | 690 +- radar/dnstop.go | 138 +- radar/emailrouting.go | 138 +- radar/emailroutingsummary.go | 414 +- radar/emailroutingtimeseriesgroup.go | 414 +- radar/emailsecurity.go | 138 +- radar/emailsecuritysummary.go | 621 +- radar/emailsecuritytimeseriesgroup.go | 621 +- radar/emailsecuritytoptld.go | 69 +- radar/emailsecuritytoptldmalicious.go | 69 +- radar/emailsecuritytoptldspam.go | 69 +- radar/emailsecuritytoptldspoof.go | 69 +- radar/http.go | 207 +- radar/httpase.go | 69 +- radar/httpasebotclass.go | 69 +- radar/httpasebrowserfamily.go | 69 +- radar/httpasedevicetype.go | 69 +- radar/httpasehttpmethod.go | 69 +- radar/httpasehttpprotocol.go | 69 +- radar/httpaseipversion.go | 69 +- radar/httpaseos.go | 69 +- radar/httpasetlsversion.go | 69 +- radar/httplocation.go | 69 +- radar/httplocationbotclass.go | 69 +- radar/httplocationbrowserfamily.go | 69 +- radar/httplocationdevicetype.go | 69 +- radar/httplocationhttpmethod.go | 69 +- radar/httplocationhttpprotocol.go | 69 +- radar/httplocationipversion.go | 69 +- radar/httplocationos.go | 69 +- radar/httplocationtlsversion.go | 69 +- radar/httpsummary.go | 552 +- radar/httptimeseriesgroup.go | 690 +- radar/httptop.go | 138 +- radar/leakedcredential.go | 138 +- radar/leakedcredentialsummary.go | 138 +- radar/leakedcredentialtimeseriesgroup.go | 138 +- radar/netflow.go | 276 +- radar/netflowtop.go | 138 +- radar/qualityiqi.go | 138 +- radar/qualityspeed.go | 138 +- radar/qualityspeedtop.go | 138 +- radar/ranking.go | 138 +- radar/rankinginternetservice.go | 138 +- radar/robotstxttop.go | 69 +- radar/robotstxttopuseragent.go | 69 +- radar/search.go | 8 +- radar/tcpresetstimeout.go | 138 +- radar/trafficanomaly.go | 47 +- radar/trafficanomaly_test.go | 2 + radar/verifiedbottop.go | 138 +- rules/listitem.go | 2 + rules/listitem_test.go | 4 +- scripts/detect-breaking-changes | 14 - ssl/certificatepack.go | 884 +- workers/domain.go | 6 +- workers/domain_test.go | 4 +- workers/observabilitytelemetry.go | 254 +- workers/observabilitytelemetry_test.go | 8 +- workers/scriptversion.go | 197 +- zero_trust/deviceposture.go | 60 +- zero_trust/devicesetting.go | 32 + zero_trust/devicesetting_test.go | 8 + zero_trust/dlpdataset.go | 348 +- zero_trust/dlpdatasetupload.go | 230 +- zero_trust/dlpemailrule.go | 16 +- zero_trust/dlpentry.go | 1029 +- zero_trust/dlpentrycustom.go | 692 +- zero_trust/dlpentryintegration.go | 710 +- zero_trust/dlpentrypredefined.go | 708 +- zero_trust/dlpprofile.go | 1917 ++- zero_trust/dlpprofilecustom.go | 5802 +++++++- zero_trust/dlpprofilepredefined.go | 989 +- 158 files changed, 41417 insertions(+), 12548 deletions(-) delete mode 100644 email_security/investigate_test.go delete mode 100644 email_security/investigatedetection_test.go delete mode 100644 email_security/investigatemove_test.go delete mode 100644 email_security/investigatepreview_test.go delete mode 100644 email_security/investigateraw_test.go delete mode 100644 email_security/investigatereclassify_test.go delete mode 100644 email_security/investigaterelease_test.go delete mode 100644 email_security/investigatetrace_test.go delete mode 100644 email_security/settingallowpolicy_test.go delete mode 100644 email_security/settingblocksender_test.go delete mode 100644 email_security/settingdomain_test.go delete mode 100644 email_security/settingimpersonationregistry_test.go delete mode 100644 email_security/settingtrusteddomain_test.go delete mode 100644 email_security/submission_test.go diff --git a/.stats.yml b/.stats.yml index 3ae69e57ea2..a16977bbb0f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1920 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cc732ca8d1d7f1c11a1ee579060ddfd8f953a3ad94fd5053056b53370129d040.yml -openapi_spec_hash: a3e1e833dfe13845abd1e2227993a979 +configured_endpoints: 1883 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e425e4abe3f3161feed50a8cd861dd25c6ec32ee162b4eb4d225c4e5cb7b3ca9.yml +openapi_spec_hash: 955676955a801dbe5084d8ffe2730791 config_hash: e4fdda880afe9a26b032ec5128e42dc2 diff --git a/abuse_reports/abusereport.go b/abuse_reports/abusereport.go index f9fd5577c09..45a645f5ded 100644 --- a/abuse_reports/abusereport.go +++ b/abuse_reports/abusereport.go @@ -146,7 +146,14 @@ type AbuseReportListResponseReport struct { Status AbuseReportListResponseReportsStatus `json:"status,required"` // The abuse report type Type AbuseReportListResponseReportsType `json:"type,required"` - JSON abuseReportListResponseReportJSON `json:"-"` + // Justification for the report. + Justification string `json:"justification"` + // Original work / Targeted brand in the alleged abuse. + OriginalWork string `json:"original_work"` + // Information about the submitter of the report. + Submitter AbuseReportListResponseReportsSubmitter `json:"submitter"` + URLs []string `json:"urls"` + JSON abuseReportListResponseReportJSON `json:"-"` } // abuseReportListResponseReportJSON contains the JSON metadata for the struct @@ -158,6 +165,10 @@ type abuseReportListResponseReportJSON struct { MitigationSummary apijson.Field Status apijson.Field Type apijson.Field + Justification apijson.Field + OriginalWork apijson.Field + Submitter apijson.Field + URLs apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -244,6 +255,34 @@ func (r AbuseReportListResponseReportsType) IsKnown() bool { return false } +// Information about the submitter of the report. +type AbuseReportListResponseReportsSubmitter struct { + Company string `json:"company"` + Email string `json:"email"` + Name string `json:"name"` + Telephone string `json:"telephone"` + JSON abuseReportListResponseReportsSubmitterJSON `json:"-"` +} + +// abuseReportListResponseReportsSubmitterJSON contains the JSON metadata for the +// struct [AbuseReportListResponseReportsSubmitter] +type abuseReportListResponseReportsSubmitterJSON struct { + Company apijson.Field + Email apijson.Field + Name apijson.Field + Telephone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AbuseReportListResponseReportsSubmitter) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r abuseReportListResponseReportsSubmitterJSON) RawJSON() string { + return r.raw +} + type AbuseReportGetResponse struct { // Public facing ID of abuse report, aka abuse_rand. ID string `json:"id,required"` @@ -258,7 +297,14 @@ type AbuseReportGetResponse struct { Status AbuseReportGetResponseStatus `json:"status,required"` // The abuse report type Type AbuseReportGetResponseType `json:"type,required"` - JSON abuseReportGetResponseJSON `json:"-"` + // Justification for the report. + Justification string `json:"justification"` + // Original work / Targeted brand in the alleged abuse. + OriginalWork string `json:"original_work"` + // Information about the submitter of the report. + Submitter AbuseReportGetResponseSubmitter `json:"submitter"` + URLs []string `json:"urls"` + JSON abuseReportGetResponseJSON `json:"-"` } // abuseReportGetResponseJSON contains the JSON metadata for the struct @@ -270,6 +316,10 @@ type abuseReportGetResponseJSON struct { MitigationSummary apijson.Field Status apijson.Field Type apijson.Field + Justification apijson.Field + OriginalWork apijson.Field + Submitter apijson.Field + URLs apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -356,6 +406,34 @@ func (r AbuseReportGetResponseType) IsKnown() bool { return false } +// Information about the submitter of the report. +type AbuseReportGetResponseSubmitter struct { + Company string `json:"company"` + Email string `json:"email"` + Name string `json:"name"` + Telephone string `json:"telephone"` + JSON abuseReportGetResponseSubmitterJSON `json:"-"` +} + +// abuseReportGetResponseSubmitterJSON contains the JSON metadata for the struct +// [AbuseReportGetResponseSubmitter] +type abuseReportGetResponseSubmitterJSON struct { + Company apijson.Field + Email apijson.Field + Name apijson.Field + Telephone apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AbuseReportGetResponseSubmitter) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r abuseReportGetResponseSubmitterJSON) RawJSON() string { + return r.raw +} + type AbuseReportNewParams struct { AccountID param.Field[string] `path:"account_id,required"` Body AbuseReportNewParamsBodyUnion `json:"body,required"` diff --git a/accounts/logaudit.go b/accounts/logaudit.go index 605544c4daf..8e508fcdf8c 100644 --- a/accounts/logaudit.go +++ b/accounts/logaudit.go @@ -356,6 +356,7 @@ type LogAuditListParams struct { // date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that // conforms to RFC3339. Since param.Field[time.Time] `query:"since,required" format:"date"` + ID param.Field[LogAuditListParamsID] `query:"id"` AccountName param.Field[LogAuditListParamsAccountName] `query:"account_name"` ActionResult param.Field[LogAuditListParamsActionResult] `query:"action_result"` ActionType param.Field[LogAuditListParamsActionType] `query:"action_type"` @@ -366,7 +367,6 @@ type LogAuditListParams struct { ActorTokenID param.Field[LogAuditListParamsActorTokenID] `query:"actor_token_id"` ActorTokenName param.Field[LogAuditListParamsActorTokenName] `query:"actor_token_name"` ActorType param.Field[LogAuditListParamsActorType] `query:"actor_type"` - AuditLogID param.Field[LogAuditListParamsAuditLogID] `query:"audit_log_id"` // The cursor is an opaque token used to paginate through large sets of records. It // indicates the position from which to continue when requesting the next set of // records. A valid cursor value can be obtained from the cursor object in the @@ -397,6 +397,19 @@ func (r LogAuditListParams) URLQuery() (v url.Values) { }) } +type LogAuditListParamsID struct { + // Filters out audit logs by their IDs. + Not param.Field[[]string] `query:"not"` +} + +// URLQuery serializes [LogAuditListParamsID]'s query parameters as `url.Values`. +func (r LogAuditListParamsID) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + type LogAuditListParamsAccountName struct { // Filters out audit logs by the account name. Not param.Field[[]string] `query:"not"` @@ -607,20 +620,6 @@ func (r LogAuditListParamsActorTypeNot) IsKnown() bool { return false } -type LogAuditListParamsAuditLogID struct { - // Filters out audit logs by their IDs. - Not param.Field[[]string] `query:"not"` -} - -// URLQuery serializes [LogAuditListParamsAuditLogID]'s query parameters as -// `url.Values`. -func (r LogAuditListParamsAuditLogID) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatDots, - }) -} - // Sets sorting order. type LogAuditListParamsDirection string diff --git a/accounts/logaudit_test.go b/accounts/logaudit_test.go index 19e8a3bbaaa..e3acbf2b671 100644 --- a/accounts/logaudit_test.go +++ b/accounts/logaudit_test.go @@ -33,6 +33,9 @@ func TestLogAuditListWithOptionalParams(t *testing.T) { AccountID: cloudflare.F("a67e14daa5f8dceeb91fe5449ba496ef"), Before: cloudflare.F(time.Now()), Since: cloudflare.F(time.Now()), + ID: cloudflare.F(accounts.LogAuditListParamsID{ + Not: cloudflare.F([]string{"f174be97-19b1-40d6-954d-70cd5fbd52db"}), + }), AccountName: cloudflare.F(accounts.LogAuditListParamsAccountName{ Not: cloudflare.F([]string{"string"}), }), @@ -63,9 +66,6 @@ func TestLogAuditListWithOptionalParams(t *testing.T) { ActorType: cloudflare.F(accounts.LogAuditListParamsActorType{ Not: cloudflare.F([]accounts.LogAuditListParamsActorTypeNot{accounts.LogAuditListParamsActorTypeNotAccount}), }), - AuditLogID: cloudflare.F(accounts.LogAuditListParamsAuditLogID{ - Not: cloudflare.F([]string{"f174be97-19b1-40d6-954d-70cd5fbd52db"}), - }), Cursor: cloudflare.F("Q1buH-__DQqqig7SVYXT-SsMOTGY2Z3Y80W-fGgva7yaDdmPKveucH5ddOcHsJRhNb-xUK8agZQqkJSMAENGO8NU6g=="), Direction: cloudflare.F(accounts.LogAuditListParamsDirectionDesc), Limit: cloudflare.F(25.000000), diff --git a/api.md b/api.md index 8e7870f25d3..beabc5cc836 100644 --- a/api.md +++ b/api.md @@ -1351,192 +1351,34 @@ Methods: ## Investigate -Response Types: - -- email_security.InvestigateListResponse -- email_security.InvestigateGetResponse - -Methods: - -- client.EmailSecurity.Investigate.List(ctx context.Context, params email_security.InvestigateListParams) (pagination.V4PagePaginationArray[email_security.InvestigateListResponse], error) -- client.EmailSecurity.Investigate.Get(ctx context.Context, postfixID string, query email_security.InvestigateGetParams) (email_security.InvestigateGetResponse, error) - ### Detections -Response Types: - -- email_security.InvestigateDetectionGetResponse - -Methods: - -- client.EmailSecurity.Investigate.Detections.Get(ctx context.Context, postfixID string, query email_security.InvestigateDetectionGetParams) (email_security.InvestigateDetectionGetResponse, error) - ### Preview -Response Types: - -- email_security.InvestigatePreviewNewResponse -- email_security.InvestigatePreviewGetResponse - -Methods: - -- client.EmailSecurity.Investigate.Preview.New(ctx context.Context, params email_security.InvestigatePreviewNewParams) (email_security.InvestigatePreviewNewResponse, error) -- client.EmailSecurity.Investigate.Preview.Get(ctx context.Context, postfixID string, query email_security.InvestigatePreviewGetParams) (email_security.InvestigatePreviewGetResponse, error) - ### Raw -Response Types: - -- email_security.InvestigateRawGetResponse - -Methods: - -- client.EmailSecurity.Investigate.Raw.Get(ctx context.Context, postfixID string, query email_security.InvestigateRawGetParams) (email_security.InvestigateRawGetResponse, error) - ### Trace -Response Types: - -- email_security.InvestigateTraceGetResponse - -Methods: - -- client.EmailSecurity.Investigate.Trace.Get(ctx context.Context, postfixID string, query email_security.InvestigateTraceGetParams) (email_security.InvestigateTraceGetResponse, error) - ### Move -Response Types: - -- email_security.InvestigateMoveNewResponse -- email_security.InvestigateMoveBulkResponse - -Methods: - -- client.EmailSecurity.Investigate.Move.New(ctx context.Context, postfixID string, params email_security.InvestigateMoveNewParams) (pagination.SinglePage[email_security.InvestigateMoveNewResponse], error) -- client.EmailSecurity.Investigate.Move.Bulk(ctx context.Context, params email_security.InvestigateMoveBulkParams) (pagination.SinglePage[email_security.InvestigateMoveBulkResponse], error) - ### Reclassify -Response Types: - -- email_security.InvestigateReclassifyNewResponse - -Methods: - -- client.EmailSecurity.Investigate.Reclassify.New(ctx context.Context, postfixID string, params email_security.InvestigateReclassifyNewParams) (email_security.InvestigateReclassifyNewResponse, error) - ### Release -Response Types: - -- email_security.InvestigateReleaseBulkResponse - -Methods: - -- client.EmailSecurity.Investigate.Release.Bulk(ctx context.Context, params email_security.InvestigateReleaseBulkParams) (pagination.SinglePage[email_security.InvestigateReleaseBulkResponse], error) - ## Settings ### AllowPolicies -Response Types: - -- email_security.SettingAllowPolicyNewResponse -- email_security.SettingAllowPolicyListResponse -- email_security.SettingAllowPolicyDeleteResponse -- email_security.SettingAllowPolicyEditResponse -- email_security.SettingAllowPolicyGetResponse - -Methods: - -- client.EmailSecurity.Settings.AllowPolicies.New(ctx context.Context, params email_security.SettingAllowPolicyNewParams) (email_security.SettingAllowPolicyNewResponse, error) -- client.EmailSecurity.Settings.AllowPolicies.List(ctx context.Context, params email_security.SettingAllowPolicyListParams) (pagination.V4PagePaginationArray[email_security.SettingAllowPolicyListResponse], error) -- client.EmailSecurity.Settings.AllowPolicies.Delete(ctx context.Context, policyID int64, body email_security.SettingAllowPolicyDeleteParams) (email_security.SettingAllowPolicyDeleteResponse, error) -- client.EmailSecurity.Settings.AllowPolicies.Edit(ctx context.Context, policyID int64, params email_security.SettingAllowPolicyEditParams) (email_security.SettingAllowPolicyEditResponse, error) -- client.EmailSecurity.Settings.AllowPolicies.Get(ctx context.Context, policyID int64, query email_security.SettingAllowPolicyGetParams) (email_security.SettingAllowPolicyGetResponse, error) - ### BlockSenders -Response Types: - -- email_security.SettingBlockSenderNewResponse -- email_security.SettingBlockSenderListResponse -- email_security.SettingBlockSenderDeleteResponse -- email_security.SettingBlockSenderEditResponse -- email_security.SettingBlockSenderGetResponse - -Methods: - -- client.EmailSecurity.Settings.BlockSenders.New(ctx context.Context, params email_security.SettingBlockSenderNewParams) (email_security.SettingBlockSenderNewResponse, error) -- client.EmailSecurity.Settings.BlockSenders.List(ctx context.Context, params email_security.SettingBlockSenderListParams) (pagination.V4PagePaginationArray[email_security.SettingBlockSenderListResponse], error) -- client.EmailSecurity.Settings.BlockSenders.Delete(ctx context.Context, patternID int64, body email_security.SettingBlockSenderDeleteParams) (email_security.SettingBlockSenderDeleteResponse, error) -- client.EmailSecurity.Settings.BlockSenders.Edit(ctx context.Context, patternID int64, params email_security.SettingBlockSenderEditParams) (email_security.SettingBlockSenderEditResponse, error) -- client.EmailSecurity.Settings.BlockSenders.Get(ctx context.Context, patternID int64, query email_security.SettingBlockSenderGetParams) (email_security.SettingBlockSenderGetResponse, error) - ### Domains -Response Types: - -- email_security.SettingDomainListResponse -- email_security.SettingDomainDeleteResponse -- email_security.SettingDomainBulkDeleteResponse -- email_security.SettingDomainEditResponse -- email_security.SettingDomainGetResponse - -Methods: - -- client.EmailSecurity.Settings.Domains.List(ctx context.Context, params email_security.SettingDomainListParams) (pagination.V4PagePaginationArray[email_security.SettingDomainListResponse], error) -- client.EmailSecurity.Settings.Domains.Delete(ctx context.Context, domainID int64, body email_security.SettingDomainDeleteParams) (email_security.SettingDomainDeleteResponse, error) -- client.EmailSecurity.Settings.Domains.BulkDelete(ctx context.Context, body email_security.SettingDomainBulkDeleteParams) (pagination.SinglePage[email_security.SettingDomainBulkDeleteResponse], error) -- client.EmailSecurity.Settings.Domains.Edit(ctx context.Context, domainID int64, params email_security.SettingDomainEditParams) (email_security.SettingDomainEditResponse, error) -- client.EmailSecurity.Settings.Domains.Get(ctx context.Context, domainID int64, query email_security.SettingDomainGetParams) (email_security.SettingDomainGetResponse, error) - ### ImpersonationRegistry -Response Types: - -- email_security.SettingImpersonationRegistryNewResponse -- email_security.SettingImpersonationRegistryListResponse -- email_security.SettingImpersonationRegistryDeleteResponse -- email_security.SettingImpersonationRegistryEditResponse -- email_security.SettingImpersonationRegistryGetResponse - -Methods: - -- client.EmailSecurity.Settings.ImpersonationRegistry.New(ctx context.Context, params email_security.SettingImpersonationRegistryNewParams) (email_security.SettingImpersonationRegistryNewResponse, error) -- client.EmailSecurity.Settings.ImpersonationRegistry.List(ctx context.Context, params email_security.SettingImpersonationRegistryListParams) (pagination.V4PagePaginationArray[email_security.SettingImpersonationRegistryListResponse], error) -- client.EmailSecurity.Settings.ImpersonationRegistry.Delete(ctx context.Context, displayNameID int64, body email_security.SettingImpersonationRegistryDeleteParams) (email_security.SettingImpersonationRegistryDeleteResponse, error) -- client.EmailSecurity.Settings.ImpersonationRegistry.Edit(ctx context.Context, displayNameID int64, params email_security.SettingImpersonationRegistryEditParams) (email_security.SettingImpersonationRegistryEditResponse, error) -- client.EmailSecurity.Settings.ImpersonationRegistry.Get(ctx context.Context, displayNameID int64, query email_security.SettingImpersonationRegistryGetParams) (email_security.SettingImpersonationRegistryGetResponse, error) - ### TrustedDomains -Response Types: - -- email_security.SettingTrustedDomainNewResponseUnion -- email_security.SettingTrustedDomainListResponse -- email_security.SettingTrustedDomainDeleteResponse -- email_security.SettingTrustedDomainEditResponse -- email_security.SettingTrustedDomainGetResponse - -Methods: - -- client.EmailSecurity.Settings.TrustedDomains.New(ctx context.Context, params email_security.SettingTrustedDomainNewParams) (email_security.SettingTrustedDomainNewResponseUnion, error) -- client.EmailSecurity.Settings.TrustedDomains.List(ctx context.Context, params email_security.SettingTrustedDomainListParams) (pagination.V4PagePaginationArray[email_security.SettingTrustedDomainListResponse], error) -- client.EmailSecurity.Settings.TrustedDomains.Delete(ctx context.Context, trustedDomainID int64, body email_security.SettingTrustedDomainDeleteParams) (email_security.SettingTrustedDomainDeleteResponse, error) -- client.EmailSecurity.Settings.TrustedDomains.Edit(ctx context.Context, trustedDomainID int64, params email_security.SettingTrustedDomainEditParams) (email_security.SettingTrustedDomainEditResponse, error) -- client.EmailSecurity.Settings.TrustedDomains.Get(ctx context.Context, trustedDomainID int64, query email_security.SettingTrustedDomainGetParams) (email_security.SettingTrustedDomainGetResponse, error) - ## Submissions -Response Types: - -- email_security.SubmissionListResponse - -Methods: - -- client.EmailSecurity.Submissions.List(ctx context.Context, params email_security.SubmissionListParams) (pagination.V4PagePaginationArray[email_security.SubmissionListResponse], error) - # EmailRouting Response Types: @@ -4245,43 +4087,44 @@ Methods: ## Projects -Params Types: - -- pages.DeploymentParam -- pages.ProjectParam -- pages.StageParam - Response Types: -- pages.Deployment -- pages.Project - pages.Stage +- pages.ProjectNewResponse +- pages.ProjectListResponse - pages.ProjectDeleteResponse +- pages.ProjectEditResponse +- pages.ProjectGetResponse - pages.ProjectPurgeBuildCacheResponse Methods: -- client.Pages.Projects.New(ctx context.Context, params pages.ProjectNewParams) (pages.Project, error) -- client.Pages.Projects.List(ctx context.Context, params pages.ProjectListParams) (pagination.V4PagePaginationArray[pages.Deployment], error) +- client.Pages.Projects.New(ctx context.Context, params pages.ProjectNewParams) (pages.ProjectNewResponse, error) +- client.Pages.Projects.List(ctx context.Context, params pages.ProjectListParams) (pagination.V4PagePaginationArray[pages.ProjectListResponse], error) - client.Pages.Projects.Delete(ctx context.Context, projectName string, body pages.ProjectDeleteParams) (pages.ProjectDeleteResponse, error) -- client.Pages.Projects.Edit(ctx context.Context, projectName string, params pages.ProjectEditParams) (pages.Project, error) -- client.Pages.Projects.Get(ctx context.Context, projectName string, query pages.ProjectGetParams) (pages.Project, error) +- client.Pages.Projects.Edit(ctx context.Context, projectName string, params pages.ProjectEditParams) (pages.ProjectEditResponse, error) +- client.Pages.Projects.Get(ctx context.Context, projectName string, query pages.ProjectGetParams) (pages.ProjectGetResponse, error) - client.Pages.Projects.PurgeBuildCache(ctx context.Context, projectName string, body pages.ProjectPurgeBuildCacheParams) (pages.ProjectPurgeBuildCacheResponse, error) ### Deployments Response Types: +- pages.ProjectDeploymentNewResponse +- pages.ProjectDeploymentListResponse - pages.ProjectDeploymentDeleteResponse +- pages.ProjectDeploymentGetResponse +- pages.ProjectDeploymentRetryResponse +- pages.ProjectDeploymentRollbackResponse Methods: -- client.Pages.Projects.Deployments.New(ctx context.Context, projectName string, params pages.ProjectDeploymentNewParams) (pages.Deployment, error) -- client.Pages.Projects.Deployments.List(ctx context.Context, projectName string, params pages.ProjectDeploymentListParams) (pagination.V4PagePaginationArray[pages.Deployment], error) +- client.Pages.Projects.Deployments.New(ctx context.Context, projectName string, params pages.ProjectDeploymentNewParams) (pages.ProjectDeploymentNewResponse, error) +- client.Pages.Projects.Deployments.List(ctx context.Context, projectName string, params pages.ProjectDeploymentListParams) (pagination.V4PagePaginationArray[pages.ProjectDeploymentListResponse], error) - client.Pages.Projects.Deployments.Delete(ctx context.Context, projectName string, deploymentID string, body pages.ProjectDeploymentDeleteParams) (pages.ProjectDeploymentDeleteResponse, error) -- client.Pages.Projects.Deployments.Get(ctx context.Context, projectName string, deploymentID string, query pages.ProjectDeploymentGetParams) (pages.Deployment, error) -- client.Pages.Projects.Deployments.Retry(ctx context.Context, projectName string, deploymentID string, params pages.ProjectDeploymentRetryParams) (pages.Deployment, error) -- client.Pages.Projects.Deployments.Rollback(ctx context.Context, projectName string, deploymentID string, params pages.ProjectDeploymentRollbackParams) (pages.Deployment, error) +- client.Pages.Projects.Deployments.Get(ctx context.Context, projectName string, deploymentID string, query pages.ProjectDeploymentGetParams) (pages.ProjectDeploymentGetResponse, error) +- client.Pages.Projects.Deployments.Retry(ctx context.Context, projectName string, deploymentID string, body pages.ProjectDeploymentRetryParams) (pages.ProjectDeploymentRetryResponse, error) +- client.Pages.Projects.Deployments.Rollback(ctx context.Context, projectName string, deploymentID string, body pages.ProjectDeploymentRollbackParams) (pages.ProjectDeploymentRollbackResponse, error) #### History @@ -4310,7 +4153,7 @@ Methods: - client.Pages.Projects.Domains.New(ctx context.Context, projectName string, params pages.ProjectDomainNewParams) (pages.ProjectDomainNewResponse, error) - client.Pages.Projects.Domains.List(ctx context.Context, projectName string, query pages.ProjectDomainListParams) (pagination.SinglePage[pages.ProjectDomainListResponse], error) - client.Pages.Projects.Domains.Delete(ctx context.Context, projectName string, domainName string, body pages.ProjectDomainDeleteParams) (pages.ProjectDomainDeleteResponse, error) -- client.Pages.Projects.Domains.Edit(ctx context.Context, projectName string, domainName string, params pages.ProjectDomainEditParams) (pages.ProjectDomainEditResponse, error) +- client.Pages.Projects.Domains.Edit(ctx context.Context, projectName string, domainName string, body pages.ProjectDomainEditParams) (pages.ProjectDomainEditResponse, error) - client.Pages.Projects.Domains.Get(ctx context.Context, projectName string, domainName string, query pages.ProjectDomainGetParams) (pages.ProjectDomainGetResponse, error) # Registrar @@ -6144,27 +5987,29 @@ Methods: Response Types: - zero_trust.Dataset -- zero_trust.DatasetArray -- zero_trust.DatasetCreation +- zero_trust.DLPDatasetNewResponse +- zero_trust.DLPDatasetUpdateResponse +- zero_trust.DLPDatasetGetResponse Methods: -- client.ZeroTrust.DLP.Datasets.New(ctx context.Context, params zero_trust.DLPDatasetNewParams) (zero_trust.DatasetCreation, error) -- client.ZeroTrust.DLP.Datasets.Update(ctx context.Context, datasetID string, params zero_trust.DLPDatasetUpdateParams) (zero_trust.Dataset, error) +- client.ZeroTrust.DLP.Datasets.New(ctx context.Context, params zero_trust.DLPDatasetNewParams) (zero_trust.DLPDatasetNewResponse, error) +- client.ZeroTrust.DLP.Datasets.Update(ctx context.Context, datasetID string, params zero_trust.DLPDatasetUpdateParams) (zero_trust.DLPDatasetUpdateResponse, error) - client.ZeroTrust.DLP.Datasets.List(ctx context.Context, query zero_trust.DLPDatasetListParams) (pagination.SinglePage[zero_trust.Dataset], error) - client.ZeroTrust.DLP.Datasets.Delete(ctx context.Context, datasetID string, body zero_trust.DLPDatasetDeleteParams) error -- client.ZeroTrust.DLP.Datasets.Get(ctx context.Context, datasetID string, query zero_trust.DLPDatasetGetParams) (zero_trust.Dataset, error) +- client.ZeroTrust.DLP.Datasets.Get(ctx context.Context, datasetID string, query zero_trust.DLPDatasetGetParams) (zero_trust.DLPDatasetGetResponse, error) #### Upload Response Types: -- zero_trust.NewVersion +- zero_trust.DLPDatasetUploadNewResponse +- zero_trust.DLPDatasetUploadEditResponse Methods: -- client.ZeroTrust.DLP.Datasets.Upload.New(ctx context.Context, datasetID string, body zero_trust.DLPDatasetUploadNewParams) (zero_trust.NewVersion, error) -- client.ZeroTrust.DLP.Datasets.Upload.Edit(ctx context.Context, datasetID string, version int64, dataset io.Reader, body zero_trust.DLPDatasetUploadEditParams) (zero_trust.Dataset, error) +- client.ZeroTrust.DLP.Datasets.Upload.New(ctx context.Context, datasetID string, body zero_trust.DLPDatasetUploadNewParams) (zero_trust.DLPDatasetUploadNewResponse, error) +- client.ZeroTrust.DLP.Datasets.Upload.Edit(ctx context.Context, datasetID string, version int64, dataset io.Reader, body zero_trust.DLPDatasetUploadEditParams) (zero_trust.DLPDatasetUploadEditResponse, error) #### Versions @@ -6254,11 +6099,12 @@ Response Types: - zero_trust.ContextAwareness - zero_trust.Profile - zero_trust.SkipConfiguration +- zero_trust.DLPProfileGetResponse Methods: - client.ZeroTrust.DLP.Profiles.List(ctx context.Context, params zero_trust.DLPProfileListParams) (pagination.SinglePage[zero_trust.Profile], error) -- client.ZeroTrust.DLP.Profiles.Get(ctx context.Context, profileID string, query zero_trust.DLPProfileGetParams) (zero_trust.Profile, error) +- client.ZeroTrust.DLP.Profiles.Get(ctx context.Context, profileID string, query zero_trust.DLPProfileGetParams) (zero_trust.DLPProfileGetResponse, error) #### Custom @@ -6269,27 +6115,31 @@ Params Types: Response Types: - zero_trust.Pattern +- zero_trust.DLPProfileCustomNewResponse +- zero_trust.DLPProfileCustomUpdateResponse - zero_trust.DLPProfileCustomDeleteResponse +- zero_trust.DLPProfileCustomGetResponse Methods: -- client.ZeroTrust.DLP.Profiles.Custom.New(ctx context.Context, params zero_trust.DLPProfileCustomNewParams) (zero_trust.Profile, error) -- client.ZeroTrust.DLP.Profiles.Custom.Update(ctx context.Context, profileID string, params zero_trust.DLPProfileCustomUpdateParams) (zero_trust.Profile, error) +- client.ZeroTrust.DLP.Profiles.Custom.New(ctx context.Context, params zero_trust.DLPProfileCustomNewParams) (zero_trust.DLPProfileCustomNewResponse, error) +- client.ZeroTrust.DLP.Profiles.Custom.Update(ctx context.Context, profileID string, params zero_trust.DLPProfileCustomUpdateParams) (zero_trust.DLPProfileCustomUpdateResponse, error) - client.ZeroTrust.DLP.Profiles.Custom.Delete(ctx context.Context, profileID string, body zero_trust.DLPProfileCustomDeleteParams) (zero_trust.DLPProfileCustomDeleteResponse, error) -- client.ZeroTrust.DLP.Profiles.Custom.Get(ctx context.Context, profileID string, query zero_trust.DLPProfileCustomGetParams) (zero_trust.Profile, error) +- client.ZeroTrust.DLP.Profiles.Custom.Get(ctx context.Context, profileID string, query zero_trust.DLPProfileCustomGetParams) (zero_trust.DLPProfileCustomGetResponse, error) #### Predefined Response Types: -- zero_trust.PredefinedProfile +- zero_trust.DLPProfilePredefinedUpdateResponse - zero_trust.DLPProfilePredefinedDeleteResponse +- zero_trust.DLPProfilePredefinedGetResponse Methods: -- client.ZeroTrust.DLP.Profiles.Predefined.Update(ctx context.Context, profileID string, params zero_trust.DLPProfilePredefinedUpdateParams) (zero_trust.PredefinedProfile, error) +- client.ZeroTrust.DLP.Profiles.Predefined.Update(ctx context.Context, profileID string, params zero_trust.DLPProfilePredefinedUpdateParams) (zero_trust.DLPProfilePredefinedUpdateResponse, error) - client.ZeroTrust.DLP.Profiles.Predefined.Delete(ctx context.Context, profileID string, body zero_trust.DLPProfilePredefinedDeleteParams) (zero_trust.DLPProfilePredefinedDeleteResponse, error) -- client.ZeroTrust.DLP.Profiles.Predefined.Get(ctx context.Context, profileID string, query zero_trust.DLPProfilePredefinedGetParams) (zero_trust.PredefinedProfile, error) +- client.ZeroTrust.DLP.Profiles.Predefined.Get(ctx context.Context, profileID string, query zero_trust.DLPProfilePredefinedGetParams) (zero_trust.DLPProfilePredefinedGetResponse, error) ### Limits diff --git a/browser_rendering/content.go b/browser_rendering/content.go index 6edc11aeb8f..1b64ca1ea2a 100644 --- a/browser_rendering/content.go +++ b/browser_rendering/content.go @@ -423,8 +423,8 @@ func (r contentNewResponseEnvelopeJSON) RawJSON() string { } type ContentNewResponseEnvelopeMeta struct { - Status float64 `json:"status,required"` - Title string `json:"title,required"` + Status float64 `json:"status"` + Title string `json:"title"` JSON contentNewResponseEnvelopeMetaJSON `json:"-"` } diff --git a/browser_rendering/content_test.go b/browser_rendering/content_test.go index 30e58fcf39b..5378eba2ef3 100644 --- a/browser_rendering/content_test.go +++ b/browser_rendering/content_test.go @@ -30,7 +30,7 @@ func TestContentNewWithOptionalParams(t *testing.T) { _, err := client.BrowserRendering.Content.New(context.TODO(), browser_rendering.ContentNewParams{ AccountID: cloudflare.F("account_id"), CacheTTL: cloudflare.F(86400.000000), - ActionTimeout: cloudflare.F(300000.000000), + ActionTimeout: cloudflare.F(120000.000000), AddScriptTag: cloudflare.F([]browser_rendering.ContentNewParamsAddScriptTag{{ ID: cloudflare.F("id"), Content: cloudflare.F("content"), @@ -91,10 +91,10 @@ func TestContentNewWithOptionalParams(t *testing.T) { WaitForSelector: cloudflare.F(browser_rendering.ContentNewParamsWaitForSelector{ Selector: cloudflare.F("selector"), Hidden: cloudflare.F(browser_rendering.ContentNewParamsWaitForSelectorHiddenTrue), - Timeout: cloudflare.F(60000.000000), + Timeout: cloudflare.F(120000.000000), Visible: cloudflare.F(browser_rendering.ContentNewParamsWaitForSelectorVisibleTrue), }), - WaitForTimeout: cloudflare.F(60000.000000), + WaitForTimeout: cloudflare.F(120000.000000), }) if err != nil { var apierr *cloudflare.Error diff --git a/browser_rendering/json_test.go b/browser_rendering/json_test.go index fb3f4df5e01..2e2b716e435 100644 --- a/browser_rendering/json_test.go +++ b/browser_rendering/json_test.go @@ -31,7 +31,7 @@ func TestJsonNewWithOptionalParams(t *testing.T) { _, err := client.BrowserRendering.Json.New(context.TODO(), browser_rendering.JsonNewParams{ AccountID: cloudflare.F("account_id"), CacheTTL: cloudflare.F(86400.000000), - ActionTimeout: cloudflare.F(300000.000000), + ActionTimeout: cloudflare.F(120000.000000), AddScriptTag: cloudflare.F([]browser_rendering.JsonNewParamsAddScriptTag{{ ID: cloudflare.F("id"), Content: cloudflare.F("content"), @@ -103,10 +103,10 @@ func TestJsonNewWithOptionalParams(t *testing.T) { WaitForSelector: cloudflare.F(browser_rendering.JsonNewParamsWaitForSelector{ Selector: cloudflare.F("selector"), Hidden: cloudflare.F(browser_rendering.JsonNewParamsWaitForSelectorHiddenTrue), - Timeout: cloudflare.F(60000.000000), + Timeout: cloudflare.F(120000.000000), Visible: cloudflare.F(browser_rendering.JsonNewParamsWaitForSelectorVisibleTrue), }), - WaitForTimeout: cloudflare.F(60000.000000), + WaitForTimeout: cloudflare.F(120000.000000), }) if err != nil { var apierr *cloudflare.Error diff --git a/browser_rendering/link_test.go b/browser_rendering/link_test.go index bb8c2621983..38c26de9483 100644 --- a/browser_rendering/link_test.go +++ b/browser_rendering/link_test.go @@ -30,7 +30,7 @@ func TestLinkNewWithOptionalParams(t *testing.T) { _, err := client.BrowserRendering.Links.New(context.TODO(), browser_rendering.LinkNewParams{ AccountID: cloudflare.F("account_id"), CacheTTL: cloudflare.F(86400.000000), - ActionTimeout: cloudflare.F(300000.000000), + ActionTimeout: cloudflare.F(120000.000000), AddScriptTag: cloudflare.F([]browser_rendering.LinkNewParamsAddScriptTag{{ ID: cloudflare.F("id"), Content: cloudflare.F("content"), @@ -93,10 +93,10 @@ func TestLinkNewWithOptionalParams(t *testing.T) { WaitForSelector: cloudflare.F(browser_rendering.LinkNewParamsWaitForSelector{ Selector: cloudflare.F("selector"), Hidden: cloudflare.F(browser_rendering.LinkNewParamsWaitForSelectorHiddenTrue), - Timeout: cloudflare.F(60000.000000), + Timeout: cloudflare.F(120000.000000), Visible: cloudflare.F(browser_rendering.LinkNewParamsWaitForSelectorVisibleTrue), }), - WaitForTimeout: cloudflare.F(60000.000000), + WaitForTimeout: cloudflare.F(120000.000000), }) if err != nil { var apierr *cloudflare.Error diff --git a/browser_rendering/markdown_test.go b/browser_rendering/markdown_test.go index f934f957c9c..0702ed204f4 100644 --- a/browser_rendering/markdown_test.go +++ b/browser_rendering/markdown_test.go @@ -30,7 +30,7 @@ func TestMarkdownNewWithOptionalParams(t *testing.T) { _, err := client.BrowserRendering.Markdown.New(context.TODO(), browser_rendering.MarkdownNewParams{ AccountID: cloudflare.F("account_id"), CacheTTL: cloudflare.F(86400.000000), - ActionTimeout: cloudflare.F(300000.000000), + ActionTimeout: cloudflare.F(120000.000000), AddScriptTag: cloudflare.F([]browser_rendering.MarkdownNewParamsAddScriptTag{{ ID: cloudflare.F("id"), Content: cloudflare.F("content"), @@ -91,10 +91,10 @@ func TestMarkdownNewWithOptionalParams(t *testing.T) { WaitForSelector: cloudflare.F(browser_rendering.MarkdownNewParamsWaitForSelector{ Selector: cloudflare.F("selector"), Hidden: cloudflare.F(browser_rendering.MarkdownNewParamsWaitForSelectorHiddenTrue), - Timeout: cloudflare.F(60000.000000), + Timeout: cloudflare.F(120000.000000), Visible: cloudflare.F(browser_rendering.MarkdownNewParamsWaitForSelectorVisibleTrue), }), - WaitForTimeout: cloudflare.F(60000.000000), + WaitForTimeout: cloudflare.F(120000.000000), }) if err != nil { var apierr *cloudflare.Error diff --git a/browser_rendering/pdf_test.go b/browser_rendering/pdf_test.go index bb4e73d6543..4dad8713594 100644 --- a/browser_rendering/pdf_test.go +++ b/browser_rendering/pdf_test.go @@ -32,7 +32,7 @@ func TestPDFNewWithOptionalParams(t *testing.T) { resp, err := client.BrowserRendering.PDF.New(context.TODO(), browser_rendering.PDFNewParams{ AccountID: cloudflare.F("account_id"), CacheTTL: cloudflare.F(86400.000000), - ActionTimeout: cloudflare.F(300000.000000), + ActionTimeout: cloudflare.F(120000.000000), AddScriptTag: cloudflare.F([]browser_rendering.PDFNewParamsAddScriptTag{{ ID: cloudflare.F("id"), Content: cloudflare.F("content"), @@ -116,10 +116,10 @@ func TestPDFNewWithOptionalParams(t *testing.T) { WaitForSelector: cloudflare.F(browser_rendering.PDFNewParamsWaitForSelector{ Selector: cloudflare.F("selector"), Hidden: cloudflare.F(browser_rendering.PDFNewParamsWaitForSelectorHiddenTrue), - Timeout: cloudflare.F(60000.000000), + Timeout: cloudflare.F(120000.000000), Visible: cloudflare.F(browser_rendering.PDFNewParamsWaitForSelectorVisibleTrue), }), - WaitForTimeout: cloudflare.F(60000.000000), + WaitForTimeout: cloudflare.F(120000.000000), }) if err != nil { var apierr *cloudflare.Error diff --git a/browser_rendering/scrape_test.go b/browser_rendering/scrape_test.go index ee95af55a09..55e71cb3afa 100644 --- a/browser_rendering/scrape_test.go +++ b/browser_rendering/scrape_test.go @@ -33,7 +33,7 @@ func TestScrapeNewWithOptionalParams(t *testing.T) { Selector: cloudflare.F("selector"), }}), CacheTTL: cloudflare.F(86400.000000), - ActionTimeout: cloudflare.F(300000.000000), + ActionTimeout: cloudflare.F(120000.000000), AddScriptTag: cloudflare.F([]browser_rendering.ScrapeNewParamsAddScriptTag{{ ID: cloudflare.F("id"), Content: cloudflare.F("content"), @@ -94,10 +94,10 @@ func TestScrapeNewWithOptionalParams(t *testing.T) { WaitForSelector: cloudflare.F(browser_rendering.ScrapeNewParamsWaitForSelector{ Selector: cloudflare.F("selector"), Hidden: cloudflare.F(browser_rendering.ScrapeNewParamsWaitForSelectorHiddenTrue), - Timeout: cloudflare.F(60000.000000), + Timeout: cloudflare.F(120000.000000), Visible: cloudflare.F(browser_rendering.ScrapeNewParamsWaitForSelectorVisibleTrue), }), - WaitForTimeout: cloudflare.F(60000.000000), + WaitForTimeout: cloudflare.F(120000.000000), }) if err != nil { var apierr *cloudflare.Error diff --git a/browser_rendering/screenshot_test.go b/browser_rendering/screenshot_test.go index 21947990819..b8c1d3df509 100644 --- a/browser_rendering/screenshot_test.go +++ b/browser_rendering/screenshot_test.go @@ -30,7 +30,7 @@ func TestScreenshotNewWithOptionalParams(t *testing.T) { _, err := client.BrowserRendering.Screenshot.New(context.TODO(), browser_rendering.ScreenshotNewParams{ AccountID: cloudflare.F("account_id"), CacheTTL: cloudflare.F(86400.000000), - ActionTimeout: cloudflare.F(300000.000000), + ActionTimeout: cloudflare.F(120000.000000), AddScriptTag: cloudflare.F([]browser_rendering.ScreenshotNewParamsAddScriptTag{{ ID: cloudflare.F("id"), Content: cloudflare.F("content"), @@ -110,10 +110,10 @@ func TestScreenshotNewWithOptionalParams(t *testing.T) { WaitForSelector: cloudflare.F(browser_rendering.ScreenshotNewParamsWaitForSelector{ Selector: cloudflare.F("selector"), Hidden: cloudflare.F(browser_rendering.ScreenshotNewParamsWaitForSelectorHiddenTrue), - Timeout: cloudflare.F(60000.000000), + Timeout: cloudflare.F(120000.000000), Visible: cloudflare.F(browser_rendering.ScreenshotNewParamsWaitForSelectorVisibleTrue), }), - WaitForTimeout: cloudflare.F(60000.000000), + WaitForTimeout: cloudflare.F(120000.000000), }) if err != nil { var apierr *cloudflare.Error diff --git a/browser_rendering/snapshot.go b/browser_rendering/snapshot.go index 649d7c12cfc..5001bb0bcf7 100644 --- a/browser_rendering/snapshot.go +++ b/browser_rendering/snapshot.go @@ -464,6 +464,7 @@ func (r SnapshotNewParamsWaitForSelectorVisible) IsKnown() bool { } type SnapshotNewResponseEnvelope struct { + Meta SnapshotNewResponseEnvelopeMeta `json:"meta,required"` // Response status Status bool `json:"status,required"` Errors []SnapshotNewResponseEnvelopeErrors `json:"errors"` @@ -474,6 +475,7 @@ type SnapshotNewResponseEnvelope struct { // snapshotNewResponseEnvelopeJSON contains the JSON metadata for the struct // [SnapshotNewResponseEnvelope] type snapshotNewResponseEnvelopeJSON struct { + Meta apijson.Field Status apijson.Field Errors apijson.Field Result apijson.Field @@ -489,6 +491,29 @@ func (r snapshotNewResponseEnvelopeJSON) RawJSON() string { return r.raw } +type SnapshotNewResponseEnvelopeMeta struct { + Status float64 `json:"status"` + Title string `json:"title"` + JSON snapshotNewResponseEnvelopeMetaJSON `json:"-"` +} + +// snapshotNewResponseEnvelopeMetaJSON contains the JSON metadata for the struct +// [SnapshotNewResponseEnvelopeMeta] +type snapshotNewResponseEnvelopeMetaJSON struct { + Status apijson.Field + Title apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SnapshotNewResponseEnvelopeMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r snapshotNewResponseEnvelopeMetaJSON) RawJSON() string { + return r.raw +} + type SnapshotNewResponseEnvelopeErrors struct { // Error code Code float64 `json:"code,required"` diff --git a/browser_rendering/snapshot_test.go b/browser_rendering/snapshot_test.go index c28dc2bb179..7a5d354bd5b 100644 --- a/browser_rendering/snapshot_test.go +++ b/browser_rendering/snapshot_test.go @@ -30,7 +30,7 @@ func TestSnapshotNewWithOptionalParams(t *testing.T) { _, err := client.BrowserRendering.Snapshot.New(context.TODO(), browser_rendering.SnapshotNewParams{ AccountID: cloudflare.F("account_id"), CacheTTL: cloudflare.F(86400.000000), - ActionTimeout: cloudflare.F(300000.000000), + ActionTimeout: cloudflare.F(120000.000000), AddScriptTag: cloudflare.F([]browser_rendering.SnapshotNewParamsAddScriptTag{{ ID: cloudflare.F("id"), Content: cloudflare.F("content"), @@ -107,10 +107,10 @@ func TestSnapshotNewWithOptionalParams(t *testing.T) { WaitForSelector: cloudflare.F(browser_rendering.SnapshotNewParamsWaitForSelector{ Selector: cloudflare.F("selector"), Hidden: cloudflare.F(browser_rendering.SnapshotNewParamsWaitForSelectorHiddenTrue), - Timeout: cloudflare.F(60000.000000), + Timeout: cloudflare.F(120000.000000), Visible: cloudflare.F(browser_rendering.SnapshotNewParamsWaitForSelectorVisibleTrue), }), - WaitForTimeout: cloudflare.F(60000.000000), + WaitForTimeout: cloudflare.F(120000.000000), }) if err != nil { var apierr *cloudflare.Error diff --git a/cloudforce_one/threatevent.go b/cloudforce_one/threatevent.go index e8451d472b1..9998cb10a22 100644 --- a/cloudforce_one/threatevent.go +++ b/cloudforce_one/threatevent.go @@ -167,6 +167,7 @@ type ThreatEventNewResponse struct { Category string `json:"category,required"` Date string `json:"date,required"` Event string `json:"event,required"` + HasChildren bool `json:"hasChildren,required"` Indicator string `json:"indicator,required"` IndicatorType string `json:"indicatorType,required"` IndicatorTypeID float64 `json:"indicatorTypeId,required"` @@ -197,6 +198,7 @@ type threatEventNewResponseJSON struct { Category apijson.Field Date apijson.Field Event apijson.Field + HasChildren apijson.Field Indicator apijson.Field IndicatorType apijson.Field IndicatorTypeID apijson.Field @@ -234,6 +236,7 @@ type ThreatEventListResponse struct { Category string `json:"category,required"` Date string `json:"date,required"` Event string `json:"event,required"` + HasChildren bool `json:"hasChildren,required"` Indicator string `json:"indicator,required"` IndicatorType string `json:"indicatorType,required"` IndicatorTypeID float64 `json:"indicatorTypeId,required"` @@ -264,6 +267,7 @@ type threatEventListResponseJSON struct { Category apijson.Field Date apijson.Field Event apijson.Field + HasChildren apijson.Field Indicator apijson.Field IndicatorType apijson.Field IndicatorTypeID apijson.Field @@ -322,6 +326,7 @@ type ThreatEventEditResponse struct { Category string `json:"category,required"` Date string `json:"date,required"` Event string `json:"event,required"` + HasChildren bool `json:"hasChildren,required"` Indicator string `json:"indicator,required"` IndicatorType string `json:"indicatorType,required"` IndicatorTypeID float64 `json:"indicatorTypeId,required"` @@ -352,6 +357,7 @@ type threatEventEditResponseJSON struct { Category apijson.Field Date apijson.Field Event apijson.Field + HasChildren apijson.Field Indicator apijson.Field IndicatorType apijson.Field IndicatorTypeID apijson.Field @@ -389,6 +395,7 @@ type ThreatEventGetResponse struct { Category string `json:"category,required"` Date string `json:"date,required"` Event string `json:"event,required"` + HasChildren bool `json:"hasChildren,required"` Indicator string `json:"indicator,required"` IndicatorType string `json:"indicatorType,required"` IndicatorTypeID float64 `json:"indicatorTypeId,required"` @@ -419,6 +426,7 @@ type threatEventGetResponseJSON struct { Category apijson.Field Date apijson.Field Event apijson.Field + HasChildren apijson.Field Indicator apijson.Field IndicatorType apijson.Field IndicatorTypeID apijson.Field @@ -456,7 +464,6 @@ type ThreatEventNewParams struct { Category param.Field[string] `json:"category,required"` Date param.Field[time.Time] `json:"date,required" format:"date-time"` Event param.Field[string] `json:"event,required"` - IndicatorType param.Field[string] `json:"indicatorType,required"` Raw param.Field[ThreatEventNewParamsRaw] `json:"raw,required"` TLP param.Field[string] `json:"tlp,required"` BodyAccountID param.Field[float64] `json:"accountId"` @@ -464,10 +471,14 @@ type ThreatEventNewParams struct { AttackerCountry param.Field[string] `json:"attackerCountry"` DatasetID param.Field[string] `json:"datasetId"` Indicator param.Field[string] `json:"indicator"` - Insight param.Field[string] `json:"insight"` - Tags param.Field[[]string] `json:"tags"` - TargetCountry param.Field[string] `json:"targetCountry"` - TargetIndustry param.Field[string] `json:"targetIndustry"` + // Array of indicators for this event. Supports multiple indicators per event for + // complex scenarios. + Indicators param.Field[[]ThreatEventNewParamsIndicator] `json:"indicators"` + IndicatorType param.Field[string] `json:"indicatorType"` + Insight param.Field[string] `json:"insight"` + Tags param.Field[[]string] `json:"tags"` + TargetCountry param.Field[string] `json:"targetCountry"` + TargetIndustry param.Field[string] `json:"targetIndustry"` } func (r ThreatEventNewParams) MarshalJSON() (data []byte, err error) { @@ -484,6 +495,17 @@ func (r ThreatEventNewParamsRaw) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +type ThreatEventNewParamsIndicator struct { + // The type of indicator (e.g., DOMAIN, IP, JA3, HASH) + IndicatorType param.Field[string] `json:"indicatorType,required"` + // The indicator value (e.g., domain name, IP address, hash) + Value param.Field[string] `json:"value,required"` +} + +func (r ThreatEventNewParamsIndicator) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + type ThreatEventListParams struct { // Account ID. AccountID param.Field[string] `path:"account_id,required"` @@ -594,7 +616,6 @@ type ThreatEventBulkNewParamsData struct { Category param.Field[string] `json:"category,required"` Date param.Field[time.Time] `json:"date,required" format:"date-time"` Event param.Field[string] `json:"event,required"` - IndicatorType param.Field[string] `json:"indicatorType,required"` Raw param.Field[ThreatEventBulkNewParamsDataRaw] `json:"raw,required"` TLP param.Field[string] `json:"tlp,required"` AccountID param.Field[float64] `json:"accountId"` @@ -602,10 +623,14 @@ type ThreatEventBulkNewParamsData struct { AttackerCountry param.Field[string] `json:"attackerCountry"` DatasetID param.Field[string] `json:"datasetId"` Indicator param.Field[string] `json:"indicator"` - Insight param.Field[string] `json:"insight"` - Tags param.Field[[]string] `json:"tags"` - TargetCountry param.Field[string] `json:"targetCountry"` - TargetIndustry param.Field[string] `json:"targetIndustry"` + // Array of indicators for this event. Supports multiple indicators per event for + // complex scenarios. + Indicators param.Field[[]ThreatEventBulkNewParamsDataIndicator] `json:"indicators"` + IndicatorType param.Field[string] `json:"indicatorType"` + Insight param.Field[string] `json:"insight"` + Tags param.Field[[]string] `json:"tags"` + TargetCountry param.Field[string] `json:"targetCountry"` + TargetIndustry param.Field[string] `json:"targetIndustry"` } func (r ThreatEventBulkNewParamsData) MarshalJSON() (data []byte, err error) { @@ -622,6 +647,17 @@ func (r ThreatEventBulkNewParamsDataRaw) MarshalJSON() (data []byte, err error) return apijson.MarshalRoot(r) } +type ThreatEventBulkNewParamsDataIndicator struct { + // The type of indicator (e.g., DOMAIN, IP, JA3, HASH) + IndicatorType param.Field[string] `json:"indicatorType,required"` + // The indicator value (e.g., domain name, IP address, hash) + Value param.Field[string] `json:"value,required"` +} + +func (r ThreatEventBulkNewParamsDataIndicator) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + type ThreatEventEditParams struct { // Account ID. AccountID param.Field[string] `path:"account_id,required"` diff --git a/cloudforce_one/threatevent_test.go b/cloudforce_one/threatevent_test.go index fe0a91df2a5..f9157df735c 100644 --- a/cloudforce_one/threatevent_test.go +++ b/cloudforce_one/threatevent_test.go @@ -35,7 +35,6 @@ func TestThreatEventNewWithOptionalParams(t *testing.T) { Category: cloudflare.F("Domain Resolution"), Date: cloudflare.F(time.Now()), Event: cloudflare.F("An attacker registered the domain domain.com"), - IndicatorType: cloudflare.F("domain"), Raw: cloudflare.F(cloudforce_one.ThreatEventNewParamsRaw{ Data: cloudflare.F(map[string]interface{}{ "foo": "bar", @@ -49,10 +48,15 @@ func TestThreatEventNewWithOptionalParams(t *testing.T) { AttackerCountry: cloudflare.F("CN"), DatasetID: cloudflare.F("durableObjectName"), Indicator: cloudflare.F("domain.com"), - Insight: cloudflare.F("This domain was likely registered for phishing purposes"), - Tags: cloudflare.F([]string{"malware"}), - TargetCountry: cloudflare.F("US"), - TargetIndustry: cloudflare.F("Agriculture"), + Indicators: cloudflare.F([]cloudforce_one.ThreatEventNewParamsIndicator{{ + IndicatorType: cloudflare.F("domain"), + Value: cloudflare.F("malicious.com"), + }}), + IndicatorType: cloudflare.F("domain"), + Insight: cloudflare.F("This domain was likely registered for phishing purposes"), + Tags: cloudflare.F([]string{"malware"}), + TargetCountry: cloudflare.F("US"), + TargetIndustry: cloudflare.F("Agriculture"), }) if err != nil { var apierr *cloudflare.Error @@ -147,10 +151,9 @@ func TestThreatEventBulkNew(t *testing.T) { _, err := client.CloudforceOne.ThreatEvents.BulkNew(context.TODO(), cloudforce_one.ThreatEventBulkNewParams{ AccountID: cloudflare.F("account_id"), Data: cloudflare.F([]cloudforce_one.ThreatEventBulkNewParamsData{{ - Category: cloudflare.F("Domain Resolution"), - Date: cloudflare.F(time.Now()), - Event: cloudflare.F("An attacker registered the domain domain.com"), - IndicatorType: cloudflare.F("domain"), + Category: cloudflare.F("Domain Resolution"), + Date: cloudflare.F(time.Now()), + Event: cloudflare.F("An attacker registered the domain domain.com"), Raw: cloudflare.F(cloudforce_one.ThreatEventBulkNewParamsDataRaw{ Data: cloudflare.F(map[string]interface{}{ "foo": "bar", @@ -164,10 +167,15 @@ func TestThreatEventBulkNew(t *testing.T) { AttackerCountry: cloudflare.F("CN"), DatasetID: cloudflare.F("durableObjectName"), Indicator: cloudflare.F("domain.com"), - Insight: cloudflare.F("This domain was likely registered for phishing purposes"), - Tags: cloudflare.F([]string{"malware"}), - TargetCountry: cloudflare.F("US"), - TargetIndustry: cloudflare.F("Agriculture"), + Indicators: cloudflare.F([]cloudforce_one.ThreatEventBulkNewParamsDataIndicator{{ + IndicatorType: cloudflare.F("domain"), + Value: cloudflare.F("malicious.com"), + }}), + IndicatorType: cloudflare.F("domain"), + Insight: cloudflare.F("This domain was likely registered for phishing purposes"), + Tags: cloudflare.F([]string{"malware"}), + TargetCountry: cloudflare.F("US"), + TargetIndustry: cloudflare.F("Agriculture"), }}), DatasetID: cloudflare.F("durableObjectName"), }) diff --git a/email_security/investigate.go b/email_security/investigate.go index 03cd44cc24f..b9ff03dcf53 100644 --- a/email_security/investigate.go +++ b/email_security/investigate.go @@ -3,21 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "net/url" - "slices" - "time" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/packages/pagination" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateService contains methods and other services that help with @@ -52,837 +38,3 @@ func NewInvestigateService(opts ...option.RequestOption) (r *InvestigateService) r.Release = NewInvestigateReleaseService(opts...) return } - -// Returns information for each email that matches the search parameter(s). -func (r *InvestigateService) List(ctx context.Context, params InvestigateListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[InvestigateListResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate", params.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Returns information for each email that matches the search parameter(s). -func (r *InvestigateService) ListAutoPaging(ctx context.Context, params InvestigateListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[InvestigateListResponse] { - return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) -} - -// Get message details -func (r *InvestigateService) Get(ctx context.Context, postfixID string, query InvestigateGetParams, opts ...option.RequestOption) (res *InvestigateGetResponse, err error) { - var env InvestigateGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - if postfixID == "" { - err = errors.New("missing required postfix_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/%s", query.AccountID, postfixID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type InvestigateListResponse struct { - ID string `json:"id,required"` - ActionLog interface{} `json:"action_log,required"` - ClientRecipients []string `json:"client_recipients,required"` - DetectionReasons []string `json:"detection_reasons,required"` - IsPhishSubmission bool `json:"is_phish_submission,required"` - IsQuarantined bool `json:"is_quarantined,required"` - // The identifier of the message. - PostfixID string `json:"postfix_id,required"` - Properties InvestigateListResponseProperties `json:"properties,required"` - Ts string `json:"ts,required"` - AlertID string `json:"alert_id,nullable"` - DeliveryMode InvestigateListResponseDeliveryMode `json:"delivery_mode,nullable"` - EdfHash string `json:"edf_hash,nullable"` - FinalDisposition InvestigateListResponseFinalDisposition `json:"final_disposition,nullable"` - Findings []InvestigateListResponseFinding `json:"findings,nullable"` - From string `json:"from,nullable"` - FromName string `json:"from_name,nullable"` - HtmltextStructureHash string `json:"htmltext_structure_hash,nullable"` - MessageID string `json:"message_id,nullable"` - SentDate string `json:"sent_date,nullable"` - Subject string `json:"subject,nullable"` - ThreatCategories []string `json:"threat_categories,nullable"` - To []string `json:"to,nullable"` - ToName []string `json:"to_name,nullable"` - Validation InvestigateListResponseValidation `json:"validation,nullable"` - JSON investigateListResponseJSON `json:"-"` -} - -// investigateListResponseJSON contains the JSON metadata for the struct -// [InvestigateListResponse] -type investigateListResponseJSON struct { - ID apijson.Field - ActionLog apijson.Field - ClientRecipients apijson.Field - DetectionReasons apijson.Field - IsPhishSubmission apijson.Field - IsQuarantined apijson.Field - PostfixID apijson.Field - Properties apijson.Field - Ts apijson.Field - AlertID apijson.Field - DeliveryMode apijson.Field - EdfHash apijson.Field - FinalDisposition apijson.Field - Findings apijson.Field - From apijson.Field - FromName apijson.Field - HtmltextStructureHash apijson.Field - MessageID apijson.Field - SentDate apijson.Field - Subject apijson.Field - ThreatCategories apijson.Field - To apijson.Field - ToName apijson.Field - Validation apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateListResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigateListResponseProperties struct { - AllowlistedPattern string `json:"allowlisted_pattern"` - AllowlistedPatternType InvestigateListResponsePropertiesAllowlistedPatternType `json:"allowlisted_pattern_type"` - BlocklistedMessage bool `json:"blocklisted_message"` - BlocklistedPattern string `json:"blocklisted_pattern"` - WhitelistedPatternType InvestigateListResponsePropertiesWhitelistedPatternType `json:"whitelisted_pattern_type"` - JSON investigateListResponsePropertiesJSON `json:"-"` -} - -// investigateListResponsePropertiesJSON contains the JSON metadata for the struct -// [InvestigateListResponseProperties] -type investigateListResponsePropertiesJSON struct { - AllowlistedPattern apijson.Field - AllowlistedPatternType apijson.Field - BlocklistedMessage apijson.Field - BlocklistedPattern apijson.Field - WhitelistedPatternType apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateListResponseProperties) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateListResponsePropertiesJSON) RawJSON() string { - return r.raw -} - -type InvestigateListResponsePropertiesAllowlistedPatternType string - -const ( - InvestigateListResponsePropertiesAllowlistedPatternTypeQuarantineRelease InvestigateListResponsePropertiesAllowlistedPatternType = "quarantine_release" - InvestigateListResponsePropertiesAllowlistedPatternTypeAcceptableSender InvestigateListResponsePropertiesAllowlistedPatternType = "acceptable_sender" - InvestigateListResponsePropertiesAllowlistedPatternTypeAllowedSender InvestigateListResponsePropertiesAllowlistedPatternType = "allowed_sender" - InvestigateListResponsePropertiesAllowlistedPatternTypeAllowedRecipient InvestigateListResponsePropertiesAllowlistedPatternType = "allowed_recipient" - InvestigateListResponsePropertiesAllowlistedPatternTypeDomainSimilarity InvestigateListResponsePropertiesAllowlistedPatternType = "domain_similarity" - InvestigateListResponsePropertiesAllowlistedPatternTypeDomainRecency InvestigateListResponsePropertiesAllowlistedPatternType = "domain_recency" - InvestigateListResponsePropertiesAllowlistedPatternTypeManagedAcceptableSender InvestigateListResponsePropertiesAllowlistedPatternType = "managed_acceptable_sender" - InvestigateListResponsePropertiesAllowlistedPatternTypeOutboundNdr InvestigateListResponsePropertiesAllowlistedPatternType = "outbound_ndr" -) - -func (r InvestigateListResponsePropertiesAllowlistedPatternType) IsKnown() bool { - switch r { - case InvestigateListResponsePropertiesAllowlistedPatternTypeQuarantineRelease, InvestigateListResponsePropertiesAllowlistedPatternTypeAcceptableSender, InvestigateListResponsePropertiesAllowlistedPatternTypeAllowedSender, InvestigateListResponsePropertiesAllowlistedPatternTypeAllowedRecipient, InvestigateListResponsePropertiesAllowlistedPatternTypeDomainSimilarity, InvestigateListResponsePropertiesAllowlistedPatternTypeDomainRecency, InvestigateListResponsePropertiesAllowlistedPatternTypeManagedAcceptableSender, InvestigateListResponsePropertiesAllowlistedPatternTypeOutboundNdr: - return true - } - return false -} - -type InvestigateListResponsePropertiesWhitelistedPatternType string - -const ( - InvestigateListResponsePropertiesWhitelistedPatternTypeQuarantineRelease InvestigateListResponsePropertiesWhitelistedPatternType = "quarantine_release" - InvestigateListResponsePropertiesWhitelistedPatternTypeAcceptableSender InvestigateListResponsePropertiesWhitelistedPatternType = "acceptable_sender" - InvestigateListResponsePropertiesWhitelistedPatternTypeAllowedSender InvestigateListResponsePropertiesWhitelistedPatternType = "allowed_sender" - InvestigateListResponsePropertiesWhitelistedPatternTypeAllowedRecipient InvestigateListResponsePropertiesWhitelistedPatternType = "allowed_recipient" - InvestigateListResponsePropertiesWhitelistedPatternTypeDomainSimilarity InvestigateListResponsePropertiesWhitelistedPatternType = "domain_similarity" - InvestigateListResponsePropertiesWhitelistedPatternTypeDomainRecency InvestigateListResponsePropertiesWhitelistedPatternType = "domain_recency" - InvestigateListResponsePropertiesWhitelistedPatternTypeManagedAcceptableSender InvestigateListResponsePropertiesWhitelistedPatternType = "managed_acceptable_sender" - InvestigateListResponsePropertiesWhitelistedPatternTypeOutboundNdr InvestigateListResponsePropertiesWhitelistedPatternType = "outbound_ndr" -) - -func (r InvestigateListResponsePropertiesWhitelistedPatternType) IsKnown() bool { - switch r { - case InvestigateListResponsePropertiesWhitelistedPatternTypeQuarantineRelease, InvestigateListResponsePropertiesWhitelistedPatternTypeAcceptableSender, InvestigateListResponsePropertiesWhitelistedPatternTypeAllowedSender, InvestigateListResponsePropertiesWhitelistedPatternTypeAllowedRecipient, InvestigateListResponsePropertiesWhitelistedPatternTypeDomainSimilarity, InvestigateListResponsePropertiesWhitelistedPatternTypeDomainRecency, InvestigateListResponsePropertiesWhitelistedPatternTypeManagedAcceptableSender, InvestigateListResponsePropertiesWhitelistedPatternTypeOutboundNdr: - return true - } - return false -} - -type InvestigateListResponseDeliveryMode string - -const ( - InvestigateListResponseDeliveryModeDirect InvestigateListResponseDeliveryMode = "DIRECT" - InvestigateListResponseDeliveryModeBcc InvestigateListResponseDeliveryMode = "BCC" - InvestigateListResponseDeliveryModeJournal InvestigateListResponseDeliveryMode = "JOURNAL" - InvestigateListResponseDeliveryModeReviewSubmission InvestigateListResponseDeliveryMode = "REVIEW_SUBMISSION" - InvestigateListResponseDeliveryModeDMARCUnverified InvestigateListResponseDeliveryMode = "DMARC_UNVERIFIED" - InvestigateListResponseDeliveryModeDMARCFailureReport InvestigateListResponseDeliveryMode = "DMARC_FAILURE_REPORT" - InvestigateListResponseDeliveryModeDMARCAggregateReport InvestigateListResponseDeliveryMode = "DMARC_AGGREGATE_REPORT" - InvestigateListResponseDeliveryModeThreatIntelSubmission InvestigateListResponseDeliveryMode = "THREAT_INTEL_SUBMISSION" - InvestigateListResponseDeliveryModeSimulationSubmission InvestigateListResponseDeliveryMode = "SIMULATION_SUBMISSION" - InvestigateListResponseDeliveryModeAPI InvestigateListResponseDeliveryMode = "API" - InvestigateListResponseDeliveryModeRetroScan InvestigateListResponseDeliveryMode = "RETRO_SCAN" -) - -func (r InvestigateListResponseDeliveryMode) IsKnown() bool { - switch r { - case InvestigateListResponseDeliveryModeDirect, InvestigateListResponseDeliveryModeBcc, InvestigateListResponseDeliveryModeJournal, InvestigateListResponseDeliveryModeReviewSubmission, InvestigateListResponseDeliveryModeDMARCUnverified, InvestigateListResponseDeliveryModeDMARCFailureReport, InvestigateListResponseDeliveryModeDMARCAggregateReport, InvestigateListResponseDeliveryModeThreatIntelSubmission, InvestigateListResponseDeliveryModeSimulationSubmission, InvestigateListResponseDeliveryModeAPI, InvestigateListResponseDeliveryModeRetroScan: - return true - } - return false -} - -type InvestigateListResponseFinalDisposition string - -const ( - InvestigateListResponseFinalDispositionMalicious InvestigateListResponseFinalDisposition = "MALICIOUS" - InvestigateListResponseFinalDispositionMaliciousBec InvestigateListResponseFinalDisposition = "MALICIOUS-BEC" - InvestigateListResponseFinalDispositionSuspicious InvestigateListResponseFinalDisposition = "SUSPICIOUS" - InvestigateListResponseFinalDispositionSpoof InvestigateListResponseFinalDisposition = "SPOOF" - InvestigateListResponseFinalDispositionSpam InvestigateListResponseFinalDisposition = "SPAM" - InvestigateListResponseFinalDispositionBulk InvestigateListResponseFinalDisposition = "BULK" - InvestigateListResponseFinalDispositionEncrypted InvestigateListResponseFinalDisposition = "ENCRYPTED" - InvestigateListResponseFinalDispositionExternal InvestigateListResponseFinalDisposition = "EXTERNAL" - InvestigateListResponseFinalDispositionUnknown InvestigateListResponseFinalDisposition = "UNKNOWN" - InvestigateListResponseFinalDispositionNone InvestigateListResponseFinalDisposition = "NONE" -) - -func (r InvestigateListResponseFinalDisposition) IsKnown() bool { - switch r { - case InvestigateListResponseFinalDispositionMalicious, InvestigateListResponseFinalDispositionMaliciousBec, InvestigateListResponseFinalDispositionSuspicious, InvestigateListResponseFinalDispositionSpoof, InvestigateListResponseFinalDispositionSpam, InvestigateListResponseFinalDispositionBulk, InvestigateListResponseFinalDispositionEncrypted, InvestigateListResponseFinalDispositionExternal, InvestigateListResponseFinalDispositionUnknown, InvestigateListResponseFinalDispositionNone: - return true - } - return false -} - -type InvestigateListResponseFinding struct { - Attachment string `json:"attachment,nullable"` - Detail string `json:"detail,nullable"` - Detection InvestigateListResponseFindingsDetection `json:"detection,nullable"` - Field string `json:"field,nullable"` - Name string `json:"name,nullable"` - Portion string `json:"portion,nullable"` - Reason string `json:"reason,nullable"` - Score float64 `json:"score,nullable"` - Value string `json:"value,nullable"` - JSON investigateListResponseFindingJSON `json:"-"` -} - -// investigateListResponseFindingJSON contains the JSON metadata for the struct -// [InvestigateListResponseFinding] -type investigateListResponseFindingJSON struct { - Attachment apijson.Field - Detail apijson.Field - Detection apijson.Field - Field apijson.Field - Name apijson.Field - Portion apijson.Field - Reason apijson.Field - Score apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateListResponseFinding) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateListResponseFindingJSON) RawJSON() string { - return r.raw -} - -type InvestigateListResponseFindingsDetection string - -const ( - InvestigateListResponseFindingsDetectionMalicious InvestigateListResponseFindingsDetection = "MALICIOUS" - InvestigateListResponseFindingsDetectionMaliciousBec InvestigateListResponseFindingsDetection = "MALICIOUS-BEC" - InvestigateListResponseFindingsDetectionSuspicious InvestigateListResponseFindingsDetection = "SUSPICIOUS" - InvestigateListResponseFindingsDetectionSpoof InvestigateListResponseFindingsDetection = "SPOOF" - InvestigateListResponseFindingsDetectionSpam InvestigateListResponseFindingsDetection = "SPAM" - InvestigateListResponseFindingsDetectionBulk InvestigateListResponseFindingsDetection = "BULK" - InvestigateListResponseFindingsDetectionEncrypted InvestigateListResponseFindingsDetection = "ENCRYPTED" - InvestigateListResponseFindingsDetectionExternal InvestigateListResponseFindingsDetection = "EXTERNAL" - InvestigateListResponseFindingsDetectionUnknown InvestigateListResponseFindingsDetection = "UNKNOWN" - InvestigateListResponseFindingsDetectionNone InvestigateListResponseFindingsDetection = "NONE" -) - -func (r InvestigateListResponseFindingsDetection) IsKnown() bool { - switch r { - case InvestigateListResponseFindingsDetectionMalicious, InvestigateListResponseFindingsDetectionMaliciousBec, InvestigateListResponseFindingsDetectionSuspicious, InvestigateListResponseFindingsDetectionSpoof, InvestigateListResponseFindingsDetectionSpam, InvestigateListResponseFindingsDetectionBulk, InvestigateListResponseFindingsDetectionEncrypted, InvestigateListResponseFindingsDetectionExternal, InvestigateListResponseFindingsDetectionUnknown, InvestigateListResponseFindingsDetectionNone: - return true - } - return false -} - -type InvestigateListResponseValidation struct { - Comment string `json:"comment,nullable"` - DKIM InvestigateListResponseValidationDKIM `json:"dkim,nullable"` - DMARC InvestigateListResponseValidationDMARC `json:"dmarc,nullable"` - SPF InvestigateListResponseValidationSPF `json:"spf,nullable"` - JSON investigateListResponseValidationJSON `json:"-"` -} - -// investigateListResponseValidationJSON contains the JSON metadata for the struct -// [InvestigateListResponseValidation] -type investigateListResponseValidationJSON struct { - Comment apijson.Field - DKIM apijson.Field - DMARC apijson.Field - SPF apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateListResponseValidation) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateListResponseValidationJSON) RawJSON() string { - return r.raw -} - -type InvestigateListResponseValidationDKIM string - -const ( - InvestigateListResponseValidationDKIMPass InvestigateListResponseValidationDKIM = "pass" - InvestigateListResponseValidationDKIMNeutral InvestigateListResponseValidationDKIM = "neutral" - InvestigateListResponseValidationDKIMFail InvestigateListResponseValidationDKIM = "fail" - InvestigateListResponseValidationDKIMError InvestigateListResponseValidationDKIM = "error" - InvestigateListResponseValidationDKIMNone InvestigateListResponseValidationDKIM = "none" -) - -func (r InvestigateListResponseValidationDKIM) IsKnown() bool { - switch r { - case InvestigateListResponseValidationDKIMPass, InvestigateListResponseValidationDKIMNeutral, InvestigateListResponseValidationDKIMFail, InvestigateListResponseValidationDKIMError, InvestigateListResponseValidationDKIMNone: - return true - } - return false -} - -type InvestigateListResponseValidationDMARC string - -const ( - InvestigateListResponseValidationDMARCPass InvestigateListResponseValidationDMARC = "pass" - InvestigateListResponseValidationDMARCNeutral InvestigateListResponseValidationDMARC = "neutral" - InvestigateListResponseValidationDMARCFail InvestigateListResponseValidationDMARC = "fail" - InvestigateListResponseValidationDMARCError InvestigateListResponseValidationDMARC = "error" - InvestigateListResponseValidationDMARCNone InvestigateListResponseValidationDMARC = "none" -) - -func (r InvestigateListResponseValidationDMARC) IsKnown() bool { - switch r { - case InvestigateListResponseValidationDMARCPass, InvestigateListResponseValidationDMARCNeutral, InvestigateListResponseValidationDMARCFail, InvestigateListResponseValidationDMARCError, InvestigateListResponseValidationDMARCNone: - return true - } - return false -} - -type InvestigateListResponseValidationSPF string - -const ( - InvestigateListResponseValidationSPFPass InvestigateListResponseValidationSPF = "pass" - InvestigateListResponseValidationSPFNeutral InvestigateListResponseValidationSPF = "neutral" - InvestigateListResponseValidationSPFFail InvestigateListResponseValidationSPF = "fail" - InvestigateListResponseValidationSPFError InvestigateListResponseValidationSPF = "error" - InvestigateListResponseValidationSPFNone InvestigateListResponseValidationSPF = "none" -) - -func (r InvestigateListResponseValidationSPF) IsKnown() bool { - switch r { - case InvestigateListResponseValidationSPFPass, InvestigateListResponseValidationSPFNeutral, InvestigateListResponseValidationSPFFail, InvestigateListResponseValidationSPFError, InvestigateListResponseValidationSPFNone: - return true - } - return false -} - -type InvestigateGetResponse struct { - ID string `json:"id,required"` - ActionLog interface{} `json:"action_log,required"` - ClientRecipients []string `json:"client_recipients,required"` - DetectionReasons []string `json:"detection_reasons,required"` - IsPhishSubmission bool `json:"is_phish_submission,required"` - IsQuarantined bool `json:"is_quarantined,required"` - // The identifier of the message. - PostfixID string `json:"postfix_id,required"` - Properties InvestigateGetResponseProperties `json:"properties,required"` - Ts string `json:"ts,required"` - AlertID string `json:"alert_id,nullable"` - DeliveryMode InvestigateGetResponseDeliveryMode `json:"delivery_mode,nullable"` - EdfHash string `json:"edf_hash,nullable"` - FinalDisposition InvestigateGetResponseFinalDisposition `json:"final_disposition,nullable"` - Findings []InvestigateGetResponseFinding `json:"findings,nullable"` - From string `json:"from,nullable"` - FromName string `json:"from_name,nullable"` - HtmltextStructureHash string `json:"htmltext_structure_hash,nullable"` - MessageID string `json:"message_id,nullable"` - SentDate string `json:"sent_date,nullable"` - Subject string `json:"subject,nullable"` - ThreatCategories []string `json:"threat_categories,nullable"` - To []string `json:"to,nullable"` - ToName []string `json:"to_name,nullable"` - Validation InvestigateGetResponseValidation `json:"validation,nullable"` - JSON investigateGetResponseJSON `json:"-"` -} - -// investigateGetResponseJSON contains the JSON metadata for the struct -// [InvestigateGetResponse] -type investigateGetResponseJSON struct { - ID apijson.Field - ActionLog apijson.Field - ClientRecipients apijson.Field - DetectionReasons apijson.Field - IsPhishSubmission apijson.Field - IsQuarantined apijson.Field - PostfixID apijson.Field - Properties apijson.Field - Ts apijson.Field - AlertID apijson.Field - DeliveryMode apijson.Field - EdfHash apijson.Field - FinalDisposition apijson.Field - Findings apijson.Field - From apijson.Field - FromName apijson.Field - HtmltextStructureHash apijson.Field - MessageID apijson.Field - SentDate apijson.Field - Subject apijson.Field - ThreatCategories apijson.Field - To apijson.Field - ToName apijson.Field - Validation apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateGetResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigateGetResponseProperties struct { - AllowlistedPattern string `json:"allowlisted_pattern"` - AllowlistedPatternType InvestigateGetResponsePropertiesAllowlistedPatternType `json:"allowlisted_pattern_type"` - BlocklistedMessage bool `json:"blocklisted_message"` - BlocklistedPattern string `json:"blocklisted_pattern"` - WhitelistedPatternType InvestigateGetResponsePropertiesWhitelistedPatternType `json:"whitelisted_pattern_type"` - JSON investigateGetResponsePropertiesJSON `json:"-"` -} - -// investigateGetResponsePropertiesJSON contains the JSON metadata for the struct -// [InvestigateGetResponseProperties] -type investigateGetResponsePropertiesJSON struct { - AllowlistedPattern apijson.Field - AllowlistedPatternType apijson.Field - BlocklistedMessage apijson.Field - BlocklistedPattern apijson.Field - WhitelistedPatternType apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateGetResponseProperties) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateGetResponsePropertiesJSON) RawJSON() string { - return r.raw -} - -type InvestigateGetResponsePropertiesAllowlistedPatternType string - -const ( - InvestigateGetResponsePropertiesAllowlistedPatternTypeQuarantineRelease InvestigateGetResponsePropertiesAllowlistedPatternType = "quarantine_release" - InvestigateGetResponsePropertiesAllowlistedPatternTypeAcceptableSender InvestigateGetResponsePropertiesAllowlistedPatternType = "acceptable_sender" - InvestigateGetResponsePropertiesAllowlistedPatternTypeAllowedSender InvestigateGetResponsePropertiesAllowlistedPatternType = "allowed_sender" - InvestigateGetResponsePropertiesAllowlistedPatternTypeAllowedRecipient InvestigateGetResponsePropertiesAllowlistedPatternType = "allowed_recipient" - InvestigateGetResponsePropertiesAllowlistedPatternTypeDomainSimilarity InvestigateGetResponsePropertiesAllowlistedPatternType = "domain_similarity" - InvestigateGetResponsePropertiesAllowlistedPatternTypeDomainRecency InvestigateGetResponsePropertiesAllowlistedPatternType = "domain_recency" - InvestigateGetResponsePropertiesAllowlistedPatternTypeManagedAcceptableSender InvestigateGetResponsePropertiesAllowlistedPatternType = "managed_acceptable_sender" - InvestigateGetResponsePropertiesAllowlistedPatternTypeOutboundNdr InvestigateGetResponsePropertiesAllowlistedPatternType = "outbound_ndr" -) - -func (r InvestigateGetResponsePropertiesAllowlistedPatternType) IsKnown() bool { - switch r { - case InvestigateGetResponsePropertiesAllowlistedPatternTypeQuarantineRelease, InvestigateGetResponsePropertiesAllowlistedPatternTypeAcceptableSender, InvestigateGetResponsePropertiesAllowlistedPatternTypeAllowedSender, InvestigateGetResponsePropertiesAllowlistedPatternTypeAllowedRecipient, InvestigateGetResponsePropertiesAllowlistedPatternTypeDomainSimilarity, InvestigateGetResponsePropertiesAllowlistedPatternTypeDomainRecency, InvestigateGetResponsePropertiesAllowlistedPatternTypeManagedAcceptableSender, InvestigateGetResponsePropertiesAllowlistedPatternTypeOutboundNdr: - return true - } - return false -} - -type InvestigateGetResponsePropertiesWhitelistedPatternType string - -const ( - InvestigateGetResponsePropertiesWhitelistedPatternTypeQuarantineRelease InvestigateGetResponsePropertiesWhitelistedPatternType = "quarantine_release" - InvestigateGetResponsePropertiesWhitelistedPatternTypeAcceptableSender InvestigateGetResponsePropertiesWhitelistedPatternType = "acceptable_sender" - InvestigateGetResponsePropertiesWhitelistedPatternTypeAllowedSender InvestigateGetResponsePropertiesWhitelistedPatternType = "allowed_sender" - InvestigateGetResponsePropertiesWhitelistedPatternTypeAllowedRecipient InvestigateGetResponsePropertiesWhitelistedPatternType = "allowed_recipient" - InvestigateGetResponsePropertiesWhitelistedPatternTypeDomainSimilarity InvestigateGetResponsePropertiesWhitelistedPatternType = "domain_similarity" - InvestigateGetResponsePropertiesWhitelistedPatternTypeDomainRecency InvestigateGetResponsePropertiesWhitelistedPatternType = "domain_recency" - InvestigateGetResponsePropertiesWhitelistedPatternTypeManagedAcceptableSender InvestigateGetResponsePropertiesWhitelistedPatternType = "managed_acceptable_sender" - InvestigateGetResponsePropertiesWhitelistedPatternTypeOutboundNdr InvestigateGetResponsePropertiesWhitelistedPatternType = "outbound_ndr" -) - -func (r InvestigateGetResponsePropertiesWhitelistedPatternType) IsKnown() bool { - switch r { - case InvestigateGetResponsePropertiesWhitelistedPatternTypeQuarantineRelease, InvestigateGetResponsePropertiesWhitelistedPatternTypeAcceptableSender, InvestigateGetResponsePropertiesWhitelistedPatternTypeAllowedSender, InvestigateGetResponsePropertiesWhitelistedPatternTypeAllowedRecipient, InvestigateGetResponsePropertiesWhitelistedPatternTypeDomainSimilarity, InvestigateGetResponsePropertiesWhitelistedPatternTypeDomainRecency, InvestigateGetResponsePropertiesWhitelistedPatternTypeManagedAcceptableSender, InvestigateGetResponsePropertiesWhitelistedPatternTypeOutboundNdr: - return true - } - return false -} - -type InvestigateGetResponseDeliveryMode string - -const ( - InvestigateGetResponseDeliveryModeDirect InvestigateGetResponseDeliveryMode = "DIRECT" - InvestigateGetResponseDeliveryModeBcc InvestigateGetResponseDeliveryMode = "BCC" - InvestigateGetResponseDeliveryModeJournal InvestigateGetResponseDeliveryMode = "JOURNAL" - InvestigateGetResponseDeliveryModeReviewSubmission InvestigateGetResponseDeliveryMode = "REVIEW_SUBMISSION" - InvestigateGetResponseDeliveryModeDMARCUnverified InvestigateGetResponseDeliveryMode = "DMARC_UNVERIFIED" - InvestigateGetResponseDeliveryModeDMARCFailureReport InvestigateGetResponseDeliveryMode = "DMARC_FAILURE_REPORT" - InvestigateGetResponseDeliveryModeDMARCAggregateReport InvestigateGetResponseDeliveryMode = "DMARC_AGGREGATE_REPORT" - InvestigateGetResponseDeliveryModeThreatIntelSubmission InvestigateGetResponseDeliveryMode = "THREAT_INTEL_SUBMISSION" - InvestigateGetResponseDeliveryModeSimulationSubmission InvestigateGetResponseDeliveryMode = "SIMULATION_SUBMISSION" - InvestigateGetResponseDeliveryModeAPI InvestigateGetResponseDeliveryMode = "API" - InvestigateGetResponseDeliveryModeRetroScan InvestigateGetResponseDeliveryMode = "RETRO_SCAN" -) - -func (r InvestigateGetResponseDeliveryMode) IsKnown() bool { - switch r { - case InvestigateGetResponseDeliveryModeDirect, InvestigateGetResponseDeliveryModeBcc, InvestigateGetResponseDeliveryModeJournal, InvestigateGetResponseDeliveryModeReviewSubmission, InvestigateGetResponseDeliveryModeDMARCUnverified, InvestigateGetResponseDeliveryModeDMARCFailureReport, InvestigateGetResponseDeliveryModeDMARCAggregateReport, InvestigateGetResponseDeliveryModeThreatIntelSubmission, InvestigateGetResponseDeliveryModeSimulationSubmission, InvestigateGetResponseDeliveryModeAPI, InvestigateGetResponseDeliveryModeRetroScan: - return true - } - return false -} - -type InvestigateGetResponseFinalDisposition string - -const ( - InvestigateGetResponseFinalDispositionMalicious InvestigateGetResponseFinalDisposition = "MALICIOUS" - InvestigateGetResponseFinalDispositionMaliciousBec InvestigateGetResponseFinalDisposition = "MALICIOUS-BEC" - InvestigateGetResponseFinalDispositionSuspicious InvestigateGetResponseFinalDisposition = "SUSPICIOUS" - InvestigateGetResponseFinalDispositionSpoof InvestigateGetResponseFinalDisposition = "SPOOF" - InvestigateGetResponseFinalDispositionSpam InvestigateGetResponseFinalDisposition = "SPAM" - InvestigateGetResponseFinalDispositionBulk InvestigateGetResponseFinalDisposition = "BULK" - InvestigateGetResponseFinalDispositionEncrypted InvestigateGetResponseFinalDisposition = "ENCRYPTED" - InvestigateGetResponseFinalDispositionExternal InvestigateGetResponseFinalDisposition = "EXTERNAL" - InvestigateGetResponseFinalDispositionUnknown InvestigateGetResponseFinalDisposition = "UNKNOWN" - InvestigateGetResponseFinalDispositionNone InvestigateGetResponseFinalDisposition = "NONE" -) - -func (r InvestigateGetResponseFinalDisposition) IsKnown() bool { - switch r { - case InvestigateGetResponseFinalDispositionMalicious, InvestigateGetResponseFinalDispositionMaliciousBec, InvestigateGetResponseFinalDispositionSuspicious, InvestigateGetResponseFinalDispositionSpoof, InvestigateGetResponseFinalDispositionSpam, InvestigateGetResponseFinalDispositionBulk, InvestigateGetResponseFinalDispositionEncrypted, InvestigateGetResponseFinalDispositionExternal, InvestigateGetResponseFinalDispositionUnknown, InvestigateGetResponseFinalDispositionNone: - return true - } - return false -} - -type InvestigateGetResponseFinding struct { - Attachment string `json:"attachment,nullable"` - Detail string `json:"detail,nullable"` - Detection InvestigateGetResponseFindingsDetection `json:"detection,nullable"` - Field string `json:"field,nullable"` - Name string `json:"name,nullable"` - Portion string `json:"portion,nullable"` - Reason string `json:"reason,nullable"` - Score float64 `json:"score,nullable"` - Value string `json:"value,nullable"` - JSON investigateGetResponseFindingJSON `json:"-"` -} - -// investigateGetResponseFindingJSON contains the JSON metadata for the struct -// [InvestigateGetResponseFinding] -type investigateGetResponseFindingJSON struct { - Attachment apijson.Field - Detail apijson.Field - Detection apijson.Field - Field apijson.Field - Name apijson.Field - Portion apijson.Field - Reason apijson.Field - Score apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateGetResponseFinding) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateGetResponseFindingJSON) RawJSON() string { - return r.raw -} - -type InvestigateGetResponseFindingsDetection string - -const ( - InvestigateGetResponseFindingsDetectionMalicious InvestigateGetResponseFindingsDetection = "MALICIOUS" - InvestigateGetResponseFindingsDetectionMaliciousBec InvestigateGetResponseFindingsDetection = "MALICIOUS-BEC" - InvestigateGetResponseFindingsDetectionSuspicious InvestigateGetResponseFindingsDetection = "SUSPICIOUS" - InvestigateGetResponseFindingsDetectionSpoof InvestigateGetResponseFindingsDetection = "SPOOF" - InvestigateGetResponseFindingsDetectionSpam InvestigateGetResponseFindingsDetection = "SPAM" - InvestigateGetResponseFindingsDetectionBulk InvestigateGetResponseFindingsDetection = "BULK" - InvestigateGetResponseFindingsDetectionEncrypted InvestigateGetResponseFindingsDetection = "ENCRYPTED" - InvestigateGetResponseFindingsDetectionExternal InvestigateGetResponseFindingsDetection = "EXTERNAL" - InvestigateGetResponseFindingsDetectionUnknown InvestigateGetResponseFindingsDetection = "UNKNOWN" - InvestigateGetResponseFindingsDetectionNone InvestigateGetResponseFindingsDetection = "NONE" -) - -func (r InvestigateGetResponseFindingsDetection) IsKnown() bool { - switch r { - case InvestigateGetResponseFindingsDetectionMalicious, InvestigateGetResponseFindingsDetectionMaliciousBec, InvestigateGetResponseFindingsDetectionSuspicious, InvestigateGetResponseFindingsDetectionSpoof, InvestigateGetResponseFindingsDetectionSpam, InvestigateGetResponseFindingsDetectionBulk, InvestigateGetResponseFindingsDetectionEncrypted, InvestigateGetResponseFindingsDetectionExternal, InvestigateGetResponseFindingsDetectionUnknown, InvestigateGetResponseFindingsDetectionNone: - return true - } - return false -} - -type InvestigateGetResponseValidation struct { - Comment string `json:"comment,nullable"` - DKIM InvestigateGetResponseValidationDKIM `json:"dkim,nullable"` - DMARC InvestigateGetResponseValidationDMARC `json:"dmarc,nullable"` - SPF InvestigateGetResponseValidationSPF `json:"spf,nullable"` - JSON investigateGetResponseValidationJSON `json:"-"` -} - -// investigateGetResponseValidationJSON contains the JSON metadata for the struct -// [InvestigateGetResponseValidation] -type investigateGetResponseValidationJSON struct { - Comment apijson.Field - DKIM apijson.Field - DMARC apijson.Field - SPF apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateGetResponseValidation) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateGetResponseValidationJSON) RawJSON() string { - return r.raw -} - -type InvestigateGetResponseValidationDKIM string - -const ( - InvestigateGetResponseValidationDKIMPass InvestigateGetResponseValidationDKIM = "pass" - InvestigateGetResponseValidationDKIMNeutral InvestigateGetResponseValidationDKIM = "neutral" - InvestigateGetResponseValidationDKIMFail InvestigateGetResponseValidationDKIM = "fail" - InvestigateGetResponseValidationDKIMError InvestigateGetResponseValidationDKIM = "error" - InvestigateGetResponseValidationDKIMNone InvestigateGetResponseValidationDKIM = "none" -) - -func (r InvestigateGetResponseValidationDKIM) IsKnown() bool { - switch r { - case InvestigateGetResponseValidationDKIMPass, InvestigateGetResponseValidationDKIMNeutral, InvestigateGetResponseValidationDKIMFail, InvestigateGetResponseValidationDKIMError, InvestigateGetResponseValidationDKIMNone: - return true - } - return false -} - -type InvestigateGetResponseValidationDMARC string - -const ( - InvestigateGetResponseValidationDMARCPass InvestigateGetResponseValidationDMARC = "pass" - InvestigateGetResponseValidationDMARCNeutral InvestigateGetResponseValidationDMARC = "neutral" - InvestigateGetResponseValidationDMARCFail InvestigateGetResponseValidationDMARC = "fail" - InvestigateGetResponseValidationDMARCError InvestigateGetResponseValidationDMARC = "error" - InvestigateGetResponseValidationDMARCNone InvestigateGetResponseValidationDMARC = "none" -) - -func (r InvestigateGetResponseValidationDMARC) IsKnown() bool { - switch r { - case InvestigateGetResponseValidationDMARCPass, InvestigateGetResponseValidationDMARCNeutral, InvestigateGetResponseValidationDMARCFail, InvestigateGetResponseValidationDMARCError, InvestigateGetResponseValidationDMARCNone: - return true - } - return false -} - -type InvestigateGetResponseValidationSPF string - -const ( - InvestigateGetResponseValidationSPFPass InvestigateGetResponseValidationSPF = "pass" - InvestigateGetResponseValidationSPFNeutral InvestigateGetResponseValidationSPF = "neutral" - InvestigateGetResponseValidationSPFFail InvestigateGetResponseValidationSPF = "fail" - InvestigateGetResponseValidationSPFError InvestigateGetResponseValidationSPF = "error" - InvestigateGetResponseValidationSPFNone InvestigateGetResponseValidationSPF = "none" -) - -func (r InvestigateGetResponseValidationSPF) IsKnown() bool { - switch r { - case InvestigateGetResponseValidationSPFPass, InvestigateGetResponseValidationSPFNeutral, InvestigateGetResponseValidationSPFFail, InvestigateGetResponseValidationSPFError, InvestigateGetResponseValidationSPFNone: - return true - } - return false -} - -type InvestigateListParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // Determines if the message action log is included in the response. - ActionLog param.Field[bool] `query:"action_log"` - AlertID param.Field[string] `query:"alert_id"` - Cursor param.Field[string] `query:"cursor"` - // Determines if the search results will include detections or not. - DetectionsOnly param.Field[bool] `query:"detections_only"` - // The sender domains the search filters by. - Domain param.Field[string] `query:"domain"` - // The end of the search date range. Defaults to `now`. - End param.Field[time.Time] `query:"end" format:"date-time"` - // The dispositions the search filters by. - FinalDisposition param.Field[InvestigateListParamsFinalDisposition] `query:"final_disposition"` - // The message actions the search filters by. - MessageAction param.Field[InvestigateListParamsMessageAction] `query:"message_action"` - MessageID param.Field[string] `query:"message_id"` - Metric param.Field[string] `query:"metric"` - // Deprecated: Use cursor pagination instead. - Page param.Field[int64] `query:"page"` - // The number of results per page. - PerPage param.Field[int64] `query:"per_page"` - // The space-delimited term used in the query. The search is case-insensitive. - // - // The content of the following email metadata fields are searched: - // - // - alert_id - // - CC - // - From (envelope_from) - // - From Name - // - final_disposition - // - md5 hash (of any attachment) - // - sha1 hash (of any attachment) - // - sha256 hash (of any attachment) - // - name (of any attachment) - // - Reason - // - Received DateTime (yyyy-mm-ddThh:mm:ss) - // - Sent DateTime (yyyy-mm-ddThh:mm:ss) - // - ReplyTo - // - To (envelope_to) - // - To Name - // - Message-ID - // - smtp_helo_server_ip - // - smtp_previous_hop_ip - // - x_originating_ip - // - Subject - Query param.Field[string] `query:"query"` - Recipient param.Field[string] `query:"recipient"` - Sender param.Field[string] `query:"sender"` - // The beginning of the search date range. Defaults to `now - 30 days`. - Start param.Field[time.Time] `query:"start" format:"date-time"` - Subject param.Field[string] `query:"subject"` -} - -// URLQuery serializes [InvestigateListParams]'s query parameters as `url.Values`. -func (r InvestigateListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatDots, - }) -} - -// The dispositions the search filters by. -type InvestigateListParamsFinalDisposition string - -const ( - InvestigateListParamsFinalDispositionMalicious InvestigateListParamsFinalDisposition = "MALICIOUS" - InvestigateListParamsFinalDispositionSuspicious InvestigateListParamsFinalDisposition = "SUSPICIOUS" - InvestigateListParamsFinalDispositionSpoof InvestigateListParamsFinalDisposition = "SPOOF" - InvestigateListParamsFinalDispositionSpam InvestigateListParamsFinalDisposition = "SPAM" - InvestigateListParamsFinalDispositionBulk InvestigateListParamsFinalDisposition = "BULK" - InvestigateListParamsFinalDispositionNone InvestigateListParamsFinalDisposition = "NONE" -) - -func (r InvestigateListParamsFinalDisposition) IsKnown() bool { - switch r { - case InvestigateListParamsFinalDispositionMalicious, InvestigateListParamsFinalDispositionSuspicious, InvestigateListParamsFinalDispositionSpoof, InvestigateListParamsFinalDispositionSpam, InvestigateListParamsFinalDispositionBulk, InvestigateListParamsFinalDispositionNone: - return true - } - return false -} - -// The message actions the search filters by. -type InvestigateListParamsMessageAction string - -const ( - InvestigateListParamsMessageActionPreview InvestigateListParamsMessageAction = "PREVIEW" - InvestigateListParamsMessageActionQuarantineReleased InvestigateListParamsMessageAction = "QUARANTINE_RELEASED" - InvestigateListParamsMessageActionMoved InvestigateListParamsMessageAction = "MOVED" -) - -func (r InvestigateListParamsMessageAction) IsKnown() bool { - switch r { - case InvestigateListParamsMessageActionPreview, InvestigateListParamsMessageActionQuarantineReleased, InvestigateListParamsMessageActionMoved: - return true - } - return false -} - -type InvestigateGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type InvestigateGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result InvestigateGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON investigateGetResponseEnvelopeJSON `json:"-"` -} - -// investigateGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [InvestigateGetResponseEnvelope] -type investigateGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/investigate_test.go b/email_security/investigate_test.go deleted file mode 100644 index 8ad43fa8bc5..00000000000 --- a/email_security/investigate_test.go +++ /dev/null @@ -1,87 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - "time" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestInvestigateListWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.List(context.TODO(), email_security.InvestigateListParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - ActionLog: cloudflare.F(true), - AlertID: cloudflare.F("alert_id"), - Cursor: cloudflare.F("cursor"), - DetectionsOnly: cloudflare.F(true), - Domain: cloudflare.F("domain"), - End: cloudflare.F(time.Now()), - FinalDisposition: cloudflare.F(email_security.InvestigateListParamsFinalDispositionMalicious), - MessageAction: cloudflare.F(email_security.InvestigateListParamsMessageActionPreview), - MessageID: cloudflare.F("message_id"), - Metric: cloudflare.F("metric"), - Page: cloudflare.F(int64(1)), - PerPage: cloudflare.F(int64(1)), - Query: cloudflare.F("query"), - Recipient: cloudflare.F("recipient"), - Sender: cloudflare.F("sender"), - Start: cloudflare.F(time.Now()), - Subject: cloudflare.F("subject"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestInvestigateGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Get( - context.TODO(), - "4Njp3P0STMz2c02Q", - email_security.InvestigateGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/investigatedetection.go b/email_security/investigatedetection.go index 1e6eb15e08c..8eee4be324e 100644 --- a/email_security/investigatedetection.go +++ b/email_security/investigatedetection.go @@ -3,17 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "slices" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateDetectionService contains methods and other services that help with @@ -34,350 +24,3 @@ func NewInvestigateDetectionService(opts ...option.RequestOption) (r *Investigat r.Options = opts return } - -// Returns detection details such as threat categories and sender information for -// non-benign messages. -func (r *InvestigateDetectionService) Get(ctx context.Context, postfixID string, query InvestigateDetectionGetParams, opts ...option.RequestOption) (res *InvestigateDetectionGetResponse, err error) { - var env InvestigateDetectionGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - if postfixID == "" { - err = errors.New("missing required postfix_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/detections", query.AccountID, postfixID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type InvestigateDetectionGetResponse struct { - Action string `json:"action,required"` - Attachments []InvestigateDetectionGetResponseAttachment `json:"attachments,required"` - Headers []InvestigateDetectionGetResponseHeader `json:"headers,required"` - Links []InvestigateDetectionGetResponseLink `json:"links,required"` - SenderInfo InvestigateDetectionGetResponseSenderInfo `json:"sender_info,required"` - ThreatCategories []InvestigateDetectionGetResponseThreatCategory `json:"threat_categories,required"` - Validation InvestigateDetectionGetResponseValidation `json:"validation,required"` - FinalDisposition InvestigateDetectionGetResponseFinalDisposition `json:"final_disposition,nullable"` - JSON investigateDetectionGetResponseJSON `json:"-"` -} - -// investigateDetectionGetResponseJSON contains the JSON metadata for the struct -// [InvestigateDetectionGetResponse] -type investigateDetectionGetResponseJSON struct { - Action apijson.Field - Attachments apijson.Field - Headers apijson.Field - Links apijson.Field - SenderInfo apijson.Field - ThreatCategories apijson.Field - Validation apijson.Field - FinalDisposition apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateDetectionGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateDetectionGetResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigateDetectionGetResponseAttachment struct { - Size int64 `json:"size,required"` - ContentType string `json:"content_type,nullable"` - Detection InvestigateDetectionGetResponseAttachmentsDetection `json:"detection,nullable"` - Encrypted bool `json:"encrypted,nullable"` - Name string `json:"name,nullable"` - JSON investigateDetectionGetResponseAttachmentJSON `json:"-"` -} - -// investigateDetectionGetResponseAttachmentJSON contains the JSON metadata for the -// struct [InvestigateDetectionGetResponseAttachment] -type investigateDetectionGetResponseAttachmentJSON struct { - Size apijson.Field - ContentType apijson.Field - Detection apijson.Field - Encrypted apijson.Field - Name apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateDetectionGetResponseAttachment) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateDetectionGetResponseAttachmentJSON) RawJSON() string { - return r.raw -} - -type InvestigateDetectionGetResponseAttachmentsDetection string - -const ( - InvestigateDetectionGetResponseAttachmentsDetectionMalicious InvestigateDetectionGetResponseAttachmentsDetection = "MALICIOUS" - InvestigateDetectionGetResponseAttachmentsDetectionMaliciousBec InvestigateDetectionGetResponseAttachmentsDetection = "MALICIOUS-BEC" - InvestigateDetectionGetResponseAttachmentsDetectionSuspicious InvestigateDetectionGetResponseAttachmentsDetection = "SUSPICIOUS" - InvestigateDetectionGetResponseAttachmentsDetectionSpoof InvestigateDetectionGetResponseAttachmentsDetection = "SPOOF" - InvestigateDetectionGetResponseAttachmentsDetectionSpam InvestigateDetectionGetResponseAttachmentsDetection = "SPAM" - InvestigateDetectionGetResponseAttachmentsDetectionBulk InvestigateDetectionGetResponseAttachmentsDetection = "BULK" - InvestigateDetectionGetResponseAttachmentsDetectionEncrypted InvestigateDetectionGetResponseAttachmentsDetection = "ENCRYPTED" - InvestigateDetectionGetResponseAttachmentsDetectionExternal InvestigateDetectionGetResponseAttachmentsDetection = "EXTERNAL" - InvestigateDetectionGetResponseAttachmentsDetectionUnknown InvestigateDetectionGetResponseAttachmentsDetection = "UNKNOWN" - InvestigateDetectionGetResponseAttachmentsDetectionNone InvestigateDetectionGetResponseAttachmentsDetection = "NONE" -) - -func (r InvestigateDetectionGetResponseAttachmentsDetection) IsKnown() bool { - switch r { - case InvestigateDetectionGetResponseAttachmentsDetectionMalicious, InvestigateDetectionGetResponseAttachmentsDetectionMaliciousBec, InvestigateDetectionGetResponseAttachmentsDetectionSuspicious, InvestigateDetectionGetResponseAttachmentsDetectionSpoof, InvestigateDetectionGetResponseAttachmentsDetectionSpam, InvestigateDetectionGetResponseAttachmentsDetectionBulk, InvestigateDetectionGetResponseAttachmentsDetectionEncrypted, InvestigateDetectionGetResponseAttachmentsDetectionExternal, InvestigateDetectionGetResponseAttachmentsDetectionUnknown, InvestigateDetectionGetResponseAttachmentsDetectionNone: - return true - } - return false -} - -type InvestigateDetectionGetResponseHeader struct { - Name string `json:"name,required"` - Value string `json:"value,required"` - JSON investigateDetectionGetResponseHeaderJSON `json:"-"` -} - -// investigateDetectionGetResponseHeaderJSON contains the JSON metadata for the -// struct [InvestigateDetectionGetResponseHeader] -type investigateDetectionGetResponseHeaderJSON struct { - Name apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateDetectionGetResponseHeader) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateDetectionGetResponseHeaderJSON) RawJSON() string { - return r.raw -} - -type InvestigateDetectionGetResponseLink struct { - Href string `json:"href,required"` - Text string `json:"text,nullable"` - JSON investigateDetectionGetResponseLinkJSON `json:"-"` -} - -// investigateDetectionGetResponseLinkJSON contains the JSON metadata for the -// struct [InvestigateDetectionGetResponseLink] -type investigateDetectionGetResponseLinkJSON struct { - Href apijson.Field - Text apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateDetectionGetResponseLink) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateDetectionGetResponseLinkJSON) RawJSON() string { - return r.raw -} - -type InvestigateDetectionGetResponseSenderInfo struct { - // The name of the autonomous system. - AsName string `json:"as_name,nullable"` - // The number of the autonomous system. - AsNumber int64 `json:"as_number,nullable"` - Geo string `json:"geo,nullable"` - IP string `json:"ip,nullable"` - Pld string `json:"pld,nullable"` - JSON investigateDetectionGetResponseSenderInfoJSON `json:"-"` -} - -// investigateDetectionGetResponseSenderInfoJSON contains the JSON metadata for the -// struct [InvestigateDetectionGetResponseSenderInfo] -type investigateDetectionGetResponseSenderInfoJSON struct { - AsName apijson.Field - AsNumber apijson.Field - Geo apijson.Field - IP apijson.Field - Pld apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateDetectionGetResponseSenderInfo) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateDetectionGetResponseSenderInfoJSON) RawJSON() string { - return r.raw -} - -type InvestigateDetectionGetResponseThreatCategory struct { - ID int64 `json:"id,required"` - Description string `json:"description,nullable"` - Name string `json:"name,nullable"` - JSON investigateDetectionGetResponseThreatCategoryJSON `json:"-"` -} - -// investigateDetectionGetResponseThreatCategoryJSON contains the JSON metadata for -// the struct [InvestigateDetectionGetResponseThreatCategory] -type investigateDetectionGetResponseThreatCategoryJSON struct { - ID apijson.Field - Description apijson.Field - Name apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateDetectionGetResponseThreatCategory) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateDetectionGetResponseThreatCategoryJSON) RawJSON() string { - return r.raw -} - -type InvestigateDetectionGetResponseValidation struct { - Comment string `json:"comment,nullable"` - DKIM InvestigateDetectionGetResponseValidationDKIM `json:"dkim,nullable"` - DMARC InvestigateDetectionGetResponseValidationDMARC `json:"dmarc,nullable"` - SPF InvestigateDetectionGetResponseValidationSPF `json:"spf,nullable"` - JSON investigateDetectionGetResponseValidationJSON `json:"-"` -} - -// investigateDetectionGetResponseValidationJSON contains the JSON metadata for the -// struct [InvestigateDetectionGetResponseValidation] -type investigateDetectionGetResponseValidationJSON struct { - Comment apijson.Field - DKIM apijson.Field - DMARC apijson.Field - SPF apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateDetectionGetResponseValidation) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateDetectionGetResponseValidationJSON) RawJSON() string { - return r.raw -} - -type InvestigateDetectionGetResponseValidationDKIM string - -const ( - InvestigateDetectionGetResponseValidationDKIMPass InvestigateDetectionGetResponseValidationDKIM = "pass" - InvestigateDetectionGetResponseValidationDKIMNeutral InvestigateDetectionGetResponseValidationDKIM = "neutral" - InvestigateDetectionGetResponseValidationDKIMFail InvestigateDetectionGetResponseValidationDKIM = "fail" - InvestigateDetectionGetResponseValidationDKIMError InvestigateDetectionGetResponseValidationDKIM = "error" - InvestigateDetectionGetResponseValidationDKIMNone InvestigateDetectionGetResponseValidationDKIM = "none" -) - -func (r InvestigateDetectionGetResponseValidationDKIM) IsKnown() bool { - switch r { - case InvestigateDetectionGetResponseValidationDKIMPass, InvestigateDetectionGetResponseValidationDKIMNeutral, InvestigateDetectionGetResponseValidationDKIMFail, InvestigateDetectionGetResponseValidationDKIMError, InvestigateDetectionGetResponseValidationDKIMNone: - return true - } - return false -} - -type InvestigateDetectionGetResponseValidationDMARC string - -const ( - InvestigateDetectionGetResponseValidationDMARCPass InvestigateDetectionGetResponseValidationDMARC = "pass" - InvestigateDetectionGetResponseValidationDMARCNeutral InvestigateDetectionGetResponseValidationDMARC = "neutral" - InvestigateDetectionGetResponseValidationDMARCFail InvestigateDetectionGetResponseValidationDMARC = "fail" - InvestigateDetectionGetResponseValidationDMARCError InvestigateDetectionGetResponseValidationDMARC = "error" - InvestigateDetectionGetResponseValidationDMARCNone InvestigateDetectionGetResponseValidationDMARC = "none" -) - -func (r InvestigateDetectionGetResponseValidationDMARC) IsKnown() bool { - switch r { - case InvestigateDetectionGetResponseValidationDMARCPass, InvestigateDetectionGetResponseValidationDMARCNeutral, InvestigateDetectionGetResponseValidationDMARCFail, InvestigateDetectionGetResponseValidationDMARCError, InvestigateDetectionGetResponseValidationDMARCNone: - return true - } - return false -} - -type InvestigateDetectionGetResponseValidationSPF string - -const ( - InvestigateDetectionGetResponseValidationSPFPass InvestigateDetectionGetResponseValidationSPF = "pass" - InvestigateDetectionGetResponseValidationSPFNeutral InvestigateDetectionGetResponseValidationSPF = "neutral" - InvestigateDetectionGetResponseValidationSPFFail InvestigateDetectionGetResponseValidationSPF = "fail" - InvestigateDetectionGetResponseValidationSPFError InvestigateDetectionGetResponseValidationSPF = "error" - InvestigateDetectionGetResponseValidationSPFNone InvestigateDetectionGetResponseValidationSPF = "none" -) - -func (r InvestigateDetectionGetResponseValidationSPF) IsKnown() bool { - switch r { - case InvestigateDetectionGetResponseValidationSPFPass, InvestigateDetectionGetResponseValidationSPFNeutral, InvestigateDetectionGetResponseValidationSPFFail, InvestigateDetectionGetResponseValidationSPFError, InvestigateDetectionGetResponseValidationSPFNone: - return true - } - return false -} - -type InvestigateDetectionGetResponseFinalDisposition string - -const ( - InvestigateDetectionGetResponseFinalDispositionMalicious InvestigateDetectionGetResponseFinalDisposition = "MALICIOUS" - InvestigateDetectionGetResponseFinalDispositionMaliciousBec InvestigateDetectionGetResponseFinalDisposition = "MALICIOUS-BEC" - InvestigateDetectionGetResponseFinalDispositionSuspicious InvestigateDetectionGetResponseFinalDisposition = "SUSPICIOUS" - InvestigateDetectionGetResponseFinalDispositionSpoof InvestigateDetectionGetResponseFinalDisposition = "SPOOF" - InvestigateDetectionGetResponseFinalDispositionSpam InvestigateDetectionGetResponseFinalDisposition = "SPAM" - InvestigateDetectionGetResponseFinalDispositionBulk InvestigateDetectionGetResponseFinalDisposition = "BULK" - InvestigateDetectionGetResponseFinalDispositionEncrypted InvestigateDetectionGetResponseFinalDisposition = "ENCRYPTED" - InvestigateDetectionGetResponseFinalDispositionExternal InvestigateDetectionGetResponseFinalDisposition = "EXTERNAL" - InvestigateDetectionGetResponseFinalDispositionUnknown InvestigateDetectionGetResponseFinalDisposition = "UNKNOWN" - InvestigateDetectionGetResponseFinalDispositionNone InvestigateDetectionGetResponseFinalDisposition = "NONE" -) - -func (r InvestigateDetectionGetResponseFinalDisposition) IsKnown() bool { - switch r { - case InvestigateDetectionGetResponseFinalDispositionMalicious, InvestigateDetectionGetResponseFinalDispositionMaliciousBec, InvestigateDetectionGetResponseFinalDispositionSuspicious, InvestigateDetectionGetResponseFinalDispositionSpoof, InvestigateDetectionGetResponseFinalDispositionSpam, InvestigateDetectionGetResponseFinalDispositionBulk, InvestigateDetectionGetResponseFinalDispositionEncrypted, InvestigateDetectionGetResponseFinalDispositionExternal, InvestigateDetectionGetResponseFinalDispositionUnknown, InvestigateDetectionGetResponseFinalDispositionNone: - return true - } - return false -} - -type InvestigateDetectionGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type InvestigateDetectionGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result InvestigateDetectionGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON investigateDetectionGetResponseEnvelopeJSON `json:"-"` -} - -// investigateDetectionGetResponseEnvelopeJSON contains the JSON metadata for the -// struct [InvestigateDetectionGetResponseEnvelope] -type investigateDetectionGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateDetectionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateDetectionGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/investigatedetection_test.go b/email_security/investigatedetection_test.go deleted file mode 100644 index cbb832b3b21..00000000000 --- a/email_security/investigatedetection_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestInvestigateDetectionGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Detections.Get( - context.TODO(), - "4Njp3P0STMz2c02Q", - email_security.InvestigateDetectionGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/investigatemove.go b/email_security/investigatemove.go index eded6b83526..4947fecfc3a 100644 --- a/email_security/investigatemove.go +++ b/email_security/investigatemove.go @@ -3,18 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "slices" - "time" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/packages/pagination" ) // InvestigateMoveService contains methods and other services that help with @@ -35,184 +24,3 @@ func NewInvestigateMoveService(opts ...option.RequestOption) (r *InvestigateMove r.Options = opts return } - -// Move a message -func (r *InvestigateMoveService) New(ctx context.Context, postfixID string, params InvestigateMoveNewParams, opts ...option.RequestOption) (res *pagination.SinglePage[InvestigateMoveNewResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - if postfixID == "" { - err = errors.New("missing required postfix_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/move", params.AccountID, postfixID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Move a message -func (r *InvestigateMoveService) NewAutoPaging(ctx context.Context, postfixID string, params InvestigateMoveNewParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InvestigateMoveNewResponse] { - return pagination.NewSinglePageAutoPager(r.New(ctx, postfixID, params, opts...)) -} - -// Move multiple messages -func (r *InvestigateMoveService) Bulk(ctx context.Context, params InvestigateMoveBulkParams, opts ...option.RequestOption) (res *pagination.SinglePage[InvestigateMoveBulkResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/move", params.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Move multiple messages -func (r *InvestigateMoveService) BulkAutoPaging(ctx context.Context, params InvestigateMoveBulkParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InvestigateMoveBulkResponse] { - return pagination.NewSinglePageAutoPager(r.Bulk(ctx, params, opts...)) -} - -type InvestigateMoveNewResponse struct { - CompletedTimestamp time.Time `json:"completed_timestamp,required" format:"date-time"` - ItemCount int64 `json:"item_count,required"` - Destination string `json:"destination,nullable"` - MessageID string `json:"message_id,nullable"` - Operation string `json:"operation,nullable"` - Recipient string `json:"recipient,nullable"` - Status string `json:"status,nullable"` - JSON investigateMoveNewResponseJSON `json:"-"` -} - -// investigateMoveNewResponseJSON contains the JSON metadata for the struct -// [InvestigateMoveNewResponse] -type investigateMoveNewResponseJSON struct { - CompletedTimestamp apijson.Field - ItemCount apijson.Field - Destination apijson.Field - MessageID apijson.Field - Operation apijson.Field - Recipient apijson.Field - Status apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateMoveNewResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateMoveNewResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigateMoveBulkResponse struct { - CompletedTimestamp time.Time `json:"completed_timestamp,required" format:"date-time"` - ItemCount int64 `json:"item_count,required"` - Destination string `json:"destination,nullable"` - MessageID string `json:"message_id,nullable"` - Operation string `json:"operation,nullable"` - Recipient string `json:"recipient,nullable"` - Status string `json:"status,nullable"` - JSON investigateMoveBulkResponseJSON `json:"-"` -} - -// investigateMoveBulkResponseJSON contains the JSON metadata for the struct -// [InvestigateMoveBulkResponse] -type investigateMoveBulkResponseJSON struct { - CompletedTimestamp apijson.Field - ItemCount apijson.Field - Destination apijson.Field - MessageID apijson.Field - Operation apijson.Field - Recipient apijson.Field - Status apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateMoveBulkResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateMoveBulkResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigateMoveNewParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - Destination param.Field[InvestigateMoveNewParamsDestination] `json:"destination,required"` -} - -func (r InvestigateMoveNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type InvestigateMoveNewParamsDestination string - -const ( - InvestigateMoveNewParamsDestinationInbox InvestigateMoveNewParamsDestination = "Inbox" - InvestigateMoveNewParamsDestinationJunkEmail InvestigateMoveNewParamsDestination = "JunkEmail" - InvestigateMoveNewParamsDestinationDeletedItems InvestigateMoveNewParamsDestination = "DeletedItems" - InvestigateMoveNewParamsDestinationRecoverableItemsDeletions InvestigateMoveNewParamsDestination = "RecoverableItemsDeletions" - InvestigateMoveNewParamsDestinationRecoverableItemsPurges InvestigateMoveNewParamsDestination = "RecoverableItemsPurges" -) - -func (r InvestigateMoveNewParamsDestination) IsKnown() bool { - switch r { - case InvestigateMoveNewParamsDestinationInbox, InvestigateMoveNewParamsDestinationJunkEmail, InvestigateMoveNewParamsDestinationDeletedItems, InvestigateMoveNewParamsDestinationRecoverableItemsDeletions, InvestigateMoveNewParamsDestinationRecoverableItemsPurges: - return true - } - return false -} - -type InvestigateMoveBulkParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - Destination param.Field[InvestigateMoveBulkParamsDestination] `json:"destination,required"` - PostfixIDs param.Field[[]string] `json:"postfix_ids,required"` -} - -func (r InvestigateMoveBulkParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type InvestigateMoveBulkParamsDestination string - -const ( - InvestigateMoveBulkParamsDestinationInbox InvestigateMoveBulkParamsDestination = "Inbox" - InvestigateMoveBulkParamsDestinationJunkEmail InvestigateMoveBulkParamsDestination = "JunkEmail" - InvestigateMoveBulkParamsDestinationDeletedItems InvestigateMoveBulkParamsDestination = "DeletedItems" - InvestigateMoveBulkParamsDestinationRecoverableItemsDeletions InvestigateMoveBulkParamsDestination = "RecoverableItemsDeletions" - InvestigateMoveBulkParamsDestinationRecoverableItemsPurges InvestigateMoveBulkParamsDestination = "RecoverableItemsPurges" -) - -func (r InvestigateMoveBulkParamsDestination) IsKnown() bool { - switch r { - case InvestigateMoveBulkParamsDestinationInbox, InvestigateMoveBulkParamsDestinationJunkEmail, InvestigateMoveBulkParamsDestinationDeletedItems, InvestigateMoveBulkParamsDestinationRecoverableItemsDeletions, InvestigateMoveBulkParamsDestinationRecoverableItemsPurges: - return true - } - return false -} diff --git a/email_security/investigatemove_test.go b/email_security/investigatemove_test.go deleted file mode 100644 index d9d94ce541a..00000000000 --- a/email_security/investigatemove_test.go +++ /dev/null @@ -1,72 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestInvestigateMoveNew(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Move.New( - context.TODO(), - "4Njp3P0STMz2c02Q", - email_security.InvestigateMoveNewParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Destination: cloudflare.F(email_security.InvestigateMoveNewParamsDestinationInbox), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestInvestigateMoveBulk(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Move.Bulk(context.TODO(), email_security.InvestigateMoveBulkParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Destination: cloudflare.F(email_security.InvestigateMoveBulkParamsDestinationInbox), - PostfixIDs: cloudflare.F([]string{"4Njp3P0STMz2c02Q"}), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/investigatepreview.go b/email_security/investigatepreview.go index a9ae4c08e57..a747f4bb367 100644 --- a/email_security/investigatepreview.go +++ b/email_security/investigatepreview.go @@ -3,17 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "slices" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigatePreviewService contains methods and other services that help with @@ -34,156 +24,3 @@ func NewInvestigatePreviewService(opts ...option.RequestOption) (r *InvestigateP r.Options = opts return } - -// Preview for non-detection messages -func (r *InvestigatePreviewService) New(ctx context.Context, params InvestigatePreviewNewParams, opts ...option.RequestOption) (res *InvestigatePreviewNewResponse, err error) { - var env InvestigatePreviewNewResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/preview", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Returns a preview of the message body as a base64 encoded PNG image for -// non-benign messages. -func (r *InvestigatePreviewService) Get(ctx context.Context, postfixID string, query InvestigatePreviewGetParams, opts ...option.RequestOption) (res *InvestigatePreviewGetResponse, err error) { - var env InvestigatePreviewGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - if postfixID == "" { - err = errors.New("missing required postfix_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/preview", query.AccountID, postfixID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type InvestigatePreviewNewResponse struct { - // A base64 encoded PNG image of the email. - Screenshot string `json:"screenshot,required"` - JSON investigatePreviewNewResponseJSON `json:"-"` -} - -// investigatePreviewNewResponseJSON contains the JSON metadata for the struct -// [InvestigatePreviewNewResponse] -type investigatePreviewNewResponseJSON struct { - Screenshot apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigatePreviewNewResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigatePreviewNewResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigatePreviewGetResponse struct { - // A base64 encoded PNG image of the email. - Screenshot string `json:"screenshot,required"` - JSON investigatePreviewGetResponseJSON `json:"-"` -} - -// investigatePreviewGetResponseJSON contains the JSON metadata for the struct -// [InvestigatePreviewGetResponse] -type investigatePreviewGetResponseJSON struct { - Screenshot apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigatePreviewGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigatePreviewGetResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigatePreviewNewParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // The identifier of the message. - PostfixID param.Field[string] `json:"postfix_id,required"` -} - -func (r InvestigatePreviewNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type InvestigatePreviewNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result InvestigatePreviewNewResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON investigatePreviewNewResponseEnvelopeJSON `json:"-"` -} - -// investigatePreviewNewResponseEnvelopeJSON contains the JSON metadata for the -// struct [InvestigatePreviewNewResponseEnvelope] -type investigatePreviewNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigatePreviewNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigatePreviewNewResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type InvestigatePreviewGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type InvestigatePreviewGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result InvestigatePreviewGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON investigatePreviewGetResponseEnvelopeJSON `json:"-"` -} - -// investigatePreviewGetResponseEnvelopeJSON contains the JSON metadata for the -// struct [InvestigatePreviewGetResponseEnvelope] -type investigatePreviewGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigatePreviewGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigatePreviewGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/investigatepreview_test.go b/email_security/investigatepreview_test.go deleted file mode 100644 index 5758440a6fa..00000000000 --- a/email_security/investigatepreview_test.go +++ /dev/null @@ -1,70 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestInvestigatePreviewNew(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Preview.New(context.TODO(), email_security.InvestigatePreviewNewParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - PostfixID: cloudflare.F("4Njp3P0STMz2c02Q"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestInvestigatePreviewGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Preview.Get( - context.TODO(), - "4Njp3P0STMz2c02Q", - email_security.InvestigatePreviewGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/investigateraw.go b/email_security/investigateraw.go index 617214c27be..5a45d4e3e64 100644 --- a/email_security/investigateraw.go +++ b/email_security/investigateraw.go @@ -3,17 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "slices" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateRawService contains methods and other services that help with @@ -34,78 +24,3 @@ func NewInvestigateRawService(opts ...option.RequestOption) (r *InvestigateRawSe r.Options = opts return } - -// Returns the raw eml of any non-benign message. -func (r *InvestigateRawService) Get(ctx context.Context, postfixID string, query InvestigateRawGetParams, opts ...option.RequestOption) (res *InvestigateRawGetResponse, err error) { - var env InvestigateRawGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - if postfixID == "" { - err = errors.New("missing required postfix_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/raw", query.AccountID, postfixID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type InvestigateRawGetResponse struct { - // A UTF-8 encoded eml file of the email. - Raw string `json:"raw,required"` - JSON investigateRawGetResponseJSON `json:"-"` -} - -// investigateRawGetResponseJSON contains the JSON metadata for the struct -// [InvestigateRawGetResponse] -type investigateRawGetResponseJSON struct { - Raw apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateRawGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateRawGetResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigateRawGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type InvestigateRawGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result InvestigateRawGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON investigateRawGetResponseEnvelopeJSON `json:"-"` -} - -// investigateRawGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [InvestigateRawGetResponseEnvelope] -type investigateRawGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateRawGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateRawGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/investigateraw_test.go b/email_security/investigateraw_test.go deleted file mode 100644 index 5a3dbfe0ae4..00000000000 --- a/email_security/investigateraw_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestInvestigateRawGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Raw.Get( - context.TODO(), - "4Njp3P0STMz2c02Q", - email_security.InvestigateRawGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/investigatereclassify.go b/email_security/investigatereclassify.go index 5edde70bb25..18347853284 100644 --- a/email_security/investigatereclassify.go +++ b/email_security/investigatereclassify.go @@ -3,17 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "slices" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateReclassifyService contains methods and other services that help with @@ -34,85 +24,3 @@ func NewInvestigateReclassifyService(opts ...option.RequestOption) (r *Investiga r.Options = opts return } - -// Change email classfication -func (r *InvestigateReclassifyService) New(ctx context.Context, postfixID string, params InvestigateReclassifyNewParams, opts ...option.RequestOption) (res *InvestigateReclassifyNewResponse, err error) { - var env InvestigateReclassifyNewResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - if postfixID == "" { - err = errors.New("missing required postfix_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/reclassify", params.AccountID, postfixID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type InvestigateReclassifyNewResponse = interface{} - -type InvestigateReclassifyNewParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - ExpectedDisposition param.Field[InvestigateReclassifyNewParamsExpectedDisposition] `json:"expected_disposition,required"` - // Base64 encoded content of the EML file - EmlContent param.Field[string] `json:"eml_content"` - EscalatedSubmissionID param.Field[string] `json:"escalated_submission_id"` -} - -func (r InvestigateReclassifyNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type InvestigateReclassifyNewParamsExpectedDisposition string - -const ( - InvestigateReclassifyNewParamsExpectedDispositionNone InvestigateReclassifyNewParamsExpectedDisposition = "NONE" - InvestigateReclassifyNewParamsExpectedDispositionBulk InvestigateReclassifyNewParamsExpectedDisposition = "BULK" - InvestigateReclassifyNewParamsExpectedDispositionMalicious InvestigateReclassifyNewParamsExpectedDisposition = "MALICIOUS" - InvestigateReclassifyNewParamsExpectedDispositionSpam InvestigateReclassifyNewParamsExpectedDisposition = "SPAM" - InvestigateReclassifyNewParamsExpectedDispositionSpoof InvestigateReclassifyNewParamsExpectedDisposition = "SPOOF" - InvestigateReclassifyNewParamsExpectedDispositionSuspicious InvestigateReclassifyNewParamsExpectedDisposition = "SUSPICIOUS" -) - -func (r InvestigateReclassifyNewParamsExpectedDisposition) IsKnown() bool { - switch r { - case InvestigateReclassifyNewParamsExpectedDispositionNone, InvestigateReclassifyNewParamsExpectedDispositionBulk, InvestigateReclassifyNewParamsExpectedDispositionMalicious, InvestigateReclassifyNewParamsExpectedDispositionSpam, InvestigateReclassifyNewParamsExpectedDispositionSpoof, InvestigateReclassifyNewParamsExpectedDispositionSuspicious: - return true - } - return false -} - -type InvestigateReclassifyNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result InvestigateReclassifyNewResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON investigateReclassifyNewResponseEnvelopeJSON `json:"-"` -} - -// investigateReclassifyNewResponseEnvelopeJSON contains the JSON metadata for the -// struct [InvestigateReclassifyNewResponseEnvelope] -type investigateReclassifyNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateReclassifyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateReclassifyNewResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/investigatereclassify_test.go b/email_security/investigatereclassify_test.go deleted file mode 100644 index 3ce85a26db1..00000000000 --- a/email_security/investigatereclassify_test.go +++ /dev/null @@ -1,47 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestInvestigateReclassifyNewWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Reclassify.New( - context.TODO(), - "4Njp3P0STMz2c02Q", - email_security.InvestigateReclassifyNewParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - ExpectedDisposition: cloudflare.F(email_security.InvestigateReclassifyNewParamsExpectedDispositionNone), - EmlContent: cloudflare.F("eml_content"), - EscalatedSubmissionID: cloudflare.F("escalated_submission_id"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/investigaterelease.go b/email_security/investigaterelease.go index f63258bb919..32a37279d07 100644 --- a/email_security/investigaterelease.go +++ b/email_security/investigaterelease.go @@ -3,17 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "slices" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/packages/pagination" ) // InvestigateReleaseService contains methods and other services that help with @@ -34,69 +24,3 @@ func NewInvestigateReleaseService(opts ...option.RequestOption) (r *InvestigateR r.Options = opts return } - -// Release messages from quarantine -func (r *InvestigateReleaseService) Bulk(ctx context.Context, params InvestigateReleaseBulkParams, opts ...option.RequestOption) (res *pagination.SinglePage[InvestigateReleaseBulkResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/release", params.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Release messages from quarantine -func (r *InvestigateReleaseService) BulkAutoPaging(ctx context.Context, params InvestigateReleaseBulkParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InvestigateReleaseBulkResponse] { - return pagination.NewSinglePageAutoPager(r.Bulk(ctx, params, opts...)) -} - -type InvestigateReleaseBulkResponse struct { - // The identifier of the message. - PostfixID string `json:"postfix_id,required"` - Delivered []string `json:"delivered,nullable"` - Failed []string `json:"failed,nullable"` - Undelivered []string `json:"undelivered,nullable"` - JSON investigateReleaseBulkResponseJSON `json:"-"` -} - -// investigateReleaseBulkResponseJSON contains the JSON metadata for the struct -// [InvestigateReleaseBulkResponse] -type investigateReleaseBulkResponseJSON struct { - PostfixID apijson.Field - Delivered apijson.Field - Failed apijson.Field - Undelivered apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateReleaseBulkResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateReleaseBulkResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigateReleaseBulkParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // A list of messages identfied by their `postfix_id`s that should be released. - Body []string `json:"body,required"` -} - -func (r InvestigateReleaseBulkParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} diff --git a/email_security/investigaterelease_test.go b/email_security/investigaterelease_test.go deleted file mode 100644 index a46eb511d24..00000000000 --- a/email_security/investigaterelease_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestInvestigateReleaseBulk(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Release.Bulk(context.TODO(), email_security.InvestigateReleaseBulkParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: []string{"4Njp3P0STMz2c02Q"}, - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/investigatetrace.go b/email_security/investigatetrace.go index 62b31290a1b..b8b525a385f 100644 --- a/email_security/investigatetrace.go +++ b/email_security/investigatetrace.go @@ -3,18 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "slices" - "time" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateTraceService contains methods and other services that help with @@ -35,175 +24,3 @@ func NewInvestigateTraceService(opts ...option.RequestOption) (r *InvestigateTra r.Options = opts return } - -// Get email trace -func (r *InvestigateTraceService) Get(ctx context.Context, postfixID string, query InvestigateTraceGetParams, opts ...option.RequestOption) (res *InvestigateTraceGetResponse, err error) { - var env InvestigateTraceGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - if postfixID == "" { - err = errors.New("missing required postfix_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/trace", query.AccountID, postfixID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type InvestigateTraceGetResponse struct { - Inbound InvestigateTraceGetResponseInbound `json:"inbound,required"` - Outbound InvestigateTraceGetResponseOutbound `json:"outbound,required"` - JSON investigateTraceGetResponseJSON `json:"-"` -} - -// investigateTraceGetResponseJSON contains the JSON metadata for the struct -// [InvestigateTraceGetResponse] -type investigateTraceGetResponseJSON struct { - Inbound apijson.Field - Outbound apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateTraceGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateTraceGetResponseJSON) RawJSON() string { - return r.raw -} - -type InvestigateTraceGetResponseInbound struct { - Lines []InvestigateTraceGetResponseInboundLine `json:"lines,nullable"` - Pending bool `json:"pending,nullable"` - JSON investigateTraceGetResponseInboundJSON `json:"-"` -} - -// investigateTraceGetResponseInboundJSON contains the JSON metadata for the struct -// [InvestigateTraceGetResponseInbound] -type investigateTraceGetResponseInboundJSON struct { - Lines apijson.Field - Pending apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateTraceGetResponseInbound) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateTraceGetResponseInboundJSON) RawJSON() string { - return r.raw -} - -type InvestigateTraceGetResponseInboundLine struct { - Lineno int64 `json:"lineno,required"` - Message string `json:"message,required"` - Ts time.Time `json:"ts,required" format:"date-time"` - JSON investigateTraceGetResponseInboundLineJSON `json:"-"` -} - -// investigateTraceGetResponseInboundLineJSON contains the JSON metadata for the -// struct [InvestigateTraceGetResponseInboundLine] -type investigateTraceGetResponseInboundLineJSON struct { - Lineno apijson.Field - Message apijson.Field - Ts apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateTraceGetResponseInboundLine) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateTraceGetResponseInboundLineJSON) RawJSON() string { - return r.raw -} - -type InvestigateTraceGetResponseOutbound struct { - Lines []InvestigateTraceGetResponseOutboundLine `json:"lines,nullable"` - Pending bool `json:"pending,nullable"` - JSON investigateTraceGetResponseOutboundJSON `json:"-"` -} - -// investigateTraceGetResponseOutboundJSON contains the JSON metadata for the -// struct [InvestigateTraceGetResponseOutbound] -type investigateTraceGetResponseOutboundJSON struct { - Lines apijson.Field - Pending apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateTraceGetResponseOutbound) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateTraceGetResponseOutboundJSON) RawJSON() string { - return r.raw -} - -type InvestigateTraceGetResponseOutboundLine struct { - Lineno int64 `json:"lineno,required"` - Message string `json:"message,required"` - Ts time.Time `json:"ts,required" format:"date-time"` - JSON investigateTraceGetResponseOutboundLineJSON `json:"-"` -} - -// investigateTraceGetResponseOutboundLineJSON contains the JSON metadata for the -// struct [InvestigateTraceGetResponseOutboundLine] -type investigateTraceGetResponseOutboundLineJSON struct { - Lineno apijson.Field - Message apijson.Field - Ts apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateTraceGetResponseOutboundLine) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateTraceGetResponseOutboundLineJSON) RawJSON() string { - return r.raw -} - -type InvestigateTraceGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type InvestigateTraceGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result InvestigateTraceGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON investigateTraceGetResponseEnvelopeJSON `json:"-"` -} - -// investigateTraceGetResponseEnvelopeJSON contains the JSON metadata for the -// struct [InvestigateTraceGetResponseEnvelope] -type investigateTraceGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *InvestigateTraceGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r investigateTraceGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/investigatetrace_test.go b/email_security/investigatetrace_test.go deleted file mode 100644 index 2a10829143f..00000000000 --- a/email_security/investigatetrace_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestInvestigateTraceGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Investigate.Trace.Get( - context.TODO(), - "4Njp3P0STMz2c02Q", - email_security.InvestigateTraceGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/settingallowpolicy.go b/email_security/settingallowpolicy.go index 5c84e79faf7..71a236d883a 100644 --- a/email_security/settingallowpolicy.go +++ b/email_security/settingallowpolicy.go @@ -3,21 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "net/url" - "slices" - "time" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/packages/pagination" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // SettingAllowPolicyService contains methods and other services that help with @@ -38,707 +24,3 @@ func NewSettingAllowPolicyService(opts ...option.RequestOption) (r *SettingAllow r.Options = opts return } - -// Create an email allow policy -func (r *SettingAllowPolicyService) New(ctx context.Context, params SettingAllowPolicyNewParams, opts ...option.RequestOption) (res *SettingAllowPolicyNewResponse, err error) { - var env SettingAllowPolicyNewResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Lists, searches, and sorts an account’s email allow policies. -func (r *SettingAllowPolicyService) List(ctx context.Context, params SettingAllowPolicyListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingAllowPolicyListResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies", params.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Lists, searches, and sorts an account’s email allow policies. -func (r *SettingAllowPolicyService) ListAutoPaging(ctx context.Context, params SettingAllowPolicyListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingAllowPolicyListResponse] { - return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) -} - -// Delete an email allow policy -func (r *SettingAllowPolicyService) Delete(ctx context.Context, policyID int64, body SettingAllowPolicyDeleteParams, opts ...option.RequestOption) (res *SettingAllowPolicyDeleteResponse, err error) { - var env SettingAllowPolicyDeleteResponseEnvelope - opts = slices.Concat(r.Options, opts) - if body.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies/%v", body.AccountID, policyID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Update an email allow policy -func (r *SettingAllowPolicyService) Edit(ctx context.Context, policyID int64, params SettingAllowPolicyEditParams, opts ...option.RequestOption) (res *SettingAllowPolicyEditResponse, err error) { - var env SettingAllowPolicyEditResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies/%v", params.AccountID, policyID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Get an email allow policy -func (r *SettingAllowPolicyService) Get(ctx context.Context, policyID int64, query SettingAllowPolicyGetParams, opts ...option.RequestOption) (res *SettingAllowPolicyGetResponse, err error) { - var env SettingAllowPolicyGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies/%v", query.AccountID, policyID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type SettingAllowPolicyNewResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - // Messages from this sender will be exempted from Spam, Spoof and Bulk - // dispositions. Note: This will not exempt messages with Malicious or Suspicious - // dispositions. - IsAcceptableSender bool `json:"is_acceptable_sender,required"` - // Messages to this recipient will bypass all detections. - IsExemptRecipient bool `json:"is_exempt_recipient,required"` - IsRegex bool `json:"is_regex,required"` - // Messages from this sender will bypass all detections and link following. - IsTrustedSender bool `json:"is_trusted_sender,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - PatternType SettingAllowPolicyNewResponsePatternType `json:"pattern_type,required"` - // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors - // policies that pass authentication. - VerifySender bool `json:"verify_sender,required"` - Comments string `json:"comments,nullable"` - // Deprecated: deprecated - IsRecipient bool `json:"is_recipient"` - // Deprecated: deprecated - IsSender bool `json:"is_sender"` - // Deprecated: deprecated - IsSpoof bool `json:"is_spoof"` - JSON settingAllowPolicyNewResponseJSON `json:"-"` -} - -// settingAllowPolicyNewResponseJSON contains the JSON metadata for the struct -// [SettingAllowPolicyNewResponse] -type settingAllowPolicyNewResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsAcceptableSender apijson.Field - IsExemptRecipient apijson.Field - IsRegex apijson.Field - IsTrustedSender apijson.Field - LastModified apijson.Field - Pattern apijson.Field - PatternType apijson.Field - VerifySender apijson.Field - Comments apijson.Field - IsRecipient apijson.Field - IsSender apijson.Field - IsSpoof apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingAllowPolicyNewResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingAllowPolicyNewResponseJSON) RawJSON() string { - return r.raw -} - -type SettingAllowPolicyNewResponsePatternType string - -const ( - SettingAllowPolicyNewResponsePatternTypeEmail SettingAllowPolicyNewResponsePatternType = "EMAIL" - SettingAllowPolicyNewResponsePatternTypeDomain SettingAllowPolicyNewResponsePatternType = "DOMAIN" - SettingAllowPolicyNewResponsePatternTypeIP SettingAllowPolicyNewResponsePatternType = "IP" - SettingAllowPolicyNewResponsePatternTypeUnknown SettingAllowPolicyNewResponsePatternType = "UNKNOWN" -) - -func (r SettingAllowPolicyNewResponsePatternType) IsKnown() bool { - switch r { - case SettingAllowPolicyNewResponsePatternTypeEmail, SettingAllowPolicyNewResponsePatternTypeDomain, SettingAllowPolicyNewResponsePatternTypeIP, SettingAllowPolicyNewResponsePatternTypeUnknown: - return true - } - return false -} - -type SettingAllowPolicyListResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - // Messages from this sender will be exempted from Spam, Spoof and Bulk - // dispositions. Note: This will not exempt messages with Malicious or Suspicious - // dispositions. - IsAcceptableSender bool `json:"is_acceptable_sender,required"` - // Messages to this recipient will bypass all detections. - IsExemptRecipient bool `json:"is_exempt_recipient,required"` - IsRegex bool `json:"is_regex,required"` - // Messages from this sender will bypass all detections and link following. - IsTrustedSender bool `json:"is_trusted_sender,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - PatternType SettingAllowPolicyListResponsePatternType `json:"pattern_type,required"` - // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors - // policies that pass authentication. - VerifySender bool `json:"verify_sender,required"` - Comments string `json:"comments,nullable"` - // Deprecated: deprecated - IsRecipient bool `json:"is_recipient"` - // Deprecated: deprecated - IsSender bool `json:"is_sender"` - // Deprecated: deprecated - IsSpoof bool `json:"is_spoof"` - JSON settingAllowPolicyListResponseJSON `json:"-"` -} - -// settingAllowPolicyListResponseJSON contains the JSON metadata for the struct -// [SettingAllowPolicyListResponse] -type settingAllowPolicyListResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsAcceptableSender apijson.Field - IsExemptRecipient apijson.Field - IsRegex apijson.Field - IsTrustedSender apijson.Field - LastModified apijson.Field - Pattern apijson.Field - PatternType apijson.Field - VerifySender apijson.Field - Comments apijson.Field - IsRecipient apijson.Field - IsSender apijson.Field - IsSpoof apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingAllowPolicyListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingAllowPolicyListResponseJSON) RawJSON() string { - return r.raw -} - -type SettingAllowPolicyListResponsePatternType string - -const ( - SettingAllowPolicyListResponsePatternTypeEmail SettingAllowPolicyListResponsePatternType = "EMAIL" - SettingAllowPolicyListResponsePatternTypeDomain SettingAllowPolicyListResponsePatternType = "DOMAIN" - SettingAllowPolicyListResponsePatternTypeIP SettingAllowPolicyListResponsePatternType = "IP" - SettingAllowPolicyListResponsePatternTypeUnknown SettingAllowPolicyListResponsePatternType = "UNKNOWN" -) - -func (r SettingAllowPolicyListResponsePatternType) IsKnown() bool { - switch r { - case SettingAllowPolicyListResponsePatternTypeEmail, SettingAllowPolicyListResponsePatternTypeDomain, SettingAllowPolicyListResponsePatternTypeIP, SettingAllowPolicyListResponsePatternTypeUnknown: - return true - } - return false -} - -type SettingAllowPolicyDeleteResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - JSON settingAllowPolicyDeleteResponseJSON `json:"-"` -} - -// settingAllowPolicyDeleteResponseJSON contains the JSON metadata for the struct -// [SettingAllowPolicyDeleteResponse] -type settingAllowPolicyDeleteResponseJSON struct { - ID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingAllowPolicyDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingAllowPolicyDeleteResponseJSON) RawJSON() string { - return r.raw -} - -type SettingAllowPolicyEditResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - // Messages from this sender will be exempted from Spam, Spoof and Bulk - // dispositions. Note: This will not exempt messages with Malicious or Suspicious - // dispositions. - IsAcceptableSender bool `json:"is_acceptable_sender,required"` - // Messages to this recipient will bypass all detections. - IsExemptRecipient bool `json:"is_exempt_recipient,required"` - IsRegex bool `json:"is_regex,required"` - // Messages from this sender will bypass all detections and link following. - IsTrustedSender bool `json:"is_trusted_sender,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - PatternType SettingAllowPolicyEditResponsePatternType `json:"pattern_type,required"` - // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors - // policies that pass authentication. - VerifySender bool `json:"verify_sender,required"` - Comments string `json:"comments,nullable"` - // Deprecated: deprecated - IsRecipient bool `json:"is_recipient"` - // Deprecated: deprecated - IsSender bool `json:"is_sender"` - // Deprecated: deprecated - IsSpoof bool `json:"is_spoof"` - JSON settingAllowPolicyEditResponseJSON `json:"-"` -} - -// settingAllowPolicyEditResponseJSON contains the JSON metadata for the struct -// [SettingAllowPolicyEditResponse] -type settingAllowPolicyEditResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsAcceptableSender apijson.Field - IsExemptRecipient apijson.Field - IsRegex apijson.Field - IsTrustedSender apijson.Field - LastModified apijson.Field - Pattern apijson.Field - PatternType apijson.Field - VerifySender apijson.Field - Comments apijson.Field - IsRecipient apijson.Field - IsSender apijson.Field - IsSpoof apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingAllowPolicyEditResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingAllowPolicyEditResponseJSON) RawJSON() string { - return r.raw -} - -type SettingAllowPolicyEditResponsePatternType string - -const ( - SettingAllowPolicyEditResponsePatternTypeEmail SettingAllowPolicyEditResponsePatternType = "EMAIL" - SettingAllowPolicyEditResponsePatternTypeDomain SettingAllowPolicyEditResponsePatternType = "DOMAIN" - SettingAllowPolicyEditResponsePatternTypeIP SettingAllowPolicyEditResponsePatternType = "IP" - SettingAllowPolicyEditResponsePatternTypeUnknown SettingAllowPolicyEditResponsePatternType = "UNKNOWN" -) - -func (r SettingAllowPolicyEditResponsePatternType) IsKnown() bool { - switch r { - case SettingAllowPolicyEditResponsePatternTypeEmail, SettingAllowPolicyEditResponsePatternTypeDomain, SettingAllowPolicyEditResponsePatternTypeIP, SettingAllowPolicyEditResponsePatternTypeUnknown: - return true - } - return false -} - -type SettingAllowPolicyGetResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - // Messages from this sender will be exempted from Spam, Spoof and Bulk - // dispositions. Note: This will not exempt messages with Malicious or Suspicious - // dispositions. - IsAcceptableSender bool `json:"is_acceptable_sender,required"` - // Messages to this recipient will bypass all detections. - IsExemptRecipient bool `json:"is_exempt_recipient,required"` - IsRegex bool `json:"is_regex,required"` - // Messages from this sender will bypass all detections and link following. - IsTrustedSender bool `json:"is_trusted_sender,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - PatternType SettingAllowPolicyGetResponsePatternType `json:"pattern_type,required"` - // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors - // policies that pass authentication. - VerifySender bool `json:"verify_sender,required"` - Comments string `json:"comments,nullable"` - // Deprecated: deprecated - IsRecipient bool `json:"is_recipient"` - // Deprecated: deprecated - IsSender bool `json:"is_sender"` - // Deprecated: deprecated - IsSpoof bool `json:"is_spoof"` - JSON settingAllowPolicyGetResponseJSON `json:"-"` -} - -// settingAllowPolicyGetResponseJSON contains the JSON metadata for the struct -// [SettingAllowPolicyGetResponse] -type settingAllowPolicyGetResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsAcceptableSender apijson.Field - IsExemptRecipient apijson.Field - IsRegex apijson.Field - IsTrustedSender apijson.Field - LastModified apijson.Field - Pattern apijson.Field - PatternType apijson.Field - VerifySender apijson.Field - Comments apijson.Field - IsRecipient apijson.Field - IsSender apijson.Field - IsSpoof apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingAllowPolicyGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingAllowPolicyGetResponseJSON) RawJSON() string { - return r.raw -} - -type SettingAllowPolicyGetResponsePatternType string - -const ( - SettingAllowPolicyGetResponsePatternTypeEmail SettingAllowPolicyGetResponsePatternType = "EMAIL" - SettingAllowPolicyGetResponsePatternTypeDomain SettingAllowPolicyGetResponsePatternType = "DOMAIN" - SettingAllowPolicyGetResponsePatternTypeIP SettingAllowPolicyGetResponsePatternType = "IP" - SettingAllowPolicyGetResponsePatternTypeUnknown SettingAllowPolicyGetResponsePatternType = "UNKNOWN" -) - -func (r SettingAllowPolicyGetResponsePatternType) IsKnown() bool { - switch r { - case SettingAllowPolicyGetResponsePatternTypeEmail, SettingAllowPolicyGetResponsePatternTypeDomain, SettingAllowPolicyGetResponsePatternTypeIP, SettingAllowPolicyGetResponsePatternTypeUnknown: - return true - } - return false -} - -type SettingAllowPolicyNewParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // Messages from this sender will be exempted from Spam, Spoof and Bulk - // dispositions. Note: This will not exempt messages with Malicious or Suspicious - // dispositions. - IsAcceptableSender param.Field[bool] `json:"is_acceptable_sender,required"` - // Messages to this recipient will bypass all detections. - IsExemptRecipient param.Field[bool] `json:"is_exempt_recipient,required"` - IsRegex param.Field[bool] `json:"is_regex,required"` - // Messages from this sender will bypass all detections and link following. - IsTrustedSender param.Field[bool] `json:"is_trusted_sender,required"` - Pattern param.Field[string] `json:"pattern,required"` - PatternType param.Field[SettingAllowPolicyNewParamsPatternType] `json:"pattern_type,required"` - // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors - // policies that pass authentication. - VerifySender param.Field[bool] `json:"verify_sender,required"` - Comments param.Field[string] `json:"comments"` - IsRecipient param.Field[bool] `json:"is_recipient"` - IsSender param.Field[bool] `json:"is_sender"` - IsSpoof param.Field[bool] `json:"is_spoof"` -} - -func (r SettingAllowPolicyNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SettingAllowPolicyNewParamsPatternType string - -const ( - SettingAllowPolicyNewParamsPatternTypeEmail SettingAllowPolicyNewParamsPatternType = "EMAIL" - SettingAllowPolicyNewParamsPatternTypeDomain SettingAllowPolicyNewParamsPatternType = "DOMAIN" - SettingAllowPolicyNewParamsPatternTypeIP SettingAllowPolicyNewParamsPatternType = "IP" - SettingAllowPolicyNewParamsPatternTypeUnknown SettingAllowPolicyNewParamsPatternType = "UNKNOWN" -) - -func (r SettingAllowPolicyNewParamsPatternType) IsKnown() bool { - switch r { - case SettingAllowPolicyNewParamsPatternTypeEmail, SettingAllowPolicyNewParamsPatternTypeDomain, SettingAllowPolicyNewParamsPatternTypeIP, SettingAllowPolicyNewParamsPatternTypeUnknown: - return true - } - return false -} - -type SettingAllowPolicyNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingAllowPolicyNewResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingAllowPolicyNewResponseEnvelopeJSON `json:"-"` -} - -// settingAllowPolicyNewResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingAllowPolicyNewResponseEnvelope] -type settingAllowPolicyNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingAllowPolicyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingAllowPolicyNewResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingAllowPolicyListParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // The sorting direction. - Direction param.Field[SettingAllowPolicyListParamsDirection] `query:"direction"` - IsAcceptableSender param.Field[bool] `query:"is_acceptable_sender"` - IsExemptRecipient param.Field[bool] `query:"is_exempt_recipient"` - IsRecipient param.Field[bool] `query:"is_recipient"` - IsSender param.Field[bool] `query:"is_sender"` - IsSpoof param.Field[bool] `query:"is_spoof"` - IsTrustedSender param.Field[bool] `query:"is_trusted_sender"` - // The field to sort by. - Order param.Field[SettingAllowPolicyListParamsOrder] `query:"order"` - // The page number of paginated results. - Page param.Field[int64] `query:"page"` - Pattern param.Field[string] `query:"pattern"` - PatternType param.Field[SettingAllowPolicyListParamsPatternType] `query:"pattern_type"` - // The number of results per page. - PerPage param.Field[int64] `query:"per_page"` - // Allows searching in multiple properties of a record simultaneously. This - // parameter is intended for human users, not automation. Its exact behavior is - // intentionally left unspecified and is subject to change in the future. - Search param.Field[string] `query:"search"` - VerifySender param.Field[bool] `query:"verify_sender"` -} - -// URLQuery serializes [SettingAllowPolicyListParams]'s query parameters as -// `url.Values`. -func (r SettingAllowPolicyListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatDots, - }) -} - -// The sorting direction. -type SettingAllowPolicyListParamsDirection string - -const ( - SettingAllowPolicyListParamsDirectionAsc SettingAllowPolicyListParamsDirection = "asc" - SettingAllowPolicyListParamsDirectionDesc SettingAllowPolicyListParamsDirection = "desc" -) - -func (r SettingAllowPolicyListParamsDirection) IsKnown() bool { - switch r { - case SettingAllowPolicyListParamsDirectionAsc, SettingAllowPolicyListParamsDirectionDesc: - return true - } - return false -} - -// The field to sort by. -type SettingAllowPolicyListParamsOrder string - -const ( - SettingAllowPolicyListParamsOrderPattern SettingAllowPolicyListParamsOrder = "pattern" - SettingAllowPolicyListParamsOrderCreatedAt SettingAllowPolicyListParamsOrder = "created_at" -) - -func (r SettingAllowPolicyListParamsOrder) IsKnown() bool { - switch r { - case SettingAllowPolicyListParamsOrderPattern, SettingAllowPolicyListParamsOrderCreatedAt: - return true - } - return false -} - -type SettingAllowPolicyListParamsPatternType string - -const ( - SettingAllowPolicyListParamsPatternTypeEmail SettingAllowPolicyListParamsPatternType = "EMAIL" - SettingAllowPolicyListParamsPatternTypeDomain SettingAllowPolicyListParamsPatternType = "DOMAIN" - SettingAllowPolicyListParamsPatternTypeIP SettingAllowPolicyListParamsPatternType = "IP" - SettingAllowPolicyListParamsPatternTypeUnknown SettingAllowPolicyListParamsPatternType = "UNKNOWN" -) - -func (r SettingAllowPolicyListParamsPatternType) IsKnown() bool { - switch r { - case SettingAllowPolicyListParamsPatternTypeEmail, SettingAllowPolicyListParamsPatternTypeDomain, SettingAllowPolicyListParamsPatternTypeIP, SettingAllowPolicyListParamsPatternTypeUnknown: - return true - } - return false -} - -type SettingAllowPolicyDeleteParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingAllowPolicyDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingAllowPolicyDeleteResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingAllowPolicyDeleteResponseEnvelopeJSON `json:"-"` -} - -// settingAllowPolicyDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingAllowPolicyDeleteResponseEnvelope] -type settingAllowPolicyDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingAllowPolicyDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingAllowPolicyDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingAllowPolicyEditParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - Comments param.Field[string] `json:"comments"` - // Messages from this sender will be exempted from Spam, Spoof and Bulk - // dispositions. Note: This will not exempt messages with Malicious or Suspicious - // dispositions. - IsAcceptableSender param.Field[bool] `json:"is_acceptable_sender"` - // Messages to this recipient will bypass all detections. - IsExemptRecipient param.Field[bool] `json:"is_exempt_recipient"` - IsRegex param.Field[bool] `json:"is_regex"` - // Messages from this sender will bypass all detections and link following. - IsTrustedSender param.Field[bool] `json:"is_trusted_sender"` - Pattern param.Field[string] `json:"pattern"` - PatternType param.Field[SettingAllowPolicyEditParamsPatternType] `json:"pattern_type"` - // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors - // policies that pass authentication. - VerifySender param.Field[bool] `json:"verify_sender"` -} - -func (r SettingAllowPolicyEditParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SettingAllowPolicyEditParamsPatternType string - -const ( - SettingAllowPolicyEditParamsPatternTypeEmail SettingAllowPolicyEditParamsPatternType = "EMAIL" - SettingAllowPolicyEditParamsPatternTypeDomain SettingAllowPolicyEditParamsPatternType = "DOMAIN" - SettingAllowPolicyEditParamsPatternTypeIP SettingAllowPolicyEditParamsPatternType = "IP" - SettingAllowPolicyEditParamsPatternTypeUnknown SettingAllowPolicyEditParamsPatternType = "UNKNOWN" -) - -func (r SettingAllowPolicyEditParamsPatternType) IsKnown() bool { - switch r { - case SettingAllowPolicyEditParamsPatternTypeEmail, SettingAllowPolicyEditParamsPatternTypeDomain, SettingAllowPolicyEditParamsPatternTypeIP, SettingAllowPolicyEditParamsPatternTypeUnknown: - return true - } - return false -} - -type SettingAllowPolicyEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingAllowPolicyEditResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingAllowPolicyEditResponseEnvelopeJSON `json:"-"` -} - -// settingAllowPolicyEditResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingAllowPolicyEditResponseEnvelope] -type settingAllowPolicyEditResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingAllowPolicyEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingAllowPolicyEditResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingAllowPolicyGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingAllowPolicyGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingAllowPolicyGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingAllowPolicyGetResponseEnvelopeJSON `json:"-"` -} - -// settingAllowPolicyGetResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingAllowPolicyGetResponseEnvelope] -type settingAllowPolicyGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingAllowPolicyGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingAllowPolicyGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/settingallowpolicy_test.go b/email_security/settingallowpolicy_test.go deleted file mode 100644 index 6612d8ef990..00000000000 --- a/email_security/settingallowpolicy_test.go +++ /dev/null @@ -1,185 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestSettingAllowPolicyNewWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.AllowPolicies.New(context.TODO(), email_security.SettingAllowPolicyNewParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - IsAcceptableSender: cloudflare.F(false), - IsExemptRecipient: cloudflare.F(false), - IsRegex: cloudflare.F(false), - IsTrustedSender: cloudflare.F(true), - Pattern: cloudflare.F("test@example.com"), - PatternType: cloudflare.F(email_security.SettingAllowPolicyNewParamsPatternTypeEmail), - VerifySender: cloudflare.F(true), - Comments: cloudflare.F("Trust all messages send from test@example.com"), - IsRecipient: cloudflare.F(false), - IsSender: cloudflare.F(true), - IsSpoof: cloudflare.F(false), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingAllowPolicyListWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.AllowPolicies.List(context.TODO(), email_security.SettingAllowPolicyListParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Direction: cloudflare.F(email_security.SettingAllowPolicyListParamsDirectionAsc), - IsAcceptableSender: cloudflare.F(true), - IsExemptRecipient: cloudflare.F(true), - IsRecipient: cloudflare.F(true), - IsSender: cloudflare.F(true), - IsSpoof: cloudflare.F(true), - IsTrustedSender: cloudflare.F(true), - Order: cloudflare.F(email_security.SettingAllowPolicyListParamsOrderPattern), - Page: cloudflare.F(int64(1)), - Pattern: cloudflare.F("pattern"), - PatternType: cloudflare.F(email_security.SettingAllowPolicyListParamsPatternTypeEmail), - PerPage: cloudflare.F(int64(1)), - Search: cloudflare.F("search"), - VerifySender: cloudflare.F(true), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingAllowPolicyDelete(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.AllowPolicies.Delete( - context.TODO(), - int64(2401), - email_security.SettingAllowPolicyDeleteParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingAllowPolicyEditWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.AllowPolicies.Edit( - context.TODO(), - int64(2401), - email_security.SettingAllowPolicyEditParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Comments: cloudflare.F("comments"), - IsAcceptableSender: cloudflare.F(true), - IsExemptRecipient: cloudflare.F(true), - IsRegex: cloudflare.F(true), - IsTrustedSender: cloudflare.F(true), - Pattern: cloudflare.F("x"), - PatternType: cloudflare.F(email_security.SettingAllowPolicyEditParamsPatternTypeEmail), - VerifySender: cloudflare.F(true), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingAllowPolicyGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.AllowPolicies.Get( - context.TODO(), - int64(2401), - email_security.SettingAllowPolicyGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/settingblocksender.go b/email_security/settingblocksender.go index 108a88091ce..309d8a71f67 100644 --- a/email_security/settingblocksender.go +++ b/email_security/settingblocksender.go @@ -3,21 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "net/url" - "slices" - "time" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/packages/pagination" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // SettingBlockSenderService contains methods and other services that help with @@ -38,579 +24,3 @@ func NewSettingBlockSenderService(opts ...option.RequestOption) (r *SettingBlock r.Options = opts return } - -// Create a blocked email sender -func (r *SettingBlockSenderService) New(ctx context.Context, params SettingBlockSenderNewParams, opts ...option.RequestOption) (res *SettingBlockSenderNewResponse, err error) { - var env SettingBlockSenderNewResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// List blocked email senders -func (r *SettingBlockSenderService) List(ctx context.Context, params SettingBlockSenderListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingBlockSenderListResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders", params.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// List blocked email senders -func (r *SettingBlockSenderService) ListAutoPaging(ctx context.Context, params SettingBlockSenderListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingBlockSenderListResponse] { - return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) -} - -// Delete a blocked email sender -func (r *SettingBlockSenderService) Delete(ctx context.Context, patternID int64, body SettingBlockSenderDeleteParams, opts ...option.RequestOption) (res *SettingBlockSenderDeleteResponse, err error) { - var env SettingBlockSenderDeleteResponseEnvelope - opts = slices.Concat(r.Options, opts) - if body.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders/%v", body.AccountID, patternID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Update a blocked email sender -func (r *SettingBlockSenderService) Edit(ctx context.Context, patternID int64, params SettingBlockSenderEditParams, opts ...option.RequestOption) (res *SettingBlockSenderEditResponse, err error) { - var env SettingBlockSenderEditResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders/%v", params.AccountID, patternID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Get a blocked email sender -func (r *SettingBlockSenderService) Get(ctx context.Context, patternID int64, query SettingBlockSenderGetParams, opts ...option.RequestOption) (res *SettingBlockSenderGetResponse, err error) { - var env SettingBlockSenderGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders/%v", query.AccountID, patternID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type SettingBlockSenderNewResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - IsRegex bool `json:"is_regex,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - PatternType SettingBlockSenderNewResponsePatternType `json:"pattern_type,required"` - Comments string `json:"comments,nullable"` - JSON settingBlockSenderNewResponseJSON `json:"-"` -} - -// settingBlockSenderNewResponseJSON contains the JSON metadata for the struct -// [SettingBlockSenderNewResponse] -type settingBlockSenderNewResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsRegex apijson.Field - LastModified apijson.Field - Pattern apijson.Field - PatternType apijson.Field - Comments apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingBlockSenderNewResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingBlockSenderNewResponseJSON) RawJSON() string { - return r.raw -} - -type SettingBlockSenderNewResponsePatternType string - -const ( - SettingBlockSenderNewResponsePatternTypeEmail SettingBlockSenderNewResponsePatternType = "EMAIL" - SettingBlockSenderNewResponsePatternTypeDomain SettingBlockSenderNewResponsePatternType = "DOMAIN" - SettingBlockSenderNewResponsePatternTypeIP SettingBlockSenderNewResponsePatternType = "IP" - SettingBlockSenderNewResponsePatternTypeUnknown SettingBlockSenderNewResponsePatternType = "UNKNOWN" -) - -func (r SettingBlockSenderNewResponsePatternType) IsKnown() bool { - switch r { - case SettingBlockSenderNewResponsePatternTypeEmail, SettingBlockSenderNewResponsePatternTypeDomain, SettingBlockSenderNewResponsePatternTypeIP, SettingBlockSenderNewResponsePatternTypeUnknown: - return true - } - return false -} - -type SettingBlockSenderListResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - IsRegex bool `json:"is_regex,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - PatternType SettingBlockSenderListResponsePatternType `json:"pattern_type,required"` - Comments string `json:"comments,nullable"` - JSON settingBlockSenderListResponseJSON `json:"-"` -} - -// settingBlockSenderListResponseJSON contains the JSON metadata for the struct -// [SettingBlockSenderListResponse] -type settingBlockSenderListResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsRegex apijson.Field - LastModified apijson.Field - Pattern apijson.Field - PatternType apijson.Field - Comments apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingBlockSenderListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingBlockSenderListResponseJSON) RawJSON() string { - return r.raw -} - -type SettingBlockSenderListResponsePatternType string - -const ( - SettingBlockSenderListResponsePatternTypeEmail SettingBlockSenderListResponsePatternType = "EMAIL" - SettingBlockSenderListResponsePatternTypeDomain SettingBlockSenderListResponsePatternType = "DOMAIN" - SettingBlockSenderListResponsePatternTypeIP SettingBlockSenderListResponsePatternType = "IP" - SettingBlockSenderListResponsePatternTypeUnknown SettingBlockSenderListResponsePatternType = "UNKNOWN" -) - -func (r SettingBlockSenderListResponsePatternType) IsKnown() bool { - switch r { - case SettingBlockSenderListResponsePatternTypeEmail, SettingBlockSenderListResponsePatternTypeDomain, SettingBlockSenderListResponsePatternTypeIP, SettingBlockSenderListResponsePatternTypeUnknown: - return true - } - return false -} - -type SettingBlockSenderDeleteResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - JSON settingBlockSenderDeleteResponseJSON `json:"-"` -} - -// settingBlockSenderDeleteResponseJSON contains the JSON metadata for the struct -// [SettingBlockSenderDeleteResponse] -type settingBlockSenderDeleteResponseJSON struct { - ID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingBlockSenderDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingBlockSenderDeleteResponseJSON) RawJSON() string { - return r.raw -} - -type SettingBlockSenderEditResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - IsRegex bool `json:"is_regex,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - PatternType SettingBlockSenderEditResponsePatternType `json:"pattern_type,required"` - Comments string `json:"comments,nullable"` - JSON settingBlockSenderEditResponseJSON `json:"-"` -} - -// settingBlockSenderEditResponseJSON contains the JSON metadata for the struct -// [SettingBlockSenderEditResponse] -type settingBlockSenderEditResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsRegex apijson.Field - LastModified apijson.Field - Pattern apijson.Field - PatternType apijson.Field - Comments apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingBlockSenderEditResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingBlockSenderEditResponseJSON) RawJSON() string { - return r.raw -} - -type SettingBlockSenderEditResponsePatternType string - -const ( - SettingBlockSenderEditResponsePatternTypeEmail SettingBlockSenderEditResponsePatternType = "EMAIL" - SettingBlockSenderEditResponsePatternTypeDomain SettingBlockSenderEditResponsePatternType = "DOMAIN" - SettingBlockSenderEditResponsePatternTypeIP SettingBlockSenderEditResponsePatternType = "IP" - SettingBlockSenderEditResponsePatternTypeUnknown SettingBlockSenderEditResponsePatternType = "UNKNOWN" -) - -func (r SettingBlockSenderEditResponsePatternType) IsKnown() bool { - switch r { - case SettingBlockSenderEditResponsePatternTypeEmail, SettingBlockSenderEditResponsePatternTypeDomain, SettingBlockSenderEditResponsePatternTypeIP, SettingBlockSenderEditResponsePatternTypeUnknown: - return true - } - return false -} - -type SettingBlockSenderGetResponse struct { - // The unique identifier for the allow policy. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - IsRegex bool `json:"is_regex,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - PatternType SettingBlockSenderGetResponsePatternType `json:"pattern_type,required"` - Comments string `json:"comments,nullable"` - JSON settingBlockSenderGetResponseJSON `json:"-"` -} - -// settingBlockSenderGetResponseJSON contains the JSON metadata for the struct -// [SettingBlockSenderGetResponse] -type settingBlockSenderGetResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsRegex apijson.Field - LastModified apijson.Field - Pattern apijson.Field - PatternType apijson.Field - Comments apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingBlockSenderGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingBlockSenderGetResponseJSON) RawJSON() string { - return r.raw -} - -type SettingBlockSenderGetResponsePatternType string - -const ( - SettingBlockSenderGetResponsePatternTypeEmail SettingBlockSenderGetResponsePatternType = "EMAIL" - SettingBlockSenderGetResponsePatternTypeDomain SettingBlockSenderGetResponsePatternType = "DOMAIN" - SettingBlockSenderGetResponsePatternTypeIP SettingBlockSenderGetResponsePatternType = "IP" - SettingBlockSenderGetResponsePatternTypeUnknown SettingBlockSenderGetResponsePatternType = "UNKNOWN" -) - -func (r SettingBlockSenderGetResponsePatternType) IsKnown() bool { - switch r { - case SettingBlockSenderGetResponsePatternTypeEmail, SettingBlockSenderGetResponsePatternTypeDomain, SettingBlockSenderGetResponsePatternTypeIP, SettingBlockSenderGetResponsePatternTypeUnknown: - return true - } - return false -} - -type SettingBlockSenderNewParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - IsRegex param.Field[bool] `json:"is_regex,required"` - Pattern param.Field[string] `json:"pattern,required"` - PatternType param.Field[SettingBlockSenderNewParamsPatternType] `json:"pattern_type,required"` - Comments param.Field[string] `json:"comments"` -} - -func (r SettingBlockSenderNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SettingBlockSenderNewParamsPatternType string - -const ( - SettingBlockSenderNewParamsPatternTypeEmail SettingBlockSenderNewParamsPatternType = "EMAIL" - SettingBlockSenderNewParamsPatternTypeDomain SettingBlockSenderNewParamsPatternType = "DOMAIN" - SettingBlockSenderNewParamsPatternTypeIP SettingBlockSenderNewParamsPatternType = "IP" - SettingBlockSenderNewParamsPatternTypeUnknown SettingBlockSenderNewParamsPatternType = "UNKNOWN" -) - -func (r SettingBlockSenderNewParamsPatternType) IsKnown() bool { - switch r { - case SettingBlockSenderNewParamsPatternTypeEmail, SettingBlockSenderNewParamsPatternTypeDomain, SettingBlockSenderNewParamsPatternTypeIP, SettingBlockSenderNewParamsPatternTypeUnknown: - return true - } - return false -} - -type SettingBlockSenderNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingBlockSenderNewResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingBlockSenderNewResponseEnvelopeJSON `json:"-"` -} - -// settingBlockSenderNewResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingBlockSenderNewResponseEnvelope] -type settingBlockSenderNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingBlockSenderNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingBlockSenderNewResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingBlockSenderListParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // The sorting direction. - Direction param.Field[SettingBlockSenderListParamsDirection] `query:"direction"` - // The field to sort by. - Order param.Field[SettingBlockSenderListParamsOrder] `query:"order"` - // The page number of paginated results. - Page param.Field[int64] `query:"page"` - Pattern param.Field[string] `query:"pattern"` - PatternType param.Field[SettingBlockSenderListParamsPatternType] `query:"pattern_type"` - // The number of results per page. - PerPage param.Field[int64] `query:"per_page"` - // Allows searching in multiple properties of a record simultaneously. This - // parameter is intended for human users, not automation. Its exact behavior is - // intentionally left unspecified and is subject to change in the future. - Search param.Field[string] `query:"search"` -} - -// URLQuery serializes [SettingBlockSenderListParams]'s query parameters as -// `url.Values`. -func (r SettingBlockSenderListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatDots, - }) -} - -// The sorting direction. -type SettingBlockSenderListParamsDirection string - -const ( - SettingBlockSenderListParamsDirectionAsc SettingBlockSenderListParamsDirection = "asc" - SettingBlockSenderListParamsDirectionDesc SettingBlockSenderListParamsDirection = "desc" -) - -func (r SettingBlockSenderListParamsDirection) IsKnown() bool { - switch r { - case SettingBlockSenderListParamsDirectionAsc, SettingBlockSenderListParamsDirectionDesc: - return true - } - return false -} - -// The field to sort by. -type SettingBlockSenderListParamsOrder string - -const ( - SettingBlockSenderListParamsOrderPattern SettingBlockSenderListParamsOrder = "pattern" - SettingBlockSenderListParamsOrderCreatedAt SettingBlockSenderListParamsOrder = "created_at" -) - -func (r SettingBlockSenderListParamsOrder) IsKnown() bool { - switch r { - case SettingBlockSenderListParamsOrderPattern, SettingBlockSenderListParamsOrderCreatedAt: - return true - } - return false -} - -type SettingBlockSenderListParamsPatternType string - -const ( - SettingBlockSenderListParamsPatternTypeEmail SettingBlockSenderListParamsPatternType = "EMAIL" - SettingBlockSenderListParamsPatternTypeDomain SettingBlockSenderListParamsPatternType = "DOMAIN" - SettingBlockSenderListParamsPatternTypeIP SettingBlockSenderListParamsPatternType = "IP" - SettingBlockSenderListParamsPatternTypeUnknown SettingBlockSenderListParamsPatternType = "UNKNOWN" -) - -func (r SettingBlockSenderListParamsPatternType) IsKnown() bool { - switch r { - case SettingBlockSenderListParamsPatternTypeEmail, SettingBlockSenderListParamsPatternTypeDomain, SettingBlockSenderListParamsPatternTypeIP, SettingBlockSenderListParamsPatternTypeUnknown: - return true - } - return false -} - -type SettingBlockSenderDeleteParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingBlockSenderDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingBlockSenderDeleteResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingBlockSenderDeleteResponseEnvelopeJSON `json:"-"` -} - -// settingBlockSenderDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingBlockSenderDeleteResponseEnvelope] -type settingBlockSenderDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingBlockSenderDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingBlockSenderDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingBlockSenderEditParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - Comments param.Field[string] `json:"comments"` - IsRegex param.Field[bool] `json:"is_regex"` - Pattern param.Field[string] `json:"pattern"` - PatternType param.Field[SettingBlockSenderEditParamsPatternType] `json:"pattern_type"` -} - -func (r SettingBlockSenderEditParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SettingBlockSenderEditParamsPatternType string - -const ( - SettingBlockSenderEditParamsPatternTypeEmail SettingBlockSenderEditParamsPatternType = "EMAIL" - SettingBlockSenderEditParamsPatternTypeDomain SettingBlockSenderEditParamsPatternType = "DOMAIN" - SettingBlockSenderEditParamsPatternTypeIP SettingBlockSenderEditParamsPatternType = "IP" - SettingBlockSenderEditParamsPatternTypeUnknown SettingBlockSenderEditParamsPatternType = "UNKNOWN" -) - -func (r SettingBlockSenderEditParamsPatternType) IsKnown() bool { - switch r { - case SettingBlockSenderEditParamsPatternTypeEmail, SettingBlockSenderEditParamsPatternTypeDomain, SettingBlockSenderEditParamsPatternTypeIP, SettingBlockSenderEditParamsPatternTypeUnknown: - return true - } - return false -} - -type SettingBlockSenderEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingBlockSenderEditResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingBlockSenderEditResponseEnvelopeJSON `json:"-"` -} - -// settingBlockSenderEditResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingBlockSenderEditResponseEnvelope] -type settingBlockSenderEditResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingBlockSenderEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingBlockSenderEditResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingBlockSenderGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingBlockSenderGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingBlockSenderGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingBlockSenderGetResponseEnvelopeJSON `json:"-"` -} - -// settingBlockSenderGetResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingBlockSenderGetResponseEnvelope] -type settingBlockSenderGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingBlockSenderGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingBlockSenderGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/settingblocksender_test.go b/email_security/settingblocksender_test.go deleted file mode 100644 index b8ece48cc0d..00000000000 --- a/email_security/settingblocksender_test.go +++ /dev/null @@ -1,167 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestSettingBlockSenderNewWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.BlockSenders.New(context.TODO(), email_security.SettingBlockSenderNewParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - IsRegex: cloudflare.F(false), - Pattern: cloudflare.F("test@example.com"), - PatternType: cloudflare.F(email_security.SettingBlockSenderNewParamsPatternTypeEmail), - Comments: cloudflare.F("block sender with email test@example.com"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingBlockSenderListWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.BlockSenders.List(context.TODO(), email_security.SettingBlockSenderListParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Direction: cloudflare.F(email_security.SettingBlockSenderListParamsDirectionAsc), - Order: cloudflare.F(email_security.SettingBlockSenderListParamsOrderPattern), - Page: cloudflare.F(int64(1)), - Pattern: cloudflare.F("pattern"), - PatternType: cloudflare.F(email_security.SettingBlockSenderListParamsPatternTypeEmail), - PerPage: cloudflare.F(int64(1)), - Search: cloudflare.F("search"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingBlockSenderDelete(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.BlockSenders.Delete( - context.TODO(), - int64(2402), - email_security.SettingBlockSenderDeleteParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingBlockSenderEditWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.BlockSenders.Edit( - context.TODO(), - int64(2402), - email_security.SettingBlockSenderEditParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Comments: cloudflare.F("comments"), - IsRegex: cloudflare.F(true), - Pattern: cloudflare.F("x"), - PatternType: cloudflare.F(email_security.SettingBlockSenderEditParamsPatternTypeEmail), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingBlockSenderGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.BlockSenders.Get( - context.TODO(), - int64(2402), - email_security.SettingBlockSenderGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/settingdomain.go b/email_security/settingdomain.go index d952a556da8..17bd5ba4cde 100644 --- a/email_security/settingdomain.go +++ b/email_security/settingdomain.go @@ -3,21 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "net/url" - "slices" - "time" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/packages/pagination" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // SettingDomainService contains methods and other services that help with @@ -38,1143 +24,3 @@ func NewSettingDomainService(opts ...option.RequestOption) (r *SettingDomainServ r.Options = opts return } - -// Lists, searches, and sorts an account’s email domains. -func (r *SettingDomainService) List(ctx context.Context, params SettingDomainListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingDomainListResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/domains", params.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Lists, searches, and sorts an account’s email domains. -func (r *SettingDomainService) ListAutoPaging(ctx context.Context, params SettingDomainListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingDomainListResponse] { - return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) -} - -// Unprotect an email domain -func (r *SettingDomainService) Delete(ctx context.Context, domainID int64, body SettingDomainDeleteParams, opts ...option.RequestOption) (res *SettingDomainDeleteResponse, err error) { - var env SettingDomainDeleteResponseEnvelope - opts = slices.Concat(r.Options, opts) - if body.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/domains/%v", body.AccountID, domainID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Unprotect multiple email domains -func (r *SettingDomainService) BulkDelete(ctx context.Context, body SettingDomainBulkDeleteParams, opts ...option.RequestOption) (res *pagination.SinglePage[SettingDomainBulkDeleteResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if body.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/domains", body.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodDelete, path, nil, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Unprotect multiple email domains -func (r *SettingDomainService) BulkDeleteAutoPaging(ctx context.Context, body SettingDomainBulkDeleteParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[SettingDomainBulkDeleteResponse] { - return pagination.NewSinglePageAutoPager(r.BulkDelete(ctx, body, opts...)) -} - -// Update an email domain -func (r *SettingDomainService) Edit(ctx context.Context, domainID int64, params SettingDomainEditParams, opts ...option.RequestOption) (res *SettingDomainEditResponse, err error) { - var env SettingDomainEditResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/domains/%v", params.AccountID, domainID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Get an email domain -func (r *SettingDomainService) Get(ctx context.Context, domainID int64, query SettingDomainGetParams, opts ...option.RequestOption) (res *SettingDomainGetResponse, err error) { - var env SettingDomainGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/domains/%v", query.AccountID, domainID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type SettingDomainListResponse struct { - // The unique identifier for the domain. - ID int64 `json:"id,required"` - AllowedDeliveryModes []SettingDomainListResponseAllowedDeliveryMode `json:"allowed_delivery_modes,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Domain string `json:"domain,required"` - DropDispositions []SettingDomainListResponseDropDisposition `json:"drop_dispositions,required"` - IPRestrictions []string `json:"ip_restrictions,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - LookbackHops int64 `json:"lookback_hops,required"` - Regions []SettingDomainListResponseRegion `json:"regions,required"` - Transport string `json:"transport,required"` - Authorization SettingDomainListResponseAuthorization `json:"authorization,nullable"` - DMARCStatus SettingDomainListResponseDMARCStatus `json:"dmarc_status,nullable"` - EmailsProcessed SettingDomainListResponseEmailsProcessed `json:"emails_processed,nullable"` - Folder SettingDomainListResponseFolder `json:"folder,nullable"` - InboxProvider SettingDomainListResponseInboxProvider `json:"inbox_provider,nullable"` - IntegrationID string `json:"integration_id,nullable" format:"uuid"` - O365TenantID string `json:"o365_tenant_id,nullable"` - RequireTLSInbound bool `json:"require_tls_inbound,nullable"` - RequireTLSOutbound bool `json:"require_tls_outbound,nullable"` - SPFStatus SettingDomainListResponseSPFStatus `json:"spf_status,nullable"` - JSON settingDomainListResponseJSON `json:"-"` -} - -// settingDomainListResponseJSON contains the JSON metadata for the struct -// [SettingDomainListResponse] -type settingDomainListResponseJSON struct { - ID apijson.Field - AllowedDeliveryModes apijson.Field - CreatedAt apijson.Field - Domain apijson.Field - DropDispositions apijson.Field - IPRestrictions apijson.Field - LastModified apijson.Field - LookbackHops apijson.Field - Regions apijson.Field - Transport apijson.Field - Authorization apijson.Field - DMARCStatus apijson.Field - EmailsProcessed apijson.Field - Folder apijson.Field - InboxProvider apijson.Field - IntegrationID apijson.Field - O365TenantID apijson.Field - RequireTLSInbound apijson.Field - RequireTLSOutbound apijson.Field - SPFStatus apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainListResponseJSON) RawJSON() string { - return r.raw -} - -type SettingDomainListResponseAllowedDeliveryMode string - -const ( - SettingDomainListResponseAllowedDeliveryModeDirect SettingDomainListResponseAllowedDeliveryMode = "DIRECT" - SettingDomainListResponseAllowedDeliveryModeBcc SettingDomainListResponseAllowedDeliveryMode = "BCC" - SettingDomainListResponseAllowedDeliveryModeJournal SettingDomainListResponseAllowedDeliveryMode = "JOURNAL" - SettingDomainListResponseAllowedDeliveryModeAPI SettingDomainListResponseAllowedDeliveryMode = "API" - SettingDomainListResponseAllowedDeliveryModeRetroScan SettingDomainListResponseAllowedDeliveryMode = "RETRO_SCAN" -) - -func (r SettingDomainListResponseAllowedDeliveryMode) IsKnown() bool { - switch r { - case SettingDomainListResponseAllowedDeliveryModeDirect, SettingDomainListResponseAllowedDeliveryModeBcc, SettingDomainListResponseAllowedDeliveryModeJournal, SettingDomainListResponseAllowedDeliveryModeAPI, SettingDomainListResponseAllowedDeliveryModeRetroScan: - return true - } - return false -} - -type SettingDomainListResponseDropDisposition string - -const ( - SettingDomainListResponseDropDispositionMalicious SettingDomainListResponseDropDisposition = "MALICIOUS" - SettingDomainListResponseDropDispositionMaliciousBec SettingDomainListResponseDropDisposition = "MALICIOUS-BEC" - SettingDomainListResponseDropDispositionSuspicious SettingDomainListResponseDropDisposition = "SUSPICIOUS" - SettingDomainListResponseDropDispositionSpoof SettingDomainListResponseDropDisposition = "SPOOF" - SettingDomainListResponseDropDispositionSpam SettingDomainListResponseDropDisposition = "SPAM" - SettingDomainListResponseDropDispositionBulk SettingDomainListResponseDropDisposition = "BULK" - SettingDomainListResponseDropDispositionEncrypted SettingDomainListResponseDropDisposition = "ENCRYPTED" - SettingDomainListResponseDropDispositionExternal SettingDomainListResponseDropDisposition = "EXTERNAL" - SettingDomainListResponseDropDispositionUnknown SettingDomainListResponseDropDisposition = "UNKNOWN" - SettingDomainListResponseDropDispositionNone SettingDomainListResponseDropDisposition = "NONE" -) - -func (r SettingDomainListResponseDropDisposition) IsKnown() bool { - switch r { - case SettingDomainListResponseDropDispositionMalicious, SettingDomainListResponseDropDispositionMaliciousBec, SettingDomainListResponseDropDispositionSuspicious, SettingDomainListResponseDropDispositionSpoof, SettingDomainListResponseDropDispositionSpam, SettingDomainListResponseDropDispositionBulk, SettingDomainListResponseDropDispositionEncrypted, SettingDomainListResponseDropDispositionExternal, SettingDomainListResponseDropDispositionUnknown, SettingDomainListResponseDropDispositionNone: - return true - } - return false -} - -type SettingDomainListResponseRegion string - -const ( - SettingDomainListResponseRegionGlobal SettingDomainListResponseRegion = "GLOBAL" - SettingDomainListResponseRegionAu SettingDomainListResponseRegion = "AU" - SettingDomainListResponseRegionDe SettingDomainListResponseRegion = "DE" - SettingDomainListResponseRegionIn SettingDomainListResponseRegion = "IN" - SettingDomainListResponseRegionUs SettingDomainListResponseRegion = "US" -) - -func (r SettingDomainListResponseRegion) IsKnown() bool { - switch r { - case SettingDomainListResponseRegionGlobal, SettingDomainListResponseRegionAu, SettingDomainListResponseRegionDe, SettingDomainListResponseRegionIn, SettingDomainListResponseRegionUs: - return true - } - return false -} - -type SettingDomainListResponseAuthorization struct { - Authorized bool `json:"authorized,required"` - Timestamp time.Time `json:"timestamp,required" format:"date-time"` - StatusMessage string `json:"status_message,nullable"` - JSON settingDomainListResponseAuthorizationJSON `json:"-"` -} - -// settingDomainListResponseAuthorizationJSON contains the JSON metadata for the -// struct [SettingDomainListResponseAuthorization] -type settingDomainListResponseAuthorizationJSON struct { - Authorized apijson.Field - Timestamp apijson.Field - StatusMessage apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainListResponseAuthorization) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainListResponseAuthorizationJSON) RawJSON() string { - return r.raw -} - -type SettingDomainListResponseDMARCStatus string - -const ( - SettingDomainListResponseDMARCStatusNone SettingDomainListResponseDMARCStatus = "none" - SettingDomainListResponseDMARCStatusGood SettingDomainListResponseDMARCStatus = "good" - SettingDomainListResponseDMARCStatusInvalid SettingDomainListResponseDMARCStatus = "invalid" -) - -func (r SettingDomainListResponseDMARCStatus) IsKnown() bool { - switch r { - case SettingDomainListResponseDMARCStatusNone, SettingDomainListResponseDMARCStatusGood, SettingDomainListResponseDMARCStatusInvalid: - return true - } - return false -} - -type SettingDomainListResponseEmailsProcessed struct { - Timestamp time.Time `json:"timestamp,required" format:"date-time"` - TotalEmailsProcessed int64 `json:"total_emails_processed,required"` - TotalEmailsProcessedPrevious int64 `json:"total_emails_processed_previous,required"` - JSON settingDomainListResponseEmailsProcessedJSON `json:"-"` -} - -// settingDomainListResponseEmailsProcessedJSON contains the JSON metadata for the -// struct [SettingDomainListResponseEmailsProcessed] -type settingDomainListResponseEmailsProcessedJSON struct { - Timestamp apijson.Field - TotalEmailsProcessed apijson.Field - TotalEmailsProcessedPrevious apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainListResponseEmailsProcessed) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainListResponseEmailsProcessedJSON) RawJSON() string { - return r.raw -} - -type SettingDomainListResponseFolder string - -const ( - SettingDomainListResponseFolderAllItems SettingDomainListResponseFolder = "AllItems" - SettingDomainListResponseFolderInbox SettingDomainListResponseFolder = "Inbox" -) - -func (r SettingDomainListResponseFolder) IsKnown() bool { - switch r { - case SettingDomainListResponseFolderAllItems, SettingDomainListResponseFolderInbox: - return true - } - return false -} - -type SettingDomainListResponseInboxProvider string - -const ( - SettingDomainListResponseInboxProviderMicrosoft SettingDomainListResponseInboxProvider = "Microsoft" - SettingDomainListResponseInboxProviderGoogle SettingDomainListResponseInboxProvider = "Google" -) - -func (r SettingDomainListResponseInboxProvider) IsKnown() bool { - switch r { - case SettingDomainListResponseInboxProviderMicrosoft, SettingDomainListResponseInboxProviderGoogle: - return true - } - return false -} - -type SettingDomainListResponseSPFStatus string - -const ( - SettingDomainListResponseSPFStatusNone SettingDomainListResponseSPFStatus = "none" - SettingDomainListResponseSPFStatusGood SettingDomainListResponseSPFStatus = "good" - SettingDomainListResponseSPFStatusNeutral SettingDomainListResponseSPFStatus = "neutral" - SettingDomainListResponseSPFStatusOpen SettingDomainListResponseSPFStatus = "open" - SettingDomainListResponseSPFStatusInvalid SettingDomainListResponseSPFStatus = "invalid" -) - -func (r SettingDomainListResponseSPFStatus) IsKnown() bool { - switch r { - case SettingDomainListResponseSPFStatusNone, SettingDomainListResponseSPFStatusGood, SettingDomainListResponseSPFStatusNeutral, SettingDomainListResponseSPFStatusOpen, SettingDomainListResponseSPFStatusInvalid: - return true - } - return false -} - -type SettingDomainDeleteResponse struct { - // The unique identifier for the domain. - ID int64 `json:"id,required"` - JSON settingDomainDeleteResponseJSON `json:"-"` -} - -// settingDomainDeleteResponseJSON contains the JSON metadata for the struct -// [SettingDomainDeleteResponse] -type settingDomainDeleteResponseJSON struct { - ID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainDeleteResponseJSON) RawJSON() string { - return r.raw -} - -type SettingDomainBulkDeleteResponse struct { - // The unique identifier for the domain. - ID int64 `json:"id,required"` - JSON settingDomainBulkDeleteResponseJSON `json:"-"` -} - -// settingDomainBulkDeleteResponseJSON contains the JSON metadata for the struct -// [SettingDomainBulkDeleteResponse] -type settingDomainBulkDeleteResponseJSON struct { - ID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainBulkDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainBulkDeleteResponseJSON) RawJSON() string { - return r.raw -} - -type SettingDomainEditResponse struct { - // The unique identifier for the domain. - ID int64 `json:"id,required"` - AllowedDeliveryModes []SettingDomainEditResponseAllowedDeliveryMode `json:"allowed_delivery_modes,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Domain string `json:"domain,required"` - DropDispositions []SettingDomainEditResponseDropDisposition `json:"drop_dispositions,required"` - IPRestrictions []string `json:"ip_restrictions,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - LookbackHops int64 `json:"lookback_hops,required"` - Regions []SettingDomainEditResponseRegion `json:"regions,required"` - Transport string `json:"transport,required"` - Authorization SettingDomainEditResponseAuthorization `json:"authorization,nullable"` - DMARCStatus SettingDomainEditResponseDMARCStatus `json:"dmarc_status,nullable"` - EmailsProcessed SettingDomainEditResponseEmailsProcessed `json:"emails_processed,nullable"` - Folder SettingDomainEditResponseFolder `json:"folder,nullable"` - InboxProvider SettingDomainEditResponseInboxProvider `json:"inbox_provider,nullable"` - IntegrationID string `json:"integration_id,nullable" format:"uuid"` - O365TenantID string `json:"o365_tenant_id,nullable"` - RequireTLSInbound bool `json:"require_tls_inbound,nullable"` - RequireTLSOutbound bool `json:"require_tls_outbound,nullable"` - SPFStatus SettingDomainEditResponseSPFStatus `json:"spf_status,nullable"` - JSON settingDomainEditResponseJSON `json:"-"` -} - -// settingDomainEditResponseJSON contains the JSON metadata for the struct -// [SettingDomainEditResponse] -type settingDomainEditResponseJSON struct { - ID apijson.Field - AllowedDeliveryModes apijson.Field - CreatedAt apijson.Field - Domain apijson.Field - DropDispositions apijson.Field - IPRestrictions apijson.Field - LastModified apijson.Field - LookbackHops apijson.Field - Regions apijson.Field - Transport apijson.Field - Authorization apijson.Field - DMARCStatus apijson.Field - EmailsProcessed apijson.Field - Folder apijson.Field - InboxProvider apijson.Field - IntegrationID apijson.Field - O365TenantID apijson.Field - RequireTLSInbound apijson.Field - RequireTLSOutbound apijson.Field - SPFStatus apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainEditResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainEditResponseJSON) RawJSON() string { - return r.raw -} - -type SettingDomainEditResponseAllowedDeliveryMode string - -const ( - SettingDomainEditResponseAllowedDeliveryModeDirect SettingDomainEditResponseAllowedDeliveryMode = "DIRECT" - SettingDomainEditResponseAllowedDeliveryModeBcc SettingDomainEditResponseAllowedDeliveryMode = "BCC" - SettingDomainEditResponseAllowedDeliveryModeJournal SettingDomainEditResponseAllowedDeliveryMode = "JOURNAL" - SettingDomainEditResponseAllowedDeliveryModeAPI SettingDomainEditResponseAllowedDeliveryMode = "API" - SettingDomainEditResponseAllowedDeliveryModeRetroScan SettingDomainEditResponseAllowedDeliveryMode = "RETRO_SCAN" -) - -func (r SettingDomainEditResponseAllowedDeliveryMode) IsKnown() bool { - switch r { - case SettingDomainEditResponseAllowedDeliveryModeDirect, SettingDomainEditResponseAllowedDeliveryModeBcc, SettingDomainEditResponseAllowedDeliveryModeJournal, SettingDomainEditResponseAllowedDeliveryModeAPI, SettingDomainEditResponseAllowedDeliveryModeRetroScan: - return true - } - return false -} - -type SettingDomainEditResponseDropDisposition string - -const ( - SettingDomainEditResponseDropDispositionMalicious SettingDomainEditResponseDropDisposition = "MALICIOUS" - SettingDomainEditResponseDropDispositionMaliciousBec SettingDomainEditResponseDropDisposition = "MALICIOUS-BEC" - SettingDomainEditResponseDropDispositionSuspicious SettingDomainEditResponseDropDisposition = "SUSPICIOUS" - SettingDomainEditResponseDropDispositionSpoof SettingDomainEditResponseDropDisposition = "SPOOF" - SettingDomainEditResponseDropDispositionSpam SettingDomainEditResponseDropDisposition = "SPAM" - SettingDomainEditResponseDropDispositionBulk SettingDomainEditResponseDropDisposition = "BULK" - SettingDomainEditResponseDropDispositionEncrypted SettingDomainEditResponseDropDisposition = "ENCRYPTED" - SettingDomainEditResponseDropDispositionExternal SettingDomainEditResponseDropDisposition = "EXTERNAL" - SettingDomainEditResponseDropDispositionUnknown SettingDomainEditResponseDropDisposition = "UNKNOWN" - SettingDomainEditResponseDropDispositionNone SettingDomainEditResponseDropDisposition = "NONE" -) - -func (r SettingDomainEditResponseDropDisposition) IsKnown() bool { - switch r { - case SettingDomainEditResponseDropDispositionMalicious, SettingDomainEditResponseDropDispositionMaliciousBec, SettingDomainEditResponseDropDispositionSuspicious, SettingDomainEditResponseDropDispositionSpoof, SettingDomainEditResponseDropDispositionSpam, SettingDomainEditResponseDropDispositionBulk, SettingDomainEditResponseDropDispositionEncrypted, SettingDomainEditResponseDropDispositionExternal, SettingDomainEditResponseDropDispositionUnknown, SettingDomainEditResponseDropDispositionNone: - return true - } - return false -} - -type SettingDomainEditResponseRegion string - -const ( - SettingDomainEditResponseRegionGlobal SettingDomainEditResponseRegion = "GLOBAL" - SettingDomainEditResponseRegionAu SettingDomainEditResponseRegion = "AU" - SettingDomainEditResponseRegionDe SettingDomainEditResponseRegion = "DE" - SettingDomainEditResponseRegionIn SettingDomainEditResponseRegion = "IN" - SettingDomainEditResponseRegionUs SettingDomainEditResponseRegion = "US" -) - -func (r SettingDomainEditResponseRegion) IsKnown() bool { - switch r { - case SettingDomainEditResponseRegionGlobal, SettingDomainEditResponseRegionAu, SettingDomainEditResponseRegionDe, SettingDomainEditResponseRegionIn, SettingDomainEditResponseRegionUs: - return true - } - return false -} - -type SettingDomainEditResponseAuthorization struct { - Authorized bool `json:"authorized,required"` - Timestamp time.Time `json:"timestamp,required" format:"date-time"` - StatusMessage string `json:"status_message,nullable"` - JSON settingDomainEditResponseAuthorizationJSON `json:"-"` -} - -// settingDomainEditResponseAuthorizationJSON contains the JSON metadata for the -// struct [SettingDomainEditResponseAuthorization] -type settingDomainEditResponseAuthorizationJSON struct { - Authorized apijson.Field - Timestamp apijson.Field - StatusMessage apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainEditResponseAuthorization) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainEditResponseAuthorizationJSON) RawJSON() string { - return r.raw -} - -type SettingDomainEditResponseDMARCStatus string - -const ( - SettingDomainEditResponseDMARCStatusNone SettingDomainEditResponseDMARCStatus = "none" - SettingDomainEditResponseDMARCStatusGood SettingDomainEditResponseDMARCStatus = "good" - SettingDomainEditResponseDMARCStatusInvalid SettingDomainEditResponseDMARCStatus = "invalid" -) - -func (r SettingDomainEditResponseDMARCStatus) IsKnown() bool { - switch r { - case SettingDomainEditResponseDMARCStatusNone, SettingDomainEditResponseDMARCStatusGood, SettingDomainEditResponseDMARCStatusInvalid: - return true - } - return false -} - -type SettingDomainEditResponseEmailsProcessed struct { - Timestamp time.Time `json:"timestamp,required" format:"date-time"` - TotalEmailsProcessed int64 `json:"total_emails_processed,required"` - TotalEmailsProcessedPrevious int64 `json:"total_emails_processed_previous,required"` - JSON settingDomainEditResponseEmailsProcessedJSON `json:"-"` -} - -// settingDomainEditResponseEmailsProcessedJSON contains the JSON metadata for the -// struct [SettingDomainEditResponseEmailsProcessed] -type settingDomainEditResponseEmailsProcessedJSON struct { - Timestamp apijson.Field - TotalEmailsProcessed apijson.Field - TotalEmailsProcessedPrevious apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainEditResponseEmailsProcessed) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainEditResponseEmailsProcessedJSON) RawJSON() string { - return r.raw -} - -type SettingDomainEditResponseFolder string - -const ( - SettingDomainEditResponseFolderAllItems SettingDomainEditResponseFolder = "AllItems" - SettingDomainEditResponseFolderInbox SettingDomainEditResponseFolder = "Inbox" -) - -func (r SettingDomainEditResponseFolder) IsKnown() bool { - switch r { - case SettingDomainEditResponseFolderAllItems, SettingDomainEditResponseFolderInbox: - return true - } - return false -} - -type SettingDomainEditResponseInboxProvider string - -const ( - SettingDomainEditResponseInboxProviderMicrosoft SettingDomainEditResponseInboxProvider = "Microsoft" - SettingDomainEditResponseInboxProviderGoogle SettingDomainEditResponseInboxProvider = "Google" -) - -func (r SettingDomainEditResponseInboxProvider) IsKnown() bool { - switch r { - case SettingDomainEditResponseInboxProviderMicrosoft, SettingDomainEditResponseInboxProviderGoogle: - return true - } - return false -} - -type SettingDomainEditResponseSPFStatus string - -const ( - SettingDomainEditResponseSPFStatusNone SettingDomainEditResponseSPFStatus = "none" - SettingDomainEditResponseSPFStatusGood SettingDomainEditResponseSPFStatus = "good" - SettingDomainEditResponseSPFStatusNeutral SettingDomainEditResponseSPFStatus = "neutral" - SettingDomainEditResponseSPFStatusOpen SettingDomainEditResponseSPFStatus = "open" - SettingDomainEditResponseSPFStatusInvalid SettingDomainEditResponseSPFStatus = "invalid" -) - -func (r SettingDomainEditResponseSPFStatus) IsKnown() bool { - switch r { - case SettingDomainEditResponseSPFStatusNone, SettingDomainEditResponseSPFStatusGood, SettingDomainEditResponseSPFStatusNeutral, SettingDomainEditResponseSPFStatusOpen, SettingDomainEditResponseSPFStatusInvalid: - return true - } - return false -} - -type SettingDomainGetResponse struct { - // The unique identifier for the domain. - ID int64 `json:"id,required"` - AllowedDeliveryModes []SettingDomainGetResponseAllowedDeliveryMode `json:"allowed_delivery_modes,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Domain string `json:"domain,required"` - DropDispositions []SettingDomainGetResponseDropDisposition `json:"drop_dispositions,required"` - IPRestrictions []string `json:"ip_restrictions,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - LookbackHops int64 `json:"lookback_hops,required"` - Regions []SettingDomainGetResponseRegion `json:"regions,required"` - Transport string `json:"transport,required"` - Authorization SettingDomainGetResponseAuthorization `json:"authorization,nullable"` - DMARCStatus SettingDomainGetResponseDMARCStatus `json:"dmarc_status,nullable"` - EmailsProcessed SettingDomainGetResponseEmailsProcessed `json:"emails_processed,nullable"` - Folder SettingDomainGetResponseFolder `json:"folder,nullable"` - InboxProvider SettingDomainGetResponseInboxProvider `json:"inbox_provider,nullable"` - IntegrationID string `json:"integration_id,nullable" format:"uuid"` - O365TenantID string `json:"o365_tenant_id,nullable"` - RequireTLSInbound bool `json:"require_tls_inbound,nullable"` - RequireTLSOutbound bool `json:"require_tls_outbound,nullable"` - SPFStatus SettingDomainGetResponseSPFStatus `json:"spf_status,nullable"` - JSON settingDomainGetResponseJSON `json:"-"` -} - -// settingDomainGetResponseJSON contains the JSON metadata for the struct -// [SettingDomainGetResponse] -type settingDomainGetResponseJSON struct { - ID apijson.Field - AllowedDeliveryModes apijson.Field - CreatedAt apijson.Field - Domain apijson.Field - DropDispositions apijson.Field - IPRestrictions apijson.Field - LastModified apijson.Field - LookbackHops apijson.Field - Regions apijson.Field - Transport apijson.Field - Authorization apijson.Field - DMARCStatus apijson.Field - EmailsProcessed apijson.Field - Folder apijson.Field - InboxProvider apijson.Field - IntegrationID apijson.Field - O365TenantID apijson.Field - RequireTLSInbound apijson.Field - RequireTLSOutbound apijson.Field - SPFStatus apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainGetResponseJSON) RawJSON() string { - return r.raw -} - -type SettingDomainGetResponseAllowedDeliveryMode string - -const ( - SettingDomainGetResponseAllowedDeliveryModeDirect SettingDomainGetResponseAllowedDeliveryMode = "DIRECT" - SettingDomainGetResponseAllowedDeliveryModeBcc SettingDomainGetResponseAllowedDeliveryMode = "BCC" - SettingDomainGetResponseAllowedDeliveryModeJournal SettingDomainGetResponseAllowedDeliveryMode = "JOURNAL" - SettingDomainGetResponseAllowedDeliveryModeAPI SettingDomainGetResponseAllowedDeliveryMode = "API" - SettingDomainGetResponseAllowedDeliveryModeRetroScan SettingDomainGetResponseAllowedDeliveryMode = "RETRO_SCAN" -) - -func (r SettingDomainGetResponseAllowedDeliveryMode) IsKnown() bool { - switch r { - case SettingDomainGetResponseAllowedDeliveryModeDirect, SettingDomainGetResponseAllowedDeliveryModeBcc, SettingDomainGetResponseAllowedDeliveryModeJournal, SettingDomainGetResponseAllowedDeliveryModeAPI, SettingDomainGetResponseAllowedDeliveryModeRetroScan: - return true - } - return false -} - -type SettingDomainGetResponseDropDisposition string - -const ( - SettingDomainGetResponseDropDispositionMalicious SettingDomainGetResponseDropDisposition = "MALICIOUS" - SettingDomainGetResponseDropDispositionMaliciousBec SettingDomainGetResponseDropDisposition = "MALICIOUS-BEC" - SettingDomainGetResponseDropDispositionSuspicious SettingDomainGetResponseDropDisposition = "SUSPICIOUS" - SettingDomainGetResponseDropDispositionSpoof SettingDomainGetResponseDropDisposition = "SPOOF" - SettingDomainGetResponseDropDispositionSpam SettingDomainGetResponseDropDisposition = "SPAM" - SettingDomainGetResponseDropDispositionBulk SettingDomainGetResponseDropDisposition = "BULK" - SettingDomainGetResponseDropDispositionEncrypted SettingDomainGetResponseDropDisposition = "ENCRYPTED" - SettingDomainGetResponseDropDispositionExternal SettingDomainGetResponseDropDisposition = "EXTERNAL" - SettingDomainGetResponseDropDispositionUnknown SettingDomainGetResponseDropDisposition = "UNKNOWN" - SettingDomainGetResponseDropDispositionNone SettingDomainGetResponseDropDisposition = "NONE" -) - -func (r SettingDomainGetResponseDropDisposition) IsKnown() bool { - switch r { - case SettingDomainGetResponseDropDispositionMalicious, SettingDomainGetResponseDropDispositionMaliciousBec, SettingDomainGetResponseDropDispositionSuspicious, SettingDomainGetResponseDropDispositionSpoof, SettingDomainGetResponseDropDispositionSpam, SettingDomainGetResponseDropDispositionBulk, SettingDomainGetResponseDropDispositionEncrypted, SettingDomainGetResponseDropDispositionExternal, SettingDomainGetResponseDropDispositionUnknown, SettingDomainGetResponseDropDispositionNone: - return true - } - return false -} - -type SettingDomainGetResponseRegion string - -const ( - SettingDomainGetResponseRegionGlobal SettingDomainGetResponseRegion = "GLOBAL" - SettingDomainGetResponseRegionAu SettingDomainGetResponseRegion = "AU" - SettingDomainGetResponseRegionDe SettingDomainGetResponseRegion = "DE" - SettingDomainGetResponseRegionIn SettingDomainGetResponseRegion = "IN" - SettingDomainGetResponseRegionUs SettingDomainGetResponseRegion = "US" -) - -func (r SettingDomainGetResponseRegion) IsKnown() bool { - switch r { - case SettingDomainGetResponseRegionGlobal, SettingDomainGetResponseRegionAu, SettingDomainGetResponseRegionDe, SettingDomainGetResponseRegionIn, SettingDomainGetResponseRegionUs: - return true - } - return false -} - -type SettingDomainGetResponseAuthorization struct { - Authorized bool `json:"authorized,required"` - Timestamp time.Time `json:"timestamp,required" format:"date-time"` - StatusMessage string `json:"status_message,nullable"` - JSON settingDomainGetResponseAuthorizationJSON `json:"-"` -} - -// settingDomainGetResponseAuthorizationJSON contains the JSON metadata for the -// struct [SettingDomainGetResponseAuthorization] -type settingDomainGetResponseAuthorizationJSON struct { - Authorized apijson.Field - Timestamp apijson.Field - StatusMessage apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainGetResponseAuthorization) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainGetResponseAuthorizationJSON) RawJSON() string { - return r.raw -} - -type SettingDomainGetResponseDMARCStatus string - -const ( - SettingDomainGetResponseDMARCStatusNone SettingDomainGetResponseDMARCStatus = "none" - SettingDomainGetResponseDMARCStatusGood SettingDomainGetResponseDMARCStatus = "good" - SettingDomainGetResponseDMARCStatusInvalid SettingDomainGetResponseDMARCStatus = "invalid" -) - -func (r SettingDomainGetResponseDMARCStatus) IsKnown() bool { - switch r { - case SettingDomainGetResponseDMARCStatusNone, SettingDomainGetResponseDMARCStatusGood, SettingDomainGetResponseDMARCStatusInvalid: - return true - } - return false -} - -type SettingDomainGetResponseEmailsProcessed struct { - Timestamp time.Time `json:"timestamp,required" format:"date-time"` - TotalEmailsProcessed int64 `json:"total_emails_processed,required"` - TotalEmailsProcessedPrevious int64 `json:"total_emails_processed_previous,required"` - JSON settingDomainGetResponseEmailsProcessedJSON `json:"-"` -} - -// settingDomainGetResponseEmailsProcessedJSON contains the JSON metadata for the -// struct [SettingDomainGetResponseEmailsProcessed] -type settingDomainGetResponseEmailsProcessedJSON struct { - Timestamp apijson.Field - TotalEmailsProcessed apijson.Field - TotalEmailsProcessedPrevious apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainGetResponseEmailsProcessed) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainGetResponseEmailsProcessedJSON) RawJSON() string { - return r.raw -} - -type SettingDomainGetResponseFolder string - -const ( - SettingDomainGetResponseFolderAllItems SettingDomainGetResponseFolder = "AllItems" - SettingDomainGetResponseFolderInbox SettingDomainGetResponseFolder = "Inbox" -) - -func (r SettingDomainGetResponseFolder) IsKnown() bool { - switch r { - case SettingDomainGetResponseFolderAllItems, SettingDomainGetResponseFolderInbox: - return true - } - return false -} - -type SettingDomainGetResponseInboxProvider string - -const ( - SettingDomainGetResponseInboxProviderMicrosoft SettingDomainGetResponseInboxProvider = "Microsoft" - SettingDomainGetResponseInboxProviderGoogle SettingDomainGetResponseInboxProvider = "Google" -) - -func (r SettingDomainGetResponseInboxProvider) IsKnown() bool { - switch r { - case SettingDomainGetResponseInboxProviderMicrosoft, SettingDomainGetResponseInboxProviderGoogle: - return true - } - return false -} - -type SettingDomainGetResponseSPFStatus string - -const ( - SettingDomainGetResponseSPFStatusNone SettingDomainGetResponseSPFStatus = "none" - SettingDomainGetResponseSPFStatusGood SettingDomainGetResponseSPFStatus = "good" - SettingDomainGetResponseSPFStatusNeutral SettingDomainGetResponseSPFStatus = "neutral" - SettingDomainGetResponseSPFStatusOpen SettingDomainGetResponseSPFStatus = "open" - SettingDomainGetResponseSPFStatusInvalid SettingDomainGetResponseSPFStatus = "invalid" -) - -func (r SettingDomainGetResponseSPFStatus) IsKnown() bool { - switch r { - case SettingDomainGetResponseSPFStatusNone, SettingDomainGetResponseSPFStatusGood, SettingDomainGetResponseSPFStatusNeutral, SettingDomainGetResponseSPFStatusOpen, SettingDomainGetResponseSPFStatusInvalid: - return true - } - return false -} - -type SettingDomainListParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // Filters response to domains with the currently active delivery mode. - ActiveDeliveryMode param.Field[SettingDomainListParamsActiveDeliveryMode] `query:"active_delivery_mode"` - // Filters response to domains with the provided delivery mode. - AllowedDeliveryMode param.Field[SettingDomainListParamsAllowedDeliveryMode] `query:"allowed_delivery_mode"` - // The sorting direction. - Direction param.Field[SettingDomainListParamsDirection] `query:"direction"` - // Filters results by the provided domains, allowing for multiple occurrences. - Domain param.Field[[]string] `query:"domain"` - // The field to sort by. - Order param.Field[SettingDomainListParamsOrder] `query:"order"` - // The page number of paginated results. - Page param.Field[int64] `query:"page"` - // The number of results per page. - PerPage param.Field[int64] `query:"per_page"` - // Allows searching in multiple properties of a record simultaneously. This - // parameter is intended for human users, not automation. Its exact behavior is - // intentionally left unspecified and is subject to change in the future. - Search param.Field[string] `query:"search"` -} - -// URLQuery serializes [SettingDomainListParams]'s query parameters as -// `url.Values`. -func (r SettingDomainListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatDots, - }) -} - -// Filters response to domains with the currently active delivery mode. -type SettingDomainListParamsActiveDeliveryMode string - -const ( - SettingDomainListParamsActiveDeliveryModeDirect SettingDomainListParamsActiveDeliveryMode = "DIRECT" - SettingDomainListParamsActiveDeliveryModeBcc SettingDomainListParamsActiveDeliveryMode = "BCC" - SettingDomainListParamsActiveDeliveryModeJournal SettingDomainListParamsActiveDeliveryMode = "JOURNAL" - SettingDomainListParamsActiveDeliveryModeAPI SettingDomainListParamsActiveDeliveryMode = "API" - SettingDomainListParamsActiveDeliveryModeRetroScan SettingDomainListParamsActiveDeliveryMode = "RETRO_SCAN" -) - -func (r SettingDomainListParamsActiveDeliveryMode) IsKnown() bool { - switch r { - case SettingDomainListParamsActiveDeliveryModeDirect, SettingDomainListParamsActiveDeliveryModeBcc, SettingDomainListParamsActiveDeliveryModeJournal, SettingDomainListParamsActiveDeliveryModeAPI, SettingDomainListParamsActiveDeliveryModeRetroScan: - return true - } - return false -} - -// Filters response to domains with the provided delivery mode. -type SettingDomainListParamsAllowedDeliveryMode string - -const ( - SettingDomainListParamsAllowedDeliveryModeDirect SettingDomainListParamsAllowedDeliveryMode = "DIRECT" - SettingDomainListParamsAllowedDeliveryModeBcc SettingDomainListParamsAllowedDeliveryMode = "BCC" - SettingDomainListParamsAllowedDeliveryModeJournal SettingDomainListParamsAllowedDeliveryMode = "JOURNAL" - SettingDomainListParamsAllowedDeliveryModeAPI SettingDomainListParamsAllowedDeliveryMode = "API" - SettingDomainListParamsAllowedDeliveryModeRetroScan SettingDomainListParamsAllowedDeliveryMode = "RETRO_SCAN" -) - -func (r SettingDomainListParamsAllowedDeliveryMode) IsKnown() bool { - switch r { - case SettingDomainListParamsAllowedDeliveryModeDirect, SettingDomainListParamsAllowedDeliveryModeBcc, SettingDomainListParamsAllowedDeliveryModeJournal, SettingDomainListParamsAllowedDeliveryModeAPI, SettingDomainListParamsAllowedDeliveryModeRetroScan: - return true - } - return false -} - -// The sorting direction. -type SettingDomainListParamsDirection string - -const ( - SettingDomainListParamsDirectionAsc SettingDomainListParamsDirection = "asc" - SettingDomainListParamsDirectionDesc SettingDomainListParamsDirection = "desc" -) - -func (r SettingDomainListParamsDirection) IsKnown() bool { - switch r { - case SettingDomainListParamsDirectionAsc, SettingDomainListParamsDirectionDesc: - return true - } - return false -} - -// The field to sort by. -type SettingDomainListParamsOrder string - -const ( - SettingDomainListParamsOrderDomain SettingDomainListParamsOrder = "domain" - SettingDomainListParamsOrderCreatedAt SettingDomainListParamsOrder = "created_at" -) - -func (r SettingDomainListParamsOrder) IsKnown() bool { - switch r { - case SettingDomainListParamsOrderDomain, SettingDomainListParamsOrderCreatedAt: - return true - } - return false -} - -type SettingDomainDeleteParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingDomainDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingDomainDeleteResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingDomainDeleteResponseEnvelopeJSON `json:"-"` -} - -// settingDomainDeleteResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingDomainDeleteResponseEnvelope] -type settingDomainDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingDomainBulkDeleteParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingDomainEditParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - IPRestrictions param.Field[[]string] `json:"ip_restrictions,required"` - AllowedDeliveryModes param.Field[[]SettingDomainEditParamsAllowedDeliveryMode] `json:"allowed_delivery_modes"` - Domain param.Field[string] `json:"domain"` - DropDispositions param.Field[[]SettingDomainEditParamsDropDisposition] `json:"drop_dispositions"` - Folder param.Field[SettingDomainEditParamsFolder] `json:"folder"` - IntegrationID param.Field[string] `json:"integration_id" format:"uuid"` - LookbackHops param.Field[int64] `json:"lookback_hops"` - Regions param.Field[[]SettingDomainEditParamsRegion] `json:"regions"` - RequireTLSInbound param.Field[bool] `json:"require_tls_inbound"` - RequireTLSOutbound param.Field[bool] `json:"require_tls_outbound"` - Transport param.Field[string] `json:"transport"` -} - -func (r SettingDomainEditParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SettingDomainEditParamsAllowedDeliveryMode string - -const ( - SettingDomainEditParamsAllowedDeliveryModeDirect SettingDomainEditParamsAllowedDeliveryMode = "DIRECT" - SettingDomainEditParamsAllowedDeliveryModeBcc SettingDomainEditParamsAllowedDeliveryMode = "BCC" - SettingDomainEditParamsAllowedDeliveryModeJournal SettingDomainEditParamsAllowedDeliveryMode = "JOURNAL" - SettingDomainEditParamsAllowedDeliveryModeAPI SettingDomainEditParamsAllowedDeliveryMode = "API" - SettingDomainEditParamsAllowedDeliveryModeRetroScan SettingDomainEditParamsAllowedDeliveryMode = "RETRO_SCAN" -) - -func (r SettingDomainEditParamsAllowedDeliveryMode) IsKnown() bool { - switch r { - case SettingDomainEditParamsAllowedDeliveryModeDirect, SettingDomainEditParamsAllowedDeliveryModeBcc, SettingDomainEditParamsAllowedDeliveryModeJournal, SettingDomainEditParamsAllowedDeliveryModeAPI, SettingDomainEditParamsAllowedDeliveryModeRetroScan: - return true - } - return false -} - -type SettingDomainEditParamsDropDisposition string - -const ( - SettingDomainEditParamsDropDispositionMalicious SettingDomainEditParamsDropDisposition = "MALICIOUS" - SettingDomainEditParamsDropDispositionMaliciousBec SettingDomainEditParamsDropDisposition = "MALICIOUS-BEC" - SettingDomainEditParamsDropDispositionSuspicious SettingDomainEditParamsDropDisposition = "SUSPICIOUS" - SettingDomainEditParamsDropDispositionSpoof SettingDomainEditParamsDropDisposition = "SPOOF" - SettingDomainEditParamsDropDispositionSpam SettingDomainEditParamsDropDisposition = "SPAM" - SettingDomainEditParamsDropDispositionBulk SettingDomainEditParamsDropDisposition = "BULK" - SettingDomainEditParamsDropDispositionEncrypted SettingDomainEditParamsDropDisposition = "ENCRYPTED" - SettingDomainEditParamsDropDispositionExternal SettingDomainEditParamsDropDisposition = "EXTERNAL" - SettingDomainEditParamsDropDispositionUnknown SettingDomainEditParamsDropDisposition = "UNKNOWN" - SettingDomainEditParamsDropDispositionNone SettingDomainEditParamsDropDisposition = "NONE" -) - -func (r SettingDomainEditParamsDropDisposition) IsKnown() bool { - switch r { - case SettingDomainEditParamsDropDispositionMalicious, SettingDomainEditParamsDropDispositionMaliciousBec, SettingDomainEditParamsDropDispositionSuspicious, SettingDomainEditParamsDropDispositionSpoof, SettingDomainEditParamsDropDispositionSpam, SettingDomainEditParamsDropDispositionBulk, SettingDomainEditParamsDropDispositionEncrypted, SettingDomainEditParamsDropDispositionExternal, SettingDomainEditParamsDropDispositionUnknown, SettingDomainEditParamsDropDispositionNone: - return true - } - return false -} - -type SettingDomainEditParamsFolder string - -const ( - SettingDomainEditParamsFolderAllItems SettingDomainEditParamsFolder = "AllItems" - SettingDomainEditParamsFolderInbox SettingDomainEditParamsFolder = "Inbox" -) - -func (r SettingDomainEditParamsFolder) IsKnown() bool { - switch r { - case SettingDomainEditParamsFolderAllItems, SettingDomainEditParamsFolderInbox: - return true - } - return false -} - -type SettingDomainEditParamsRegion string - -const ( - SettingDomainEditParamsRegionGlobal SettingDomainEditParamsRegion = "GLOBAL" - SettingDomainEditParamsRegionAu SettingDomainEditParamsRegion = "AU" - SettingDomainEditParamsRegionDe SettingDomainEditParamsRegion = "DE" - SettingDomainEditParamsRegionIn SettingDomainEditParamsRegion = "IN" - SettingDomainEditParamsRegionUs SettingDomainEditParamsRegion = "US" -) - -func (r SettingDomainEditParamsRegion) IsKnown() bool { - switch r { - case SettingDomainEditParamsRegionGlobal, SettingDomainEditParamsRegionAu, SettingDomainEditParamsRegionDe, SettingDomainEditParamsRegionIn, SettingDomainEditParamsRegionUs: - return true - } - return false -} - -type SettingDomainEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingDomainEditResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingDomainEditResponseEnvelopeJSON `json:"-"` -} - -// settingDomainEditResponseEnvelopeJSON contains the JSON metadata for the struct -// [SettingDomainEditResponseEnvelope] -type settingDomainEditResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainEditResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingDomainGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingDomainGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingDomainGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingDomainGetResponseEnvelopeJSON `json:"-"` -} - -// settingDomainGetResponseEnvelopeJSON contains the JSON metadata for the struct -// [SettingDomainGetResponseEnvelope] -type settingDomainGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingDomainGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingDomainGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/settingdomain_test.go b/email_security/settingdomain_test.go deleted file mode 100644 index 3e490d6f9da..00000000000 --- a/email_security/settingdomain_test.go +++ /dev/null @@ -1,171 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestSettingDomainListWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.Domains.List(context.TODO(), email_security.SettingDomainListParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - ActiveDeliveryMode: cloudflare.F(email_security.SettingDomainListParamsActiveDeliveryModeDirect), - AllowedDeliveryMode: cloudflare.F(email_security.SettingDomainListParamsAllowedDeliveryModeDirect), - Direction: cloudflare.F(email_security.SettingDomainListParamsDirectionAsc), - Domain: cloudflare.F([]string{"string"}), - Order: cloudflare.F(email_security.SettingDomainListParamsOrderDomain), - Page: cloudflare.F(int64(1)), - PerPage: cloudflare.F(int64(1)), - Search: cloudflare.F("search"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingDomainDelete(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.Domains.Delete( - context.TODO(), - int64(2400), - email_security.SettingDomainDeleteParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingDomainBulkDelete(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.Domains.BulkDelete(context.TODO(), email_security.SettingDomainBulkDeleteParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingDomainEditWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.Domains.Edit( - context.TODO(), - int64(2400), - email_security.SettingDomainEditParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - IPRestrictions: cloudflare.F([]string{"192.0.2.0/24", "2001:db8::/32"}), - AllowedDeliveryModes: cloudflare.F([]email_security.SettingDomainEditParamsAllowedDeliveryMode{email_security.SettingDomainEditParamsAllowedDeliveryModeDirect}), - Domain: cloudflare.F("domain"), - DropDispositions: cloudflare.F([]email_security.SettingDomainEditParamsDropDisposition{email_security.SettingDomainEditParamsDropDispositionMalicious}), - Folder: cloudflare.F(email_security.SettingDomainEditParamsFolderAllItems), - IntegrationID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), - LookbackHops: cloudflare.F(int64(1)), - Regions: cloudflare.F([]email_security.SettingDomainEditParamsRegion{email_security.SettingDomainEditParamsRegionGlobal}), - RequireTLSInbound: cloudflare.F(true), - RequireTLSOutbound: cloudflare.F(true), - Transport: cloudflare.F("transport"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingDomainGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.Domains.Get( - context.TODO(), - int64(2400), - email_security.SettingDomainGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/settingimpersonationregistry.go b/email_security/settingimpersonationregistry.go index c2c9c8c9441..c8b90b33813 100644 --- a/email_security/settingimpersonationregistry.go +++ b/email_security/settingimpersonationregistry.go @@ -3,21 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "net/url" - "slices" - "time" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/packages/pagination" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // SettingImpersonationRegistryService contains methods and other services that @@ -38,506 +24,3 @@ func NewSettingImpersonationRegistryService(opts ...option.RequestOption) (r *Se r.Options = opts return } - -// Create an entry in impersonation registry -func (r *SettingImpersonationRegistryService) New(ctx context.Context, params SettingImpersonationRegistryNewParams, opts ...option.RequestOption) (res *SettingImpersonationRegistryNewResponse, err error) { - var env SettingImpersonationRegistryNewResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Lists, searches, and sorts entries in the impersonation registry. -func (r *SettingImpersonationRegistryService) List(ctx context.Context, params SettingImpersonationRegistryListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingImpersonationRegistryListResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry", params.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Lists, searches, and sorts entries in the impersonation registry. -func (r *SettingImpersonationRegistryService) ListAutoPaging(ctx context.Context, params SettingImpersonationRegistryListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingImpersonationRegistryListResponse] { - return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) -} - -// Delete an entry from impersonation registry -func (r *SettingImpersonationRegistryService) Delete(ctx context.Context, displayNameID int64, body SettingImpersonationRegistryDeleteParams, opts ...option.RequestOption) (res *SettingImpersonationRegistryDeleteResponse, err error) { - var env SettingImpersonationRegistryDeleteResponseEnvelope - opts = slices.Concat(r.Options, opts) - if body.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry/%v", body.AccountID, displayNameID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Update an entry in impersonation registry -func (r *SettingImpersonationRegistryService) Edit(ctx context.Context, displayNameID int64, params SettingImpersonationRegistryEditParams, opts ...option.RequestOption) (res *SettingImpersonationRegistryEditResponse, err error) { - var env SettingImpersonationRegistryEditResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry/%v", params.AccountID, displayNameID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Get an entry in impersonation registry -func (r *SettingImpersonationRegistryService) Get(ctx context.Context, displayNameID int64, query SettingImpersonationRegistryGetParams, opts ...option.RequestOption) (res *SettingImpersonationRegistryGetResponse, err error) { - var env SettingImpersonationRegistryGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry/%v", query.AccountID, displayNameID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -type SettingImpersonationRegistryNewResponse struct { - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Email string `json:"email,required"` - IsEmailRegex bool `json:"is_email_regex,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Name string `json:"name,required"` - Comments string `json:"comments,nullable"` - DirectoryID int64 `json:"directory_id,nullable"` - DirectoryNodeID int64 `json:"directory_node_id,nullable"` - // Deprecated: deprecated - ExternalDirectoryNodeID string `json:"external_directory_node_id,nullable"` - Provenance string `json:"provenance,nullable"` - JSON settingImpersonationRegistryNewResponseJSON `json:"-"` -} - -// settingImpersonationRegistryNewResponseJSON contains the JSON metadata for the -// struct [SettingImpersonationRegistryNewResponse] -type settingImpersonationRegistryNewResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - Email apijson.Field - IsEmailRegex apijson.Field - LastModified apijson.Field - Name apijson.Field - Comments apijson.Field - DirectoryID apijson.Field - DirectoryNodeID apijson.Field - ExternalDirectoryNodeID apijson.Field - Provenance apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingImpersonationRegistryNewResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingImpersonationRegistryNewResponseJSON) RawJSON() string { - return r.raw -} - -type SettingImpersonationRegistryListResponse struct { - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Email string `json:"email,required"` - IsEmailRegex bool `json:"is_email_regex,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Name string `json:"name,required"` - Comments string `json:"comments,nullable"` - DirectoryID int64 `json:"directory_id,nullable"` - DirectoryNodeID int64 `json:"directory_node_id,nullable"` - // Deprecated: deprecated - ExternalDirectoryNodeID string `json:"external_directory_node_id,nullable"` - Provenance string `json:"provenance,nullable"` - JSON settingImpersonationRegistryListResponseJSON `json:"-"` -} - -// settingImpersonationRegistryListResponseJSON contains the JSON metadata for the -// struct [SettingImpersonationRegistryListResponse] -type settingImpersonationRegistryListResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - Email apijson.Field - IsEmailRegex apijson.Field - LastModified apijson.Field - Name apijson.Field - Comments apijson.Field - DirectoryID apijson.Field - DirectoryNodeID apijson.Field - ExternalDirectoryNodeID apijson.Field - Provenance apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingImpersonationRegistryListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingImpersonationRegistryListResponseJSON) RawJSON() string { - return r.raw -} - -type SettingImpersonationRegistryDeleteResponse struct { - ID int64 `json:"id,required"` - JSON settingImpersonationRegistryDeleteResponseJSON `json:"-"` -} - -// settingImpersonationRegistryDeleteResponseJSON contains the JSON metadata for -// the struct [SettingImpersonationRegistryDeleteResponse] -type settingImpersonationRegistryDeleteResponseJSON struct { - ID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingImpersonationRegistryDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingImpersonationRegistryDeleteResponseJSON) RawJSON() string { - return r.raw -} - -type SettingImpersonationRegistryEditResponse struct { - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Email string `json:"email,required"` - IsEmailRegex bool `json:"is_email_regex,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Name string `json:"name,required"` - Comments string `json:"comments,nullable"` - DirectoryID int64 `json:"directory_id,nullable"` - DirectoryNodeID int64 `json:"directory_node_id,nullable"` - // Deprecated: deprecated - ExternalDirectoryNodeID string `json:"external_directory_node_id,nullable"` - Provenance string `json:"provenance,nullable"` - JSON settingImpersonationRegistryEditResponseJSON `json:"-"` -} - -// settingImpersonationRegistryEditResponseJSON contains the JSON metadata for the -// struct [SettingImpersonationRegistryEditResponse] -type settingImpersonationRegistryEditResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - Email apijson.Field - IsEmailRegex apijson.Field - LastModified apijson.Field - Name apijson.Field - Comments apijson.Field - DirectoryID apijson.Field - DirectoryNodeID apijson.Field - ExternalDirectoryNodeID apijson.Field - Provenance apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingImpersonationRegistryEditResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingImpersonationRegistryEditResponseJSON) RawJSON() string { - return r.raw -} - -type SettingImpersonationRegistryGetResponse struct { - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Email string `json:"email,required"` - IsEmailRegex bool `json:"is_email_regex,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Name string `json:"name,required"` - Comments string `json:"comments,nullable"` - DirectoryID int64 `json:"directory_id,nullable"` - DirectoryNodeID int64 `json:"directory_node_id,nullable"` - // Deprecated: deprecated - ExternalDirectoryNodeID string `json:"external_directory_node_id,nullable"` - Provenance string `json:"provenance,nullable"` - JSON settingImpersonationRegistryGetResponseJSON `json:"-"` -} - -// settingImpersonationRegistryGetResponseJSON contains the JSON metadata for the -// struct [SettingImpersonationRegistryGetResponse] -type settingImpersonationRegistryGetResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - Email apijson.Field - IsEmailRegex apijson.Field - LastModified apijson.Field - Name apijson.Field - Comments apijson.Field - DirectoryID apijson.Field - DirectoryNodeID apijson.Field - ExternalDirectoryNodeID apijson.Field - Provenance apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingImpersonationRegistryGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingImpersonationRegistryGetResponseJSON) RawJSON() string { - return r.raw -} - -type SettingImpersonationRegistryNewParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - Email param.Field[string] `json:"email,required"` - IsEmailRegex param.Field[bool] `json:"is_email_regex,required"` - Name param.Field[string] `json:"name,required"` -} - -func (r SettingImpersonationRegistryNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SettingImpersonationRegistryNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingImpersonationRegistryNewResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingImpersonationRegistryNewResponseEnvelopeJSON `json:"-"` -} - -// settingImpersonationRegistryNewResponseEnvelopeJSON contains the JSON metadata -// for the struct [SettingImpersonationRegistryNewResponseEnvelope] -type settingImpersonationRegistryNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingImpersonationRegistryNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingImpersonationRegistryNewResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingImpersonationRegistryListParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // The sorting direction. - Direction param.Field[SettingImpersonationRegistryListParamsDirection] `query:"direction"` - // The field to sort by. - Order param.Field[SettingImpersonationRegistryListParamsOrder] `query:"order"` - // The page number of paginated results. - Page param.Field[int64] `query:"page"` - // The number of results per page. - PerPage param.Field[int64] `query:"per_page"` - Provenance param.Field[SettingImpersonationRegistryListParamsProvenance] `query:"provenance"` - // Allows searching in multiple properties of a record simultaneously. This - // parameter is intended for human users, not automation. Its exact behavior is - // intentionally left unspecified and is subject to change in the future. - Search param.Field[string] `query:"search"` -} - -// URLQuery serializes [SettingImpersonationRegistryListParams]'s query parameters -// as `url.Values`. -func (r SettingImpersonationRegistryListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatDots, - }) -} - -// The sorting direction. -type SettingImpersonationRegistryListParamsDirection string - -const ( - SettingImpersonationRegistryListParamsDirectionAsc SettingImpersonationRegistryListParamsDirection = "asc" - SettingImpersonationRegistryListParamsDirectionDesc SettingImpersonationRegistryListParamsDirection = "desc" -) - -func (r SettingImpersonationRegistryListParamsDirection) IsKnown() bool { - switch r { - case SettingImpersonationRegistryListParamsDirectionAsc, SettingImpersonationRegistryListParamsDirectionDesc: - return true - } - return false -} - -// The field to sort by. -type SettingImpersonationRegistryListParamsOrder string - -const ( - SettingImpersonationRegistryListParamsOrderName SettingImpersonationRegistryListParamsOrder = "name" - SettingImpersonationRegistryListParamsOrderEmail SettingImpersonationRegistryListParamsOrder = "email" - SettingImpersonationRegistryListParamsOrderCreatedAt SettingImpersonationRegistryListParamsOrder = "created_at" -) - -func (r SettingImpersonationRegistryListParamsOrder) IsKnown() bool { - switch r { - case SettingImpersonationRegistryListParamsOrderName, SettingImpersonationRegistryListParamsOrderEmail, SettingImpersonationRegistryListParamsOrderCreatedAt: - return true - } - return false -} - -type SettingImpersonationRegistryListParamsProvenance string - -const ( - SettingImpersonationRegistryListParamsProvenanceA1SInternal SettingImpersonationRegistryListParamsProvenance = "A1S_INTERNAL" - SettingImpersonationRegistryListParamsProvenanceSnoopyCasbOffice365 SettingImpersonationRegistryListParamsProvenance = "SNOOPY-CASB_OFFICE_365" - SettingImpersonationRegistryListParamsProvenanceSnoopyOffice365 SettingImpersonationRegistryListParamsProvenance = "SNOOPY-OFFICE_365" - SettingImpersonationRegistryListParamsProvenanceSnoopyGoogleDirectory SettingImpersonationRegistryListParamsProvenance = "SNOOPY-GOOGLE_DIRECTORY" -) - -func (r SettingImpersonationRegistryListParamsProvenance) IsKnown() bool { - switch r { - case SettingImpersonationRegistryListParamsProvenanceA1SInternal, SettingImpersonationRegistryListParamsProvenanceSnoopyCasbOffice365, SettingImpersonationRegistryListParamsProvenanceSnoopyOffice365, SettingImpersonationRegistryListParamsProvenanceSnoopyGoogleDirectory: - return true - } - return false -} - -type SettingImpersonationRegistryDeleteParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingImpersonationRegistryDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingImpersonationRegistryDeleteResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingImpersonationRegistryDeleteResponseEnvelopeJSON `json:"-"` -} - -// settingImpersonationRegistryDeleteResponseEnvelopeJSON contains the JSON -// metadata for the struct [SettingImpersonationRegistryDeleteResponseEnvelope] -type settingImpersonationRegistryDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingImpersonationRegistryDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingImpersonationRegistryDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingImpersonationRegistryEditParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - Email param.Field[string] `json:"email"` - IsEmailRegex param.Field[bool] `json:"is_email_regex"` - Name param.Field[string] `json:"name"` -} - -func (r SettingImpersonationRegistryEditParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SettingImpersonationRegistryEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingImpersonationRegistryEditResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingImpersonationRegistryEditResponseEnvelopeJSON `json:"-"` -} - -// settingImpersonationRegistryEditResponseEnvelopeJSON contains the JSON metadata -// for the struct [SettingImpersonationRegistryEditResponseEnvelope] -type settingImpersonationRegistryEditResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingImpersonationRegistryEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingImpersonationRegistryEditResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingImpersonationRegistryGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingImpersonationRegistryGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingImpersonationRegistryGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingImpersonationRegistryGetResponseEnvelopeJSON `json:"-"` -} - -// settingImpersonationRegistryGetResponseEnvelopeJSON contains the JSON metadata -// for the struct [SettingImpersonationRegistryGetResponseEnvelope] -type settingImpersonationRegistryGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingImpersonationRegistryGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingImpersonationRegistryGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/settingimpersonationregistry_test.go b/email_security/settingimpersonationregistry_test.go deleted file mode 100644 index a88127488b8..00000000000 --- a/email_security/settingimpersonationregistry_test.go +++ /dev/null @@ -1,164 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestSettingImpersonationRegistryNew(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.ImpersonationRegistry.New(context.TODO(), email_security.SettingImpersonationRegistryNewParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Email: cloudflare.F("email"), - IsEmailRegex: cloudflare.F(true), - Name: cloudflare.F("name"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingImpersonationRegistryListWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.ImpersonationRegistry.List(context.TODO(), email_security.SettingImpersonationRegistryListParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Direction: cloudflare.F(email_security.SettingImpersonationRegistryListParamsDirectionAsc), - Order: cloudflare.F(email_security.SettingImpersonationRegistryListParamsOrderName), - Page: cloudflare.F(int64(1)), - PerPage: cloudflare.F(int64(1)), - Provenance: cloudflare.F(email_security.SettingImpersonationRegistryListParamsProvenanceA1SInternal), - Search: cloudflare.F("search"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingImpersonationRegistryDelete(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.ImpersonationRegistry.Delete( - context.TODO(), - int64(2403), - email_security.SettingImpersonationRegistryDeleteParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingImpersonationRegistryEditWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.ImpersonationRegistry.Edit( - context.TODO(), - int64(2403), - email_security.SettingImpersonationRegistryEditParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Email: cloudflare.F("email"), - IsEmailRegex: cloudflare.F(true), - Name: cloudflare.F("name"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingImpersonationRegistryGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.ImpersonationRegistry.Get( - context.TODO(), - int64(2403), - email_security.SettingImpersonationRegistryGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/settingtrusteddomain.go b/email_security/settingtrusteddomain.go index f4549ace03d..26ddc2eb8b2 100644 --- a/email_security/settingtrusteddomain.go +++ b/email_security/settingtrusteddomain.go @@ -3,23 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "net/url" - "reflect" - "slices" - "time" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/packages/pagination" - "github.com/cloudflare/cloudflare-go/v6/shared" - "github.com/tidwall/gjson" ) // SettingTrustedDomainService contains methods and other services that help with @@ -40,602 +24,3 @@ func NewSettingTrustedDomainService(opts ...option.RequestOption) (r *SettingTru r.Options = opts return } - -// Create a trusted email domain -func (r *SettingTrustedDomainService) New(ctx context.Context, params SettingTrustedDomainNewParams, opts ...option.RequestOption) (res *SettingTrustedDomainNewResponseUnion, err error) { - var env SettingTrustedDomainNewResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Lists, searches, and sorts an account’s trusted email domains. -func (r *SettingTrustedDomainService) List(ctx context.Context, params SettingTrustedDomainListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingTrustedDomainListResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains", params.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// Lists, searches, and sorts an account’s trusted email domains. -func (r *SettingTrustedDomainService) ListAutoPaging(ctx context.Context, params SettingTrustedDomainListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingTrustedDomainListResponse] { - return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) -} - -// Delete a trusted email domain -func (r *SettingTrustedDomainService) Delete(ctx context.Context, trustedDomainID int64, body SettingTrustedDomainDeleteParams, opts ...option.RequestOption) (res *SettingTrustedDomainDeleteResponse, err error) { - var env SettingTrustedDomainDeleteResponseEnvelope - opts = slices.Concat(r.Options, opts) - if body.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains/%v", body.AccountID, trustedDomainID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Update a trusted email domain -func (r *SettingTrustedDomainService) Edit(ctx context.Context, trustedDomainID int64, params SettingTrustedDomainEditParams, opts ...option.RequestOption) (res *SettingTrustedDomainEditResponse, err error) { - var env SettingTrustedDomainEditResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains/%v", params.AccountID, trustedDomainID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Get a trusted email domain -func (r *SettingTrustedDomainService) Get(ctx context.Context, trustedDomainID int64, query SettingTrustedDomainGetParams, opts ...option.RequestOption) (res *SettingTrustedDomainGetResponse, err error) { - var env SettingTrustedDomainGetResponseEnvelope - opts = slices.Concat(r.Options, opts) - if query.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains/%v", query.AccountID, trustedDomainID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) - if err != nil { - return - } - res = &env.Result - return -} - -// Union satisfied by [SettingTrustedDomainNewResponseEmailSecurityTrustedDomain] -// or [SettingTrustedDomainNewResponseArray]. -type SettingTrustedDomainNewResponseUnion interface { - implementsSettingTrustedDomainNewResponseUnion() -} - -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*SettingTrustedDomainNewResponseUnion)(nil)).Elem(), - "", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(SettingTrustedDomainNewResponseEmailSecurityTrustedDomain{}), - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(SettingTrustedDomainNewResponseArray{}), - }, - ) -} - -type SettingTrustedDomainNewResponseEmailSecurityTrustedDomain struct { - // The unique identifier for the trusted domain. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - // Select to prevent recently registered domains from triggering a Suspicious or - // Malicious disposition. - IsRecent bool `json:"is_recent,required"` - IsRegex bool `json:"is_regex,required"` - // Select for partner or other approved domains that have similar spelling to your - // connected domains. Prevents listed domains from triggering a Spoof disposition. - IsSimilarity bool `json:"is_similarity,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - Comments string `json:"comments,nullable"` - JSON settingTrustedDomainNewResponseEmailSecurityTrustedDomainJSON `json:"-"` -} - -// settingTrustedDomainNewResponseEmailSecurityTrustedDomainJSON contains the JSON -// metadata for the struct -// [SettingTrustedDomainNewResponseEmailSecurityTrustedDomain] -type settingTrustedDomainNewResponseEmailSecurityTrustedDomainJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsRecent apijson.Field - IsRegex apijson.Field - IsSimilarity apijson.Field - LastModified apijson.Field - Pattern apijson.Field - Comments apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainNewResponseEmailSecurityTrustedDomain) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainNewResponseEmailSecurityTrustedDomainJSON) RawJSON() string { - return r.raw -} - -func (r SettingTrustedDomainNewResponseEmailSecurityTrustedDomain) implementsSettingTrustedDomainNewResponseUnion() { -} - -type SettingTrustedDomainNewResponseArray []SettingTrustedDomainNewResponseArrayItem - -func (r SettingTrustedDomainNewResponseArray) implementsSettingTrustedDomainNewResponseUnion() {} - -type SettingTrustedDomainNewResponseArrayItem struct { - // The unique identifier for the trusted domain. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - // Select to prevent recently registered domains from triggering a Suspicious or - // Malicious disposition. - IsRecent bool `json:"is_recent,required"` - IsRegex bool `json:"is_regex,required"` - // Select for partner or other approved domains that have similar spelling to your - // connected domains. Prevents listed domains from triggering a Spoof disposition. - IsSimilarity bool `json:"is_similarity,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - Comments string `json:"comments,nullable"` - JSON settingTrustedDomainNewResponseArrayItemJSON `json:"-"` -} - -// settingTrustedDomainNewResponseArrayItemJSON contains the JSON metadata for the -// struct [SettingTrustedDomainNewResponseArrayItem] -type settingTrustedDomainNewResponseArrayItemJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsRecent apijson.Field - IsRegex apijson.Field - IsSimilarity apijson.Field - LastModified apijson.Field - Pattern apijson.Field - Comments apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainNewResponseArrayItem) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainNewResponseArrayItemJSON) RawJSON() string { - return r.raw -} - -type SettingTrustedDomainListResponse struct { - // The unique identifier for the trusted domain. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - // Select to prevent recently registered domains from triggering a Suspicious or - // Malicious disposition. - IsRecent bool `json:"is_recent,required"` - IsRegex bool `json:"is_regex,required"` - // Select for partner or other approved domains that have similar spelling to your - // connected domains. Prevents listed domains from triggering a Spoof disposition. - IsSimilarity bool `json:"is_similarity,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - Comments string `json:"comments,nullable"` - JSON settingTrustedDomainListResponseJSON `json:"-"` -} - -// settingTrustedDomainListResponseJSON contains the JSON metadata for the struct -// [SettingTrustedDomainListResponse] -type settingTrustedDomainListResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsRecent apijson.Field - IsRegex apijson.Field - IsSimilarity apijson.Field - LastModified apijson.Field - Pattern apijson.Field - Comments apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainListResponseJSON) RawJSON() string { - return r.raw -} - -type SettingTrustedDomainDeleteResponse struct { - // The unique identifier for the trusted domain. - ID int64 `json:"id,required"` - JSON settingTrustedDomainDeleteResponseJSON `json:"-"` -} - -// settingTrustedDomainDeleteResponseJSON contains the JSON metadata for the struct -// [SettingTrustedDomainDeleteResponse] -type settingTrustedDomainDeleteResponseJSON struct { - ID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainDeleteResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainDeleteResponseJSON) RawJSON() string { - return r.raw -} - -type SettingTrustedDomainEditResponse struct { - // The unique identifier for the trusted domain. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - // Select to prevent recently registered domains from triggering a Suspicious or - // Malicious disposition. - IsRecent bool `json:"is_recent,required"` - IsRegex bool `json:"is_regex,required"` - // Select for partner or other approved domains that have similar spelling to your - // connected domains. Prevents listed domains from triggering a Spoof disposition. - IsSimilarity bool `json:"is_similarity,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - Comments string `json:"comments,nullable"` - JSON settingTrustedDomainEditResponseJSON `json:"-"` -} - -// settingTrustedDomainEditResponseJSON contains the JSON metadata for the struct -// [SettingTrustedDomainEditResponse] -type settingTrustedDomainEditResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsRecent apijson.Field - IsRegex apijson.Field - IsSimilarity apijson.Field - LastModified apijson.Field - Pattern apijson.Field - Comments apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainEditResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainEditResponseJSON) RawJSON() string { - return r.raw -} - -type SettingTrustedDomainGetResponse struct { - // The unique identifier for the trusted domain. - ID int64 `json:"id,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - // Select to prevent recently registered domains from triggering a Suspicious or - // Malicious disposition. - IsRecent bool `json:"is_recent,required"` - IsRegex bool `json:"is_regex,required"` - // Select for partner or other approved domains that have similar spelling to your - // connected domains. Prevents listed domains from triggering a Spoof disposition. - IsSimilarity bool `json:"is_similarity,required"` - LastModified time.Time `json:"last_modified,required" format:"date-time"` - Pattern string `json:"pattern,required"` - Comments string `json:"comments,nullable"` - JSON settingTrustedDomainGetResponseJSON `json:"-"` -} - -// settingTrustedDomainGetResponseJSON contains the JSON metadata for the struct -// [SettingTrustedDomainGetResponse] -type settingTrustedDomainGetResponseJSON struct { - ID apijson.Field - CreatedAt apijson.Field - IsRecent apijson.Field - IsRegex apijson.Field - IsSimilarity apijson.Field - LastModified apijson.Field - Pattern apijson.Field - Comments apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainGetResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainGetResponseJSON) RawJSON() string { - return r.raw -} - -type SettingTrustedDomainNewParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - Body SettingTrustedDomainNewParamsBodyUnion `json:"body,required"` -} - -func (r SettingTrustedDomainNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) -} - -// Satisfied by -// [email_security.SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain], -// [email_security.SettingTrustedDomainNewParamsBodyArray]. -type SettingTrustedDomainNewParamsBodyUnion interface { - implementsSettingTrustedDomainNewParamsBodyUnion() -} - -type SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain struct { - // Select to prevent recently registered domains from triggering a Suspicious or - // Malicious disposition. - IsRecent param.Field[bool] `json:"is_recent,required"` - IsRegex param.Field[bool] `json:"is_regex,required"` - // Select for partner or other approved domains that have similar spelling to your - // connected domains. Prevents listed domains from triggering a Spoof disposition. - IsSimilarity param.Field[bool] `json:"is_similarity,required"` - Pattern param.Field[string] `json:"pattern,required"` - Comments param.Field[string] `json:"comments"` -} - -func (r SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain) implementsSettingTrustedDomainNewParamsBodyUnion() { -} - -type SettingTrustedDomainNewParamsBodyArray []SettingTrustedDomainNewParamsBodyArrayItem - -func (r SettingTrustedDomainNewParamsBodyArray) implementsSettingTrustedDomainNewParamsBodyUnion() {} - -type SettingTrustedDomainNewParamsBodyArrayItem struct { - // Select to prevent recently registered domains from triggering a Suspicious or - // Malicious disposition. - IsRecent param.Field[bool] `json:"is_recent,required"` - IsRegex param.Field[bool] `json:"is_regex,required"` - // Select for partner or other approved domains that have similar spelling to your - // connected domains. Prevents listed domains from triggering a Spoof disposition. - IsSimilarity param.Field[bool] `json:"is_similarity,required"` - Pattern param.Field[string] `json:"pattern,required"` - Comments param.Field[string] `json:"comments"` -} - -func (r SettingTrustedDomainNewParamsBodyArrayItem) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SettingTrustedDomainNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingTrustedDomainNewResponseUnion `json:"result,required"` - Success bool `json:"success,required"` - JSON settingTrustedDomainNewResponseEnvelopeJSON `json:"-"` -} - -// settingTrustedDomainNewResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingTrustedDomainNewResponseEnvelope] -type settingTrustedDomainNewResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainNewResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingTrustedDomainListParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // The sorting direction. - Direction param.Field[SettingTrustedDomainListParamsDirection] `query:"direction"` - IsRecent param.Field[bool] `query:"is_recent"` - IsSimilarity param.Field[bool] `query:"is_similarity"` - // The field to sort by. - Order param.Field[SettingTrustedDomainListParamsOrder] `query:"order"` - // The page number of paginated results. - Page param.Field[int64] `query:"page"` - Pattern param.Field[string] `query:"pattern"` - // The number of results per page. - PerPage param.Field[int64] `query:"per_page"` - // Allows searching in multiple properties of a record simultaneously. This - // parameter is intended for human users, not automation. Its exact behavior is - // intentionally left unspecified and is subject to change in the future. - Search param.Field[string] `query:"search"` -} - -// URLQuery serializes [SettingTrustedDomainListParams]'s query parameters as -// `url.Values`. -func (r SettingTrustedDomainListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatDots, - }) -} - -// The sorting direction. -type SettingTrustedDomainListParamsDirection string - -const ( - SettingTrustedDomainListParamsDirectionAsc SettingTrustedDomainListParamsDirection = "asc" - SettingTrustedDomainListParamsDirectionDesc SettingTrustedDomainListParamsDirection = "desc" -) - -func (r SettingTrustedDomainListParamsDirection) IsKnown() bool { - switch r { - case SettingTrustedDomainListParamsDirectionAsc, SettingTrustedDomainListParamsDirectionDesc: - return true - } - return false -} - -// The field to sort by. -type SettingTrustedDomainListParamsOrder string - -const ( - SettingTrustedDomainListParamsOrderPattern SettingTrustedDomainListParamsOrder = "pattern" - SettingTrustedDomainListParamsOrderCreatedAt SettingTrustedDomainListParamsOrder = "created_at" -) - -func (r SettingTrustedDomainListParamsOrder) IsKnown() bool { - switch r { - case SettingTrustedDomainListParamsOrderPattern, SettingTrustedDomainListParamsOrderCreatedAt: - return true - } - return false -} - -type SettingTrustedDomainDeleteParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingTrustedDomainDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingTrustedDomainDeleteResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingTrustedDomainDeleteResponseEnvelopeJSON `json:"-"` -} - -// settingTrustedDomainDeleteResponseEnvelopeJSON contains the JSON metadata for -// the struct [SettingTrustedDomainDeleteResponseEnvelope] -type settingTrustedDomainDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainDeleteResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingTrustedDomainEditParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - Comments param.Field[string] `json:"comments"` - // Select to prevent recently registered domains from triggering a Suspicious or - // Malicious disposition. - IsRecent param.Field[bool] `json:"is_recent"` - IsRegex param.Field[bool] `json:"is_regex"` - // Select for partner or other approved domains that have similar spelling to your - // connected domains. Prevents listed domains from triggering a Spoof disposition. - IsSimilarity param.Field[bool] `json:"is_similarity"` - Pattern param.Field[string] `json:"pattern"` -} - -func (r SettingTrustedDomainEditParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type SettingTrustedDomainEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingTrustedDomainEditResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingTrustedDomainEditResponseEnvelopeJSON `json:"-"` -} - -// settingTrustedDomainEditResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingTrustedDomainEditResponseEnvelope] -type settingTrustedDomainEditResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainEditResponseEnvelopeJSON) RawJSON() string { - return r.raw -} - -type SettingTrustedDomainGetParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` -} - -type SettingTrustedDomainGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result SettingTrustedDomainGetResponse `json:"result,required"` - Success bool `json:"success,required"` - JSON settingTrustedDomainGetResponseEnvelopeJSON `json:"-"` -} - -// settingTrustedDomainGetResponseEnvelopeJSON contains the JSON metadata for the -// struct [SettingTrustedDomainGetResponseEnvelope] -type settingTrustedDomainGetResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SettingTrustedDomainGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r settingTrustedDomainGetResponseEnvelopeJSON) RawJSON() string { - return r.raw -} diff --git a/email_security/settingtrusteddomain_test.go b/email_security/settingtrusteddomain_test.go deleted file mode 100644 index 5891ea11fcd..00000000000 --- a/email_security/settingtrusteddomain_test.go +++ /dev/null @@ -1,173 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestSettingTrustedDomainNewWithOptionalParams(t *testing.T) { - t.Skip("TODO: investigate HTTP 422 errors on test suite") - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.TrustedDomains.New(context.TODO(), email_security.SettingTrustedDomainNewParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: email_security.SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain{ - IsRecent: cloudflare.F(true), - IsRegex: cloudflare.F(false), - IsSimilarity: cloudflare.F(false), - Pattern: cloudflare.F("example.com"), - Comments: cloudflare.Null[string](), - }, - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingTrustedDomainListWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.TrustedDomains.List(context.TODO(), email_security.SettingTrustedDomainListParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Direction: cloudflare.F(email_security.SettingTrustedDomainListParamsDirectionAsc), - IsRecent: cloudflare.F(true), - IsSimilarity: cloudflare.F(true), - Order: cloudflare.F(email_security.SettingTrustedDomainListParamsOrderPattern), - Page: cloudflare.F(int64(1)), - Pattern: cloudflare.F("pattern"), - PerPage: cloudflare.F(int64(1)), - Search: cloudflare.F("search"), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingTrustedDomainDelete(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.TrustedDomains.Delete( - context.TODO(), - int64(2401), - email_security.SettingTrustedDomainDeleteParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingTrustedDomainEditWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.TrustedDomains.Edit( - context.TODO(), - int64(2401), - email_security.SettingTrustedDomainEditParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Comments: cloudflare.F("comments"), - IsRecent: cloudflare.F(true), - IsRegex: cloudflare.F(true), - IsSimilarity: cloudflare.F(true), - Pattern: cloudflare.F("x"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestSettingTrustedDomainGet(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Settings.TrustedDomains.Get( - context.TODO(), - int64(2401), - email_security.SettingTrustedDomainGetParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/email_security/submission.go b/email_security/submission.go index 0fc5ebceaef..22f671e591c 100644 --- a/email_security/submission.go +++ b/email_security/submission.go @@ -3,20 +3,7 @@ package email_security import ( - "context" - "errors" - "fmt" - "net/http" - "net/url" - "slices" - "time" - - "github.com/cloudflare/cloudflare-go/v6/internal/apijson" - "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" - "github.com/cloudflare/cloudflare-go/v6/internal/param" - "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/packages/pagination" ) // SubmissionService contains methods and other services that help with interacting @@ -37,240 +24,3 @@ func NewSubmissionService(opts ...option.RequestOption) (r *SubmissionService) { r.Options = opts return } - -// This endpoint returns information for submissions to made to reclassify emails. -func (r *SubmissionService) List(ctx context.Context, params SubmissionListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SubmissionListResponse], err error) { - var raw *http.Response - opts = slices.Concat(r.Options, opts) - opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/email-security/submissions", params.AccountID) - cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) - if err != nil { - return nil, err - } - err = cfg.Execute() - if err != nil { - return nil, err - } - res.SetPageConfig(cfg, raw) - return res, nil -} - -// This endpoint returns information for submissions to made to reclassify emails. -func (r *SubmissionService) ListAutoPaging(ctx context.Context, params SubmissionListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SubmissionListResponse] { - return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) -} - -type SubmissionListResponse struct { - RequestedTs time.Time `json:"requested_ts,required" format:"date-time"` - SubmissionID string `json:"submission_id,required"` - OriginalDisposition SubmissionListResponseOriginalDisposition `json:"original_disposition,nullable"` - OriginalEdfHash string `json:"original_edf_hash,nullable"` - Outcome string `json:"outcome,nullable"` - OutcomeDisposition SubmissionListResponseOutcomeDisposition `json:"outcome_disposition,nullable"` - RequestedBy string `json:"requested_by,nullable"` - RequestedDisposition SubmissionListResponseRequestedDisposition `json:"requested_disposition,nullable"` - Status string `json:"status,nullable"` - Subject string `json:"subject,nullable"` - Type string `json:"type,nullable"` - JSON submissionListResponseJSON `json:"-"` -} - -// submissionListResponseJSON contains the JSON metadata for the struct -// [SubmissionListResponse] -type submissionListResponseJSON struct { - RequestedTs apijson.Field - SubmissionID apijson.Field - OriginalDisposition apijson.Field - OriginalEdfHash apijson.Field - Outcome apijson.Field - OutcomeDisposition apijson.Field - RequestedBy apijson.Field - RequestedDisposition apijson.Field - Status apijson.Field - Subject apijson.Field - Type apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *SubmissionListResponse) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r submissionListResponseJSON) RawJSON() string { - return r.raw -} - -type SubmissionListResponseOriginalDisposition string - -const ( - SubmissionListResponseOriginalDispositionMalicious SubmissionListResponseOriginalDisposition = "MALICIOUS" - SubmissionListResponseOriginalDispositionMaliciousBec SubmissionListResponseOriginalDisposition = "MALICIOUS-BEC" - SubmissionListResponseOriginalDispositionSuspicious SubmissionListResponseOriginalDisposition = "SUSPICIOUS" - SubmissionListResponseOriginalDispositionSpoof SubmissionListResponseOriginalDisposition = "SPOOF" - SubmissionListResponseOriginalDispositionSpam SubmissionListResponseOriginalDisposition = "SPAM" - SubmissionListResponseOriginalDispositionBulk SubmissionListResponseOriginalDisposition = "BULK" - SubmissionListResponseOriginalDispositionEncrypted SubmissionListResponseOriginalDisposition = "ENCRYPTED" - SubmissionListResponseOriginalDispositionExternal SubmissionListResponseOriginalDisposition = "EXTERNAL" - SubmissionListResponseOriginalDispositionUnknown SubmissionListResponseOriginalDisposition = "UNKNOWN" - SubmissionListResponseOriginalDispositionNone SubmissionListResponseOriginalDisposition = "NONE" -) - -func (r SubmissionListResponseOriginalDisposition) IsKnown() bool { - switch r { - case SubmissionListResponseOriginalDispositionMalicious, SubmissionListResponseOriginalDispositionMaliciousBec, SubmissionListResponseOriginalDispositionSuspicious, SubmissionListResponseOriginalDispositionSpoof, SubmissionListResponseOriginalDispositionSpam, SubmissionListResponseOriginalDispositionBulk, SubmissionListResponseOriginalDispositionEncrypted, SubmissionListResponseOriginalDispositionExternal, SubmissionListResponseOriginalDispositionUnknown, SubmissionListResponseOriginalDispositionNone: - return true - } - return false -} - -type SubmissionListResponseOutcomeDisposition string - -const ( - SubmissionListResponseOutcomeDispositionMalicious SubmissionListResponseOutcomeDisposition = "MALICIOUS" - SubmissionListResponseOutcomeDispositionMaliciousBec SubmissionListResponseOutcomeDisposition = "MALICIOUS-BEC" - SubmissionListResponseOutcomeDispositionSuspicious SubmissionListResponseOutcomeDisposition = "SUSPICIOUS" - SubmissionListResponseOutcomeDispositionSpoof SubmissionListResponseOutcomeDisposition = "SPOOF" - SubmissionListResponseOutcomeDispositionSpam SubmissionListResponseOutcomeDisposition = "SPAM" - SubmissionListResponseOutcomeDispositionBulk SubmissionListResponseOutcomeDisposition = "BULK" - SubmissionListResponseOutcomeDispositionEncrypted SubmissionListResponseOutcomeDisposition = "ENCRYPTED" - SubmissionListResponseOutcomeDispositionExternal SubmissionListResponseOutcomeDisposition = "EXTERNAL" - SubmissionListResponseOutcomeDispositionUnknown SubmissionListResponseOutcomeDisposition = "UNKNOWN" - SubmissionListResponseOutcomeDispositionNone SubmissionListResponseOutcomeDisposition = "NONE" -) - -func (r SubmissionListResponseOutcomeDisposition) IsKnown() bool { - switch r { - case SubmissionListResponseOutcomeDispositionMalicious, SubmissionListResponseOutcomeDispositionMaliciousBec, SubmissionListResponseOutcomeDispositionSuspicious, SubmissionListResponseOutcomeDispositionSpoof, SubmissionListResponseOutcomeDispositionSpam, SubmissionListResponseOutcomeDispositionBulk, SubmissionListResponseOutcomeDispositionEncrypted, SubmissionListResponseOutcomeDispositionExternal, SubmissionListResponseOutcomeDispositionUnknown, SubmissionListResponseOutcomeDispositionNone: - return true - } - return false -} - -type SubmissionListResponseRequestedDisposition string - -const ( - SubmissionListResponseRequestedDispositionMalicious SubmissionListResponseRequestedDisposition = "MALICIOUS" - SubmissionListResponseRequestedDispositionMaliciousBec SubmissionListResponseRequestedDisposition = "MALICIOUS-BEC" - SubmissionListResponseRequestedDispositionSuspicious SubmissionListResponseRequestedDisposition = "SUSPICIOUS" - SubmissionListResponseRequestedDispositionSpoof SubmissionListResponseRequestedDisposition = "SPOOF" - SubmissionListResponseRequestedDispositionSpam SubmissionListResponseRequestedDisposition = "SPAM" - SubmissionListResponseRequestedDispositionBulk SubmissionListResponseRequestedDisposition = "BULK" - SubmissionListResponseRequestedDispositionEncrypted SubmissionListResponseRequestedDisposition = "ENCRYPTED" - SubmissionListResponseRequestedDispositionExternal SubmissionListResponseRequestedDisposition = "EXTERNAL" - SubmissionListResponseRequestedDispositionUnknown SubmissionListResponseRequestedDisposition = "UNKNOWN" - SubmissionListResponseRequestedDispositionNone SubmissionListResponseRequestedDisposition = "NONE" -) - -func (r SubmissionListResponseRequestedDisposition) IsKnown() bool { - switch r { - case SubmissionListResponseRequestedDispositionMalicious, SubmissionListResponseRequestedDispositionMaliciousBec, SubmissionListResponseRequestedDispositionSuspicious, SubmissionListResponseRequestedDispositionSpoof, SubmissionListResponseRequestedDispositionSpam, SubmissionListResponseRequestedDispositionBulk, SubmissionListResponseRequestedDispositionEncrypted, SubmissionListResponseRequestedDispositionExternal, SubmissionListResponseRequestedDispositionUnknown, SubmissionListResponseRequestedDispositionNone: - return true - } - return false -} - -type SubmissionListParams struct { - // Account Identifier - AccountID param.Field[string] `path:"account_id,required"` - // The end of the search date range. Defaults to `now`. - End param.Field[time.Time] `query:"end" format:"date-time"` - OriginalDisposition param.Field[SubmissionListParamsOriginalDisposition] `query:"original_disposition"` - OutcomeDisposition param.Field[SubmissionListParamsOutcomeDisposition] `query:"outcome_disposition"` - // The page number of paginated results. - Page param.Field[int64] `query:"page"` - // The number of results per page. - PerPage param.Field[int64] `query:"per_page"` - Query param.Field[string] `query:"query"` - RequestedDisposition param.Field[SubmissionListParamsRequestedDisposition] `query:"requested_disposition"` - // The beginning of the search date range. Defaults to `now - 30 days`. - Start param.Field[time.Time] `query:"start" format:"date-time"` - Status param.Field[string] `query:"status"` - SubmissionID param.Field[string] `query:"submission_id"` - Type param.Field[SubmissionListParamsType] `query:"type"` -} - -// URLQuery serializes [SubmissionListParams]'s query parameters as `url.Values`. -func (r SubmissionListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatDots, - }) -} - -type SubmissionListParamsOriginalDisposition string - -const ( - SubmissionListParamsOriginalDispositionMalicious SubmissionListParamsOriginalDisposition = "MALICIOUS" - SubmissionListParamsOriginalDispositionSuspicious SubmissionListParamsOriginalDisposition = "SUSPICIOUS" - SubmissionListParamsOriginalDispositionSpoof SubmissionListParamsOriginalDisposition = "SPOOF" - SubmissionListParamsOriginalDispositionSpam SubmissionListParamsOriginalDisposition = "SPAM" - SubmissionListParamsOriginalDispositionBulk SubmissionListParamsOriginalDisposition = "BULK" - SubmissionListParamsOriginalDispositionNone SubmissionListParamsOriginalDisposition = "NONE" -) - -func (r SubmissionListParamsOriginalDisposition) IsKnown() bool { - switch r { - case SubmissionListParamsOriginalDispositionMalicious, SubmissionListParamsOriginalDispositionSuspicious, SubmissionListParamsOriginalDispositionSpoof, SubmissionListParamsOriginalDispositionSpam, SubmissionListParamsOriginalDispositionBulk, SubmissionListParamsOriginalDispositionNone: - return true - } - return false -} - -type SubmissionListParamsOutcomeDisposition string - -const ( - SubmissionListParamsOutcomeDispositionMalicious SubmissionListParamsOutcomeDisposition = "MALICIOUS" - SubmissionListParamsOutcomeDispositionSuspicious SubmissionListParamsOutcomeDisposition = "SUSPICIOUS" - SubmissionListParamsOutcomeDispositionSpoof SubmissionListParamsOutcomeDisposition = "SPOOF" - SubmissionListParamsOutcomeDispositionSpam SubmissionListParamsOutcomeDisposition = "SPAM" - SubmissionListParamsOutcomeDispositionBulk SubmissionListParamsOutcomeDisposition = "BULK" - SubmissionListParamsOutcomeDispositionNone SubmissionListParamsOutcomeDisposition = "NONE" -) - -func (r SubmissionListParamsOutcomeDisposition) IsKnown() bool { - switch r { - case SubmissionListParamsOutcomeDispositionMalicious, SubmissionListParamsOutcomeDispositionSuspicious, SubmissionListParamsOutcomeDispositionSpoof, SubmissionListParamsOutcomeDispositionSpam, SubmissionListParamsOutcomeDispositionBulk, SubmissionListParamsOutcomeDispositionNone: - return true - } - return false -} - -type SubmissionListParamsRequestedDisposition string - -const ( - SubmissionListParamsRequestedDispositionMalicious SubmissionListParamsRequestedDisposition = "MALICIOUS" - SubmissionListParamsRequestedDispositionSuspicious SubmissionListParamsRequestedDisposition = "SUSPICIOUS" - SubmissionListParamsRequestedDispositionSpoof SubmissionListParamsRequestedDisposition = "SPOOF" - SubmissionListParamsRequestedDispositionSpam SubmissionListParamsRequestedDisposition = "SPAM" - SubmissionListParamsRequestedDispositionBulk SubmissionListParamsRequestedDisposition = "BULK" - SubmissionListParamsRequestedDispositionNone SubmissionListParamsRequestedDisposition = "NONE" -) - -func (r SubmissionListParamsRequestedDisposition) IsKnown() bool { - switch r { - case SubmissionListParamsRequestedDispositionMalicious, SubmissionListParamsRequestedDispositionSuspicious, SubmissionListParamsRequestedDispositionSpoof, SubmissionListParamsRequestedDispositionSpam, SubmissionListParamsRequestedDispositionBulk, SubmissionListParamsRequestedDispositionNone: - return true - } - return false -} - -type SubmissionListParamsType string - -const ( - SubmissionListParamsTypeTeam SubmissionListParamsType = "TEAM" - SubmissionListParamsTypeUser SubmissionListParamsType = "USER" -) - -func (r SubmissionListParamsType) IsKnown() bool { - switch r { - case SubmissionListParamsTypeTeam, SubmissionListParamsTypeUser: - return true - } - return false -} diff --git a/email_security/submission_test.go b/email_security/submission_test.go deleted file mode 100644 index 4d5bf1c6d43..00000000000 --- a/email_security/submission_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -package email_security_test - -import ( - "context" - "errors" - "os" - "testing" - "time" - - "github.com/cloudflare/cloudflare-go/v6" - "github.com/cloudflare/cloudflare-go/v6/email_security" - "github.com/cloudflare/cloudflare-go/v6/internal/testutil" - "github.com/cloudflare/cloudflare-go/v6/option" -) - -func TestSubmissionListWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.EmailSecurity.Submissions.List(context.TODO(), email_security.SubmissionListParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - End: cloudflare.F(time.Now()), - OriginalDisposition: cloudflare.F(email_security.SubmissionListParamsOriginalDispositionMalicious), - OutcomeDisposition: cloudflare.F(email_security.SubmissionListParamsOutcomeDispositionMalicious), - Page: cloudflare.F(int64(1)), - PerPage: cloudflare.F(int64(1)), - Query: cloudflare.F("query"), - RequestedDisposition: cloudflare.F(email_security.SubmissionListParamsRequestedDispositionMalicious), - Start: cloudflare.F(time.Now()), - Status: cloudflare.F("status"), - SubmissionID: cloudflare.F("submission_id"), - Type: cloudflare.F(email_security.SubmissionListParamsTypeTeam), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} diff --git a/iam/permissiongroup.go b/iam/permissiongroup.go index 1043163f9c3..b356ae57e6e 100644 --- a/iam/permissiongroup.go +++ b/iam/permissiongroup.go @@ -66,6 +66,7 @@ func (r *PermissionGroupService) ListAutoPaging(ctx context.Context, params Perm // Get information about a specific permission group in an account. func (r *PermissionGroupService) Get(ctx context.Context, permissionGroupID string, query PermissionGroupGetParams, opts ...option.RequestOption) (res *PermissionGroupGetResponse, err error) { + var env PermissionGroupGetResponseEnvelope opts = slices.Concat(r.Options, opts) if query.AccountID.Value == "" { err = errors.New("missing required account_id parameter") @@ -76,7 +77,11 @@ func (r *PermissionGroupService) Get(ctx context.Context, permissionGroupID stri return } path := fmt.Sprintf("accounts/%s/iam/permission_groups/%s", query.AccountID, permissionGroupID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -216,3 +221,144 @@ type PermissionGroupGetParams struct { // Account identifier tag. AccountID param.Field[string] `path:"account_id,required"` } + +type PermissionGroupGetResponseEnvelope struct { + Errors []PermissionGroupGetResponseEnvelopeErrors `json:"errors,required"` + Messages []PermissionGroupGetResponseEnvelopeMessages `json:"messages,required"` + // Whether the API call was successful. + Success PermissionGroupGetResponseEnvelopeSuccess `json:"success,required"` + // A named group of permissions that map to a group of operations against + // resources. + Result PermissionGroupGetResponse `json:"result"` + JSON permissionGroupGetResponseEnvelopeJSON `json:"-"` +} + +// permissionGroupGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [PermissionGroupGetResponseEnvelope] +type permissionGroupGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PermissionGroupGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r permissionGroupGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type PermissionGroupGetResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source PermissionGroupGetResponseEnvelopeErrorsSource `json:"source"` + JSON permissionGroupGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// permissionGroupGetResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [PermissionGroupGetResponseEnvelopeErrors] +type permissionGroupGetResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PermissionGroupGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r permissionGroupGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type PermissionGroupGetResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON permissionGroupGetResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// permissionGroupGetResponseEnvelopeErrorsSourceJSON contains the JSON metadata +// for the struct [PermissionGroupGetResponseEnvelopeErrorsSource] +type permissionGroupGetResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PermissionGroupGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r permissionGroupGetResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type PermissionGroupGetResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source PermissionGroupGetResponseEnvelopeMessagesSource `json:"source"` + JSON permissionGroupGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// permissionGroupGetResponseEnvelopeMessagesJSON contains the JSON metadata for +// the struct [PermissionGroupGetResponseEnvelopeMessages] +type permissionGroupGetResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PermissionGroupGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r permissionGroupGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type PermissionGroupGetResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON permissionGroupGetResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// permissionGroupGetResponseEnvelopeMessagesSourceJSON contains the JSON metadata +// for the struct [PermissionGroupGetResponseEnvelopeMessagesSource] +type permissionGroupGetResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *PermissionGroupGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r permissionGroupGetResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. +type PermissionGroupGetResponseEnvelopeSuccess bool + +const ( + PermissionGroupGetResponseEnvelopeSuccessTrue PermissionGroupGetResponseEnvelopeSuccess = true +) + +func (r PermissionGroupGetResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case PermissionGroupGetResponseEnvelopeSuccessTrue: + return true + } + return false +} diff --git a/pages/project.go b/pages/project.go index 997f5ab2610..83118854266 100644 --- a/pages/project.go +++ b/pages/project.go @@ -18,7 +18,6 @@ import ( "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" "github.com/cloudflare/cloudflare-go/v6/packages/pagination" - "github.com/cloudflare/cloudflare-go/v6/shared" "github.com/tidwall/gjson" ) @@ -46,7 +45,7 @@ func NewProjectService(opts ...option.RequestOption) (r *ProjectService) { } // Create a new project. -func (r *ProjectService) New(ctx context.Context, params ProjectNewParams, opts ...option.RequestOption) (res *Project, err error) { +func (r *ProjectService) New(ctx context.Context, params ProjectNewParams, opts ...option.RequestOption) (res *ProjectNewResponse, err error) { var env ProjectNewResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { @@ -63,7 +62,7 @@ func (r *ProjectService) New(ctx context.Context, params ProjectNewParams, opts } // Fetch a list of all user projects. -func (r *ProjectService) List(ctx context.Context, params ProjectListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Deployment], err error) { +func (r *ProjectService) List(ctx context.Context, params ProjectListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[ProjectListResponse], err error) { var raw *http.Response opts = slices.Concat(r.Options, opts) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) @@ -85,7 +84,7 @@ func (r *ProjectService) List(ctx context.Context, params ProjectListParams, opt } // Fetch a list of all user projects. -func (r *ProjectService) ListAutoPaging(ctx context.Context, params ProjectListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Deployment] { +func (r *ProjectService) ListAutoPaging(ctx context.Context, params ProjectListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[ProjectListResponse] { return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) } @@ -112,7 +111,7 @@ func (r *ProjectService) Delete(ctx context.Context, projectName string, body Pr // Set new attributes for an existing project. Modify environment variables. To // delete an environment variable, set the key to null. -func (r *ProjectService) Edit(ctx context.Context, projectName string, params ProjectEditParams, opts ...option.RequestOption) (res *Project, err error) { +func (r *ProjectService) Edit(ctx context.Context, projectName string, params ProjectEditParams, opts ...option.RequestOption) (res *ProjectEditResponse, err error) { var env ProjectEditResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { @@ -133,7 +132,7 @@ func (r *ProjectService) Edit(ctx context.Context, projectName string, params Pr } // Fetch a project by name. -func (r *ProjectService) Get(ctx context.Context, projectName string, query ProjectGetParams, opts ...option.RequestOption) (res *Project, err error) { +func (r *ProjectService) Get(ctx context.Context, projectName string, query ProjectGetParams, opts ...option.RequestOption) (res *ProjectGetResponse, err error) { var env ProjectGetResponseEnvelope opts = slices.Concat(r.Options, opts) if query.AccountID.Value == "" { @@ -174,43 +173,184 @@ func (r *ProjectService) PurgeBuildCache(ctx context.Context, projectName string return } -type Deployment struct { +// The status of the deployment. +type Stage struct { + // When the stage ended. + EndedOn time.Time `json:"ended_on,required,nullable" format:"date-time"` + // The current build stage. + Name StageName `json:"name,required"` + // When the stage started. + StartedOn time.Time `json:"started_on,required,nullable" format:"date-time"` + // State of the current stage. + Status StageStatus `json:"status,required"` + JSON stageJSON `json:"-"` +} + +// stageJSON contains the JSON metadata for the struct [Stage] +type stageJSON struct { + EndedOn apijson.Field + Name apijson.Field + StartedOn apijson.Field + Status apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *Stage) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r stageJSON) RawJSON() string { + return r.raw +} + +// The current build stage. +type StageName string + +const ( + StageNameQueued StageName = "queued" + StageNameInitialize StageName = "initialize" + StageNameCloneRepo StageName = "clone_repo" + StageNameBuild StageName = "build" + StageNameDeploy StageName = "deploy" +) + +func (r StageName) IsKnown() bool { + switch r { + case StageNameQueued, StageNameInitialize, StageNameCloneRepo, StageNameBuild, StageNameDeploy: + return true + } + return false +} + +// State of the current stage. +type StageStatus string + +const ( + StageStatusSuccess StageStatus = "success" + StageStatusIdle StageStatus = "idle" + StageStatusActive StageStatus = "active" + StageStatusFailure StageStatus = "failure" + StageStatusCanceled StageStatus = "canceled" +) + +func (r StageStatus) IsKnown() bool { + switch r { + case StageStatusSuccess, StageStatusIdle, StageStatusActive, StageStatusFailure, StageStatusCanceled: + return true + } + return false +} + +type ProjectNewResponse struct { + // ID of the project. + ID string `json:"id,required"` + // Most recent production deployment of the project. + CanonicalDeployment ProjectNewResponseCanonicalDeployment `json:"canonical_deployment,required,nullable"` + // When the project was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Configs for deployments in a project. + DeploymentConfigs ProjectNewResponseDeploymentConfigs `json:"deployment_configs,required"` + // Framework the project is using. + Framework string `json:"framework,required"` + // Version of the framework the project is using. + FrameworkVersion string `json:"framework_version,required"` + // Most recent deployment of the project. + LatestDeployment ProjectNewResponseLatestDeployment `json:"latest_deployment,required,nullable"` + // Name of the project. + Name string `json:"name,required"` + // Name of the preview script. + PreviewScriptName string `json:"preview_script_name,required"` + // Production branch of the project. Used to identify production deployments. + ProductionBranch string `json:"production_branch,required"` + // Name of the production script. + ProductionScriptName string `json:"production_script_name,required"` + // Whether the project uses functions. + UsesFunctions bool `json:"uses_functions,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectNewResponseBuildConfig `json:"build_config"` + // A list of associated custom domains for the project. + Domains []string `json:"domains"` + // Configs for the project source control. + Source ProjectNewResponseSource `json:"source"` + // The Cloudflare subdomain associated with the project. + Subdomain string `json:"subdomain"` + JSON projectNewResponseJSON `json:"-"` +} + +// projectNewResponseJSON contains the JSON metadata for the struct +// [ProjectNewResponse] +type projectNewResponseJSON struct { + ID apijson.Field + CanonicalDeployment apijson.Field + CreatedOn apijson.Field + DeploymentConfigs apijson.Field + Framework apijson.Field + FrameworkVersion apijson.Field + LatestDeployment apijson.Field + Name apijson.Field + PreviewScriptName apijson.Field + ProductionBranch apijson.Field + ProductionScriptName apijson.Field + UsesFunctions apijson.Field + BuildConfig apijson.Field + Domains apijson.Field + Source apijson.Field + Subdomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseJSON) RawJSON() string { + return r.raw +} + +// Most recent production deployment of the project. +type ProjectNewResponseCanonicalDeployment struct { // Id of the deployment. - ID string `json:"id"` + ID string `json:"id,required"` // A list of alias URLs pointing to this deployment. - Aliases []string `json:"aliases,nullable"` + Aliases []string `json:"aliases,required,nullable"` // Configs for the project build process. - BuildConfig DeploymentBuildConfig `json:"build_config"` + BuildConfig ProjectNewResponseCanonicalDeploymentBuildConfig `json:"build_config,required"` // When the deployment was created. - CreatedOn time.Time `json:"created_on" format:"date-time"` + CreatedOn time.Time `json:"created_on,required" format:"date-time"` // Info about what caused the deployment. - DeploymentTrigger DeploymentDeploymentTrigger `json:"deployment_trigger"` + DeploymentTrigger ProjectNewResponseCanonicalDeploymentDeploymentTrigger `json:"deployment_trigger,required"` // Environment variables used for builds and Pages Functions. - EnvVars map[string]DeploymentEnvVar `json:"env_vars,nullable"` + EnvVars map[string]ProjectNewResponseCanonicalDeploymentEnvVar `json:"env_vars,required,nullable"` // Type of deploy. - Environment DeploymentEnvironment `json:"environment"` + Environment ProjectNewResponseCanonicalDeploymentEnvironment `json:"environment,required"` // If the deployment has been skipped. - IsSkipped bool `json:"is_skipped"` + IsSkipped bool `json:"is_skipped,required"` // The status of the deployment. - LatestStage Stage `json:"latest_stage"` + LatestStage Stage `json:"latest_stage,required"` // When the deployment was last modified. - ModifiedOn time.Time `json:"modified_on" format:"date-time"` + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` // Id of the project. - ProjectID string `json:"project_id"` + ProjectID string `json:"project_id,required"` // Name of the project. - ProjectName string `json:"project_name"` + ProjectName string `json:"project_name,required"` // Short Id (8 character) of the deployment. - ShortID string `json:"short_id"` - Source DeploymentSource `json:"source"` + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectNewResponseCanonicalDeploymentSource `json:"source,required"` // List of past stages. - Stages []Stage `json:"stages"` + Stages []Stage `json:"stages,required"` // The live URL to view this deployment. - URL string `json:"url"` - JSON deploymentJSON `json:"-"` + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectNewResponseCanonicalDeploymentJSON `json:"-"` } -// deploymentJSON contains the JSON metadata for the struct [Deployment] -type deploymentJSON struct { +// projectNewResponseCanonicalDeploymentJSON contains the JSON metadata for the +// struct [ProjectNewResponseCanonicalDeployment] +type projectNewResponseCanonicalDeploymentJSON struct { ID apijson.Field Aliases apijson.Field BuildConfig apijson.Field @@ -227,151 +367,157 @@ type deploymentJSON struct { Source apijson.Field Stages apijson.Field URL apijson.Field + UsesFunctions apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *Deployment) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseCanonicalDeployment) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r deploymentJSON) RawJSON() string { +func (r projectNewResponseCanonicalDeploymentJSON) RawJSON() string { return r.raw } // Configs for the project build process. -type DeploymentBuildConfig struct { +type ProjectNewResponseCanonicalDeploymentBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` // Enable build caching for the project. BuildCaching bool `json:"build_caching,nullable"` // Command used to build project. BuildCommand string `json:"build_command,nullable"` - // Output directory of the build. + // Assets output directory of the build. DestinationDir string `json:"destination_dir,nullable"` // Directory to run the command. - RootDir string `json:"root_dir,nullable"` - // The classifying tag for analytics. - WebAnalyticsTag string `json:"web_analytics_tag,nullable"` - // The auth token for analytics. - WebAnalyticsToken string `json:"web_analytics_token,nullable"` - JSON deploymentBuildConfigJSON `json:"-"` + RootDir string `json:"root_dir,nullable"` + JSON projectNewResponseCanonicalDeploymentBuildConfigJSON `json:"-"` } -// deploymentBuildConfigJSON contains the JSON metadata for the struct -// [DeploymentBuildConfig] -type deploymentBuildConfigJSON struct { +// projectNewResponseCanonicalDeploymentBuildConfigJSON contains the JSON metadata +// for the struct [ProjectNewResponseCanonicalDeploymentBuildConfig] +type projectNewResponseCanonicalDeploymentBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field BuildCaching apijson.Field BuildCommand apijson.Field DestinationDir apijson.Field RootDir apijson.Field - WebAnalyticsTag apijson.Field - WebAnalyticsToken apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DeploymentBuildConfig) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseCanonicalDeploymentBuildConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r deploymentBuildConfigJSON) RawJSON() string { +func (r projectNewResponseCanonicalDeploymentBuildConfigJSON) RawJSON() string { return r.raw } // Info about what caused the deployment. -type DeploymentDeploymentTrigger struct { +type ProjectNewResponseCanonicalDeploymentDeploymentTrigger struct { // Additional info about the trigger. - Metadata DeploymentDeploymentTriggerMetadata `json:"metadata"` + Metadata ProjectNewResponseCanonicalDeploymentDeploymentTriggerMetadata `json:"metadata,required"` // What caused the deployment. - Type DeploymentDeploymentTriggerType `json:"type"` - JSON deploymentDeploymentTriggerJSON `json:"-"` + Type ProjectNewResponseCanonicalDeploymentDeploymentTriggerType `json:"type,required"` + JSON projectNewResponseCanonicalDeploymentDeploymentTriggerJSON `json:"-"` } -// deploymentDeploymentTriggerJSON contains the JSON metadata for the struct -// [DeploymentDeploymentTrigger] -type deploymentDeploymentTriggerJSON struct { +// projectNewResponseCanonicalDeploymentDeploymentTriggerJSON contains the JSON +// metadata for the struct [ProjectNewResponseCanonicalDeploymentDeploymentTrigger] +type projectNewResponseCanonicalDeploymentDeploymentTriggerJSON struct { Metadata apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DeploymentDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseCanonicalDeploymentDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r deploymentDeploymentTriggerJSON) RawJSON() string { +func (r projectNewResponseCanonicalDeploymentDeploymentTriggerJSON) RawJSON() string { return r.raw } // Additional info about the trigger. -type DeploymentDeploymentTriggerMetadata struct { +type ProjectNewResponseCanonicalDeploymentDeploymentTriggerMetadata struct { // Where the trigger happened. - Branch string `json:"branch"` + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` // Hash of the deployment trigger commit. - CommitHash string `json:"commit_hash"` + CommitHash string `json:"commit_hash,required"` // Message of the deployment trigger commit. - CommitMessage string `json:"commit_message"` - JSON deploymentDeploymentTriggerMetadataJSON `json:"-"` + CommitMessage string `json:"commit_message,required"` + JSON projectNewResponseCanonicalDeploymentDeploymentTriggerMetadataJSON `json:"-"` } -// deploymentDeploymentTriggerMetadataJSON contains the JSON metadata for the -// struct [DeploymentDeploymentTriggerMetadata] -type deploymentDeploymentTriggerMetadataJSON struct { +// projectNewResponseCanonicalDeploymentDeploymentTriggerMetadataJSON contains the +// JSON metadata for the struct +// [ProjectNewResponseCanonicalDeploymentDeploymentTriggerMetadata] +type projectNewResponseCanonicalDeploymentDeploymentTriggerMetadataJSON struct { Branch apijson.Field + CommitDirty apijson.Field CommitHash apijson.Field CommitMessage apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DeploymentDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseCanonicalDeploymentDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r deploymentDeploymentTriggerMetadataJSON) RawJSON() string { +func (r projectNewResponseCanonicalDeploymentDeploymentTriggerMetadataJSON) RawJSON() string { return r.raw } // What caused the deployment. -type DeploymentDeploymentTriggerType string +type ProjectNewResponseCanonicalDeploymentDeploymentTriggerType string const ( - DeploymentDeploymentTriggerTypePush DeploymentDeploymentTriggerType = "push" - DeploymentDeploymentTriggerTypeADHoc DeploymentDeploymentTriggerType = "ad_hoc" + ProjectNewResponseCanonicalDeploymentDeploymentTriggerTypeGitHubPush ProjectNewResponseCanonicalDeploymentDeploymentTriggerType = "github:push" + ProjectNewResponseCanonicalDeploymentDeploymentTriggerTypeADHoc ProjectNewResponseCanonicalDeploymentDeploymentTriggerType = "ad_hoc" + ProjectNewResponseCanonicalDeploymentDeploymentTriggerTypeDeployHook ProjectNewResponseCanonicalDeploymentDeploymentTriggerType = "deploy_hook" ) -func (r DeploymentDeploymentTriggerType) IsKnown() bool { +func (r ProjectNewResponseCanonicalDeploymentDeploymentTriggerType) IsKnown() bool { switch r { - case DeploymentDeploymentTriggerTypePush, DeploymentDeploymentTriggerTypeADHoc: + case ProjectNewResponseCanonicalDeploymentDeploymentTriggerTypeGitHubPush, ProjectNewResponseCanonicalDeploymentDeploymentTriggerTypeADHoc, ProjectNewResponseCanonicalDeploymentDeploymentTriggerTypeDeployHook: return true } return false } // A plaintext environment variable. -type DeploymentEnvVar struct { - Type DeploymentEnvVarsType `json:"type,required"` +type ProjectNewResponseCanonicalDeploymentEnvVar struct { + Type ProjectNewResponseCanonicalDeploymentEnvVarsType `json:"type,required"` // Environment variable value. - Value string `json:"value,required"` - JSON deploymentEnvVarJSON `json:"-"` - union DeploymentEnvVarsUnion + Value string `json:"value,required"` + JSON projectNewResponseCanonicalDeploymentEnvVarJSON `json:"-"` + union ProjectNewResponseCanonicalDeploymentEnvVarsUnion } -// deploymentEnvVarJSON contains the JSON metadata for the struct -// [DeploymentEnvVar] -type deploymentEnvVarJSON struct { +// projectNewResponseCanonicalDeploymentEnvVarJSON contains the JSON metadata for +// the struct [ProjectNewResponseCanonicalDeploymentEnvVar] +type projectNewResponseCanonicalDeploymentEnvVarJSON struct { Type apijson.Field Value apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r deploymentEnvVarJSON) RawJSON() string { +func (r projectNewResponseCanonicalDeploymentEnvVarJSON) RawJSON() string { return r.raw } -func (r *DeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { - *r = DeploymentEnvVar{} +func (r *ProjectNewResponseCanonicalDeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectNewResponseCanonicalDeploymentEnvVar{} err = apijson.UnmarshalRoot(data, &r.union) if err != nil { return err @@ -379,178 +525,193 @@ func (r *DeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { return apijson.Port(r.union, &r) } -// AsUnion returns a [DeploymentEnvVarsUnion] interface which you can cast to the -// specific types for more type safety. +// AsUnion returns a [ProjectNewResponseCanonicalDeploymentEnvVarsUnion] interface +// which you can cast to the specific types for more type safety. // -// Possible runtime types of the union are [DeploymentEnvVarsPagesPlainTextEnvVar], -// [DeploymentEnvVarsPagesSecretTextEnvVar]. -func (r DeploymentEnvVar) AsUnion() DeploymentEnvVarsUnion { +// Possible runtime types of the union are +// [ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar], +// [ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar]. +func (r ProjectNewResponseCanonicalDeploymentEnvVar) AsUnion() ProjectNewResponseCanonicalDeploymentEnvVarsUnion { return r.union } // A plaintext environment variable. // -// Union satisfied by [DeploymentEnvVarsPagesPlainTextEnvVar] or -// [DeploymentEnvVarsPagesSecretTextEnvVar]. -type DeploymentEnvVarsUnion interface { - implementsDeploymentEnvVar() +// Union satisfied by +// [ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar] or +// [ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar]. +type ProjectNewResponseCanonicalDeploymentEnvVarsUnion interface { + implementsProjectNewResponseCanonicalDeploymentEnvVar() } func init() { apijson.RegisterUnion( - reflect.TypeOf((*DeploymentEnvVarsUnion)(nil)).Elem(), + reflect.TypeOf((*ProjectNewResponseCanonicalDeploymentEnvVarsUnion)(nil)).Elem(), "type", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DeploymentEnvVarsPagesPlainTextEnvVar{}), + Type: reflect.TypeOf(ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar{}), DiscriminatorValue: "plain_text", }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DeploymentEnvVarsPagesSecretTextEnvVar{}), + Type: reflect.TypeOf(ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar{}), DiscriminatorValue: "secret_text", }, ) } // A plaintext environment variable. -type DeploymentEnvVarsPagesPlainTextEnvVar struct { - Type DeploymentEnvVarsPagesPlainTextEnvVarType `json:"type,required"` +type ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar struct { + Type ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType `json:"type,required"` // Environment variable value. - Value string `json:"value,required"` - JSON deploymentEnvVarsPagesPlainTextEnvVarJSON `json:"-"` + Value string `json:"value,required"` + JSON projectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON `json:"-"` } -// deploymentEnvVarsPagesPlainTextEnvVarJSON contains the JSON metadata for the -// struct [DeploymentEnvVarsPagesPlainTextEnvVar] -type deploymentEnvVarsPagesPlainTextEnvVarJSON struct { +// projectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON contains +// the JSON metadata for the struct +// [ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar] +type projectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON struct { Type apijson.Field Value apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DeploymentEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r deploymentEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { +func (r projectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { return r.raw } -func (r DeploymentEnvVarsPagesPlainTextEnvVar) implementsDeploymentEnvVar() {} +func (r ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar) implementsProjectNewResponseCanonicalDeploymentEnvVar() { +} -type DeploymentEnvVarsPagesPlainTextEnvVarType string +type ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType string const ( - DeploymentEnvVarsPagesPlainTextEnvVarTypePlainText DeploymentEnvVarsPagesPlainTextEnvVarType = "plain_text" + ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType = "plain_text" ) -func (r DeploymentEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { +func (r ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { switch r { - case DeploymentEnvVarsPagesPlainTextEnvVarTypePlainText: + case ProjectNewResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText: return true } return false } // An encrypted environment variable. -type DeploymentEnvVarsPagesSecretTextEnvVar struct { - Type DeploymentEnvVarsPagesSecretTextEnvVarType `json:"type,required"` +type ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar struct { + Type ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType `json:"type,required"` // Secret value. - Value string `json:"value,required"` - JSON deploymentEnvVarsPagesSecretTextEnvVarJSON `json:"-"` + Value string `json:"value,required"` + JSON projectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON `json:"-"` } -// deploymentEnvVarsPagesSecretTextEnvVarJSON contains the JSON metadata for the -// struct [DeploymentEnvVarsPagesSecretTextEnvVar] -type deploymentEnvVarsPagesSecretTextEnvVarJSON struct { +// projectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON contains +// the JSON metadata for the struct +// [ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar] +type projectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON struct { Type apijson.Field Value apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DeploymentEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r deploymentEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { +func (r projectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { return r.raw } -func (r DeploymentEnvVarsPagesSecretTextEnvVar) implementsDeploymentEnvVar() {} +func (r ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar) implementsProjectNewResponseCanonicalDeploymentEnvVar() { +} -type DeploymentEnvVarsPagesSecretTextEnvVarType string +type ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType string const ( - DeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText DeploymentEnvVarsPagesSecretTextEnvVarType = "secret_text" + ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType = "secret_text" ) -func (r DeploymentEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { +func (r ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { switch r { - case DeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText: + case ProjectNewResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText: return true } return false } -type DeploymentEnvVarsType string +type ProjectNewResponseCanonicalDeploymentEnvVarsType string const ( - DeploymentEnvVarsTypePlainText DeploymentEnvVarsType = "plain_text" - DeploymentEnvVarsTypeSecretText DeploymentEnvVarsType = "secret_text" + ProjectNewResponseCanonicalDeploymentEnvVarsTypePlainText ProjectNewResponseCanonicalDeploymentEnvVarsType = "plain_text" + ProjectNewResponseCanonicalDeploymentEnvVarsTypeSecretText ProjectNewResponseCanonicalDeploymentEnvVarsType = "secret_text" ) -func (r DeploymentEnvVarsType) IsKnown() bool { +func (r ProjectNewResponseCanonicalDeploymentEnvVarsType) IsKnown() bool { switch r { - case DeploymentEnvVarsTypePlainText, DeploymentEnvVarsTypeSecretText: + case ProjectNewResponseCanonicalDeploymentEnvVarsTypePlainText, ProjectNewResponseCanonicalDeploymentEnvVarsTypeSecretText: return true } return false } // Type of deploy. -type DeploymentEnvironment string +type ProjectNewResponseCanonicalDeploymentEnvironment string const ( - DeploymentEnvironmentPreview DeploymentEnvironment = "preview" - DeploymentEnvironmentProduction DeploymentEnvironment = "production" + ProjectNewResponseCanonicalDeploymentEnvironmentPreview ProjectNewResponseCanonicalDeploymentEnvironment = "preview" + ProjectNewResponseCanonicalDeploymentEnvironmentProduction ProjectNewResponseCanonicalDeploymentEnvironment = "production" ) -func (r DeploymentEnvironment) IsKnown() bool { +func (r ProjectNewResponseCanonicalDeploymentEnvironment) IsKnown() bool { switch r { - case DeploymentEnvironmentPreview, DeploymentEnvironmentProduction: + case ProjectNewResponseCanonicalDeploymentEnvironmentPreview, ProjectNewResponseCanonicalDeploymentEnvironmentProduction: return true } return false } -type DeploymentSource struct { - Config DeploymentSourceConfig `json:"config"` +// Configs for the project source control. +type ProjectNewResponseCanonicalDeploymentSource struct { + Config ProjectNewResponseCanonicalDeploymentSourceConfig `json:"config,required"` // The source control management provider. - Type DeploymentSourceType `json:"type"` - JSON deploymentSourceJSON `json:"-"` + Type ProjectNewResponseCanonicalDeploymentSourceType `json:"type,required"` + JSON projectNewResponseCanonicalDeploymentSourceJSON `json:"-"` } -// deploymentSourceJSON contains the JSON metadata for the struct -// [DeploymentSource] -type deploymentSourceJSON struct { +// projectNewResponseCanonicalDeploymentSourceJSON contains the JSON metadata for +// the struct [ProjectNewResponseCanonicalDeploymentSource] +type projectNewResponseCanonicalDeploymentSourceJSON struct { Config apijson.Field Type apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DeploymentSource) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseCanonicalDeploymentSource) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r deploymentSourceJSON) RawJSON() string { +func (r projectNewResponseCanonicalDeploymentSourceJSON) RawJSON() string { return r.raw } -type DeploymentSourceConfig struct { +type ProjectNewResponseCanonicalDeploymentSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` // Whether to enable automatic deployments when pushing to the source repository. // When disabled, no deployments (production or preview) will be triggered // automatically. @@ -558,16 +719,14 @@ type DeploymentSourceConfig struct { // Deprecated: Use `production_deployments_enabled` and // `preview_deployment_setting` for more granular control. DeploymentsEnabled bool `json:"deployments_enabled"` - // The owner of the repository. - Owner string `json:"owner"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` // A list of paths that should be excluded from triggering a preview deployment. // Wildcard syntax (`*`) is supported. PathExcludes []string `json:"path_excludes"` // A list of paths that should be watched to trigger a preview deployment. Wildcard // syntax (`*`) is supported. PathIncludes []string `json:"path_includes"` - // Whether to enable PR comments. - PrCommentsEnabled bool `json:"pr_comments_enabled"` // A list of branches that should not trigger a preview deployment. Wildcard syntax // (`*`) is supported. Must be used with `preview_deployment_setting` set to // `custom`. @@ -577,1012 +736,770 @@ type DeploymentSourceConfig struct { // `custom`. PreviewBranchIncludes []string `json:"preview_branch_includes"` // Controls whether commits to preview branches trigger a preview deployment. - PreviewDeploymentSetting DeploymentSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` - // The production branch of the repository. - ProductionBranch string `json:"production_branch"` + PreviewDeploymentSetting ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` // Whether to trigger a production deployment on commits to the production branch. ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` - // The name of the repository. - RepoName string `json:"repo_name"` - JSON deploymentSourceConfigJSON `json:"-"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectNewResponseCanonicalDeploymentSourceConfigJSON `json:"-"` } -// deploymentSourceConfigJSON contains the JSON metadata for the struct -// [DeploymentSourceConfig] -type deploymentSourceConfigJSON struct { - DeploymentsEnabled apijson.Field +// projectNewResponseCanonicalDeploymentSourceConfigJSON contains the JSON metadata +// for the struct [ProjectNewResponseCanonicalDeploymentSourceConfig] +type projectNewResponseCanonicalDeploymentSourceConfigJSON struct { Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field PathExcludes apijson.Field PathIncludes apijson.Field - PrCommentsEnabled apijson.Field PreviewBranchExcludes apijson.Field PreviewBranchIncludes apijson.Field PreviewDeploymentSetting apijson.Field - ProductionBranch apijson.Field ProductionDeploymentsEnabled apijson.Field - RepoName apijson.Field + RepoID apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DeploymentSourceConfig) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseCanonicalDeploymentSourceConfig) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r deploymentSourceConfigJSON) RawJSON() string { +func (r projectNewResponseCanonicalDeploymentSourceConfigJSON) RawJSON() string { return r.raw } // Controls whether commits to preview branches trigger a preview deployment. -type DeploymentSourceConfigPreviewDeploymentSetting string +type ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting string const ( - DeploymentSourceConfigPreviewDeploymentSettingAll DeploymentSourceConfigPreviewDeploymentSetting = "all" - DeploymentSourceConfigPreviewDeploymentSettingNone DeploymentSourceConfigPreviewDeploymentSetting = "none" - DeploymentSourceConfigPreviewDeploymentSettingCustom DeploymentSourceConfigPreviewDeploymentSetting = "custom" + ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingAll ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "all" + ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingNone ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "none" + ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingCustom ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "custom" ) -func (r DeploymentSourceConfigPreviewDeploymentSetting) IsKnown() bool { +func (r ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting) IsKnown() bool { switch r { - case DeploymentSourceConfigPreviewDeploymentSettingAll, DeploymentSourceConfigPreviewDeploymentSettingNone, DeploymentSourceConfigPreviewDeploymentSettingCustom: + case ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingAll, ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingNone, ProjectNewResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingCustom: return true } return false } // The source control management provider. -type DeploymentSourceType string +type ProjectNewResponseCanonicalDeploymentSourceType string const ( - DeploymentSourceTypeGitHub DeploymentSourceType = "github" - DeploymentSourceTypeGitlab DeploymentSourceType = "gitlab" + ProjectNewResponseCanonicalDeploymentSourceTypeGitHub ProjectNewResponseCanonicalDeploymentSourceType = "github" + ProjectNewResponseCanonicalDeploymentSourceTypeGitlab ProjectNewResponseCanonicalDeploymentSourceType = "gitlab" ) -func (r DeploymentSourceType) IsKnown() bool { +func (r ProjectNewResponseCanonicalDeploymentSourceType) IsKnown() bool { switch r { - case DeploymentSourceTypeGitHub, DeploymentSourceTypeGitlab: + case ProjectNewResponseCanonicalDeploymentSourceTypeGitHub, ProjectNewResponseCanonicalDeploymentSourceTypeGitlab: return true } return false } -type DeploymentParam struct { - // Configs for the project build process. - BuildConfig param.Field[DeploymentBuildConfigParam] `json:"build_config"` - // Environment variables used for builds and Pages Functions. - EnvVars param.Field[map[string]DeploymentEnvVarsUnionParam] `json:"env_vars"` - Source param.Field[DeploymentSourceParam] `json:"source"` +// Configs for deployments in a project. +type ProjectNewResponseDeploymentConfigs struct { + // Configs for preview deploys. + Preview ProjectNewResponseDeploymentConfigsPreview `json:"preview,required"` + // Configs for production deploys. + Production ProjectNewResponseDeploymentConfigsProduction `json:"production,required"` + JSON projectNewResponseDeploymentConfigsJSON `json:"-"` } -func (r DeploymentParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// projectNewResponseDeploymentConfigsJSON contains the JSON metadata for the +// struct [ProjectNewResponseDeploymentConfigs] +type projectNewResponseDeploymentConfigsJSON struct { + Preview apijson.Field + Production apijson.Field + raw string + ExtraFields map[string]apijson.Field } -// Configs for the project build process. -type DeploymentBuildConfigParam struct { - // Enable build caching for the project. - BuildCaching param.Field[bool] `json:"build_caching"` - // Command used to build project. - BuildCommand param.Field[string] `json:"build_command"` - // Output directory of the build. - DestinationDir param.Field[string] `json:"destination_dir"` - // Directory to run the command. - RootDir param.Field[string] `json:"root_dir"` - // The classifying tag for analytics. - WebAnalyticsTag param.Field[string] `json:"web_analytics_tag"` - // The auth token for analytics. - WebAnalyticsToken param.Field[string] `json:"web_analytics_token"` +func (r *ProjectNewResponseDeploymentConfigs) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func (r DeploymentBuildConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +func (r projectNewResponseDeploymentConfigsJSON) RawJSON() string { + return r.raw } -// Info about what caused the deployment. -type DeploymentDeploymentTriggerParam struct { - // Additional info about the trigger. - Metadata param.Field[DeploymentDeploymentTriggerMetadataParam] `json:"metadata"` +// Configs for preview deploys. +type ProjectNewResponseDeploymentConfigsPreview struct { + // Whether to always use the latest compatibility date for Pages Functions. + AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date,required"` + // The major version of the build image to use for Pages Functions. + BuildImageMajorVersion int64 `json:"build_image_major_version,required"` + // Compatibility date used for Pages Functions. + CompatibilityDate string `json:"compatibility_date,required"` + // Compatibility flags used for Pages Functions. + CompatibilityFlags []string `json:"compatibility_flags,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectNewResponseDeploymentConfigsPreviewEnvVar `json:"env_vars,required,nullable"` + // Whether to fail open when the deployment config cannot be applied. + FailOpen bool `json:"fail_open,required"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel ProjectNewResponseDeploymentConfigsPreviewUsageModel `json:"usage_model,required"` + // Constellation bindings used for Pages Functions. + AIBindings map[string]ProjectNewResponseDeploymentConfigsPreviewAIBinding `json:"ai_bindings"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets map[string]ProjectNewResponseDeploymentConfigsPreviewAnalyticsEngineDataset `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers map[string]ProjectNewResponseDeploymentConfigsPreviewBrowser `json:"browsers"` + // D1 databases used for Pages Functions. + D1Databases map[string]ProjectNewResponseDeploymentConfigsPreviewD1Database `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces map[string]ProjectNewResponseDeploymentConfigsPreviewDurableObjectNamespace `json:"durable_object_namespaces"` + // Hyperdrive bindings used for Pages Functions. + HyperdriveBindings map[string]ProjectNewResponseDeploymentConfigsPreviewHyperdriveBinding `json:"hyperdrive_bindings"` + // KV namespaces used for Pages Functions. + KVNamespaces map[string]ProjectNewResponseDeploymentConfigsPreviewKVNamespace `json:"kv_namespaces"` + // Limits for Pages Functions. + Limits ProjectNewResponseDeploymentConfigsPreviewLimits `json:"limits"` + // mTLS bindings used for Pages Functions. + MTLSCertificates map[string]ProjectNewResponseDeploymentConfigsPreviewMTLSCertificate `json:"mtls_certificates"` + // Placement setting used for Pages Functions. + Placement ProjectNewResponseDeploymentConfigsPreviewPlacement `json:"placement"` + // Queue Producer bindings used for Pages Functions. + QueueProducers map[string]ProjectNewResponseDeploymentConfigsPreviewQueueProducer `json:"queue_producers"` + // R2 buckets used for Pages Functions. + R2Buckets map[string]ProjectNewResponseDeploymentConfigsPreviewR2Bucket `json:"r2_buckets"` + // Services used for Pages Functions. + Services map[string]ProjectNewResponseDeploymentConfigsPreviewService `json:"services"` + // Vectorize bindings used for Pages Functions. + VectorizeBindings map[string]ProjectNewResponseDeploymentConfigsPreviewVectorizeBinding `json:"vectorize_bindings"` + // Hash of the Wrangler configuration used for the deployment. + WranglerConfigHash string `json:"wrangler_config_hash"` + JSON projectNewResponseDeploymentConfigsPreviewJSON `json:"-"` } -func (r DeploymentDeploymentTriggerParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// projectNewResponseDeploymentConfigsPreviewJSON contains the JSON metadata for +// the struct [ProjectNewResponseDeploymentConfigsPreview] +type projectNewResponseDeploymentConfigsPreviewJSON struct { + AlwaysUseLatestCompatibilityDate apijson.Field + BuildImageMajorVersion apijson.Field + CompatibilityDate apijson.Field + CompatibilityFlags apijson.Field + EnvVars apijson.Field + FailOpen apijson.Field + UsageModel apijson.Field + AIBindings apijson.Field + AnalyticsEngineDatasets apijson.Field + Browsers apijson.Field + D1Databases apijson.Field + DurableObjectNamespaces apijson.Field + HyperdriveBindings apijson.Field + KVNamespaces apijson.Field + Limits apijson.Field + MTLSCertificates apijson.Field + Placement apijson.Field + QueueProducers apijson.Field + R2Buckets apijson.Field + Services apijson.Field + VectorizeBindings apijson.Field + WranglerConfigHash apijson.Field + raw string + ExtraFields map[string]apijson.Field } -// Additional info about the trigger. -type DeploymentDeploymentTriggerMetadataParam struct { +func (r *ProjectNewResponseDeploymentConfigsPreview) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func (r DeploymentDeploymentTriggerMetadataParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +func (r projectNewResponseDeploymentConfigsPreviewJSON) RawJSON() string { + return r.raw } // A plaintext environment variable. -type DeploymentEnvVarParam struct { - Type param.Field[DeploymentEnvVarsType] `json:"type,required"` +type ProjectNewResponseDeploymentConfigsPreviewEnvVar struct { + Type ProjectNewResponseDeploymentConfigsPreviewEnvVarsType `json:"type,required"` // Environment variable value. - Value param.Field[string] `json:"value,required"` + Value string `json:"value,required"` + JSON projectNewResponseDeploymentConfigsPreviewEnvVarJSON `json:"-"` + union ProjectNewResponseDeploymentConfigsPreviewEnvVarsUnion } -func (r DeploymentEnvVarParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// projectNewResponseDeploymentConfigsPreviewEnvVarJSON contains the JSON metadata +// for the struct [ProjectNewResponseDeploymentConfigsPreviewEnvVar] +type projectNewResponseDeploymentConfigsPreviewEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r DeploymentEnvVarParam) implementsDeploymentEnvVarsUnionParam() {} - -// A plaintext environment variable. -// -// Satisfied by [pages.DeploymentEnvVarsPagesPlainTextEnvVarParam], -// [pages.DeploymentEnvVarsPagesSecretTextEnvVarParam], [DeploymentEnvVarParam]. -type DeploymentEnvVarsUnionParam interface { - implementsDeploymentEnvVarsUnionParam() +func (r projectNewResponseDeploymentConfigsPreviewEnvVarJSON) RawJSON() string { + return r.raw } -// A plaintext environment variable. -type DeploymentEnvVarsPagesPlainTextEnvVarParam struct { - Type param.Field[DeploymentEnvVarsPagesPlainTextEnvVarType] `json:"type,required"` - // Environment variable value. - Value param.Field[string] `json:"value,required"` +func (r *ProjectNewResponseDeploymentConfigsPreviewEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectNewResponseDeploymentConfigsPreviewEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) } -func (r DeploymentEnvVarsPagesPlainTextEnvVarParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +// AsUnion returns a [ProjectNewResponseDeploymentConfigsPreviewEnvVarsUnion] +// interface which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar], +// [ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. +func (r ProjectNewResponseDeploymentConfigsPreviewEnvVar) AsUnion() ProjectNewResponseDeploymentConfigsPreviewEnvVarsUnion { + return r.union } -func (r DeploymentEnvVarsPagesPlainTextEnvVarParam) implementsDeploymentEnvVarsUnionParam() {} - -// An encrypted environment variable. -type DeploymentEnvVarsPagesSecretTextEnvVarParam struct { - Type param.Field[DeploymentEnvVarsPagesSecretTextEnvVarType] `json:"type,required"` - // Secret value. - Value param.Field[string] `json:"value,required"` +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] or +// [ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. +type ProjectNewResponseDeploymentConfigsPreviewEnvVarsUnion interface { + implementsProjectNewResponseDeploymentConfigsPreviewEnvVar() } -func (r DeploymentEnvVarsPagesSecretTextEnvVarParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -func (r DeploymentEnvVarsPagesSecretTextEnvVarParam) implementsDeploymentEnvVarsUnionParam() {} - -type DeploymentSourceParam struct { - Config param.Field[DeploymentSourceConfigParam] `json:"config"` - // The source control management provider. - Type param.Field[DeploymentSourceType] `json:"type"` -} - -func (r DeploymentSourceParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type DeploymentSourceConfigParam struct { - // Whether to enable automatic deployments when pushing to the source repository. - // When disabled, no deployments (production or preview) will be triggered - // automatically. - // - // Deprecated: Use `production_deployments_enabled` and - // `preview_deployment_setting` for more granular control. - DeploymentsEnabled param.Field[bool] `json:"deployments_enabled"` - // The owner of the repository. - Owner param.Field[string] `json:"owner"` - // A list of paths that should be excluded from triggering a preview deployment. - // Wildcard syntax (`*`) is supported. - PathExcludes param.Field[[]string] `json:"path_excludes"` - // A list of paths that should be watched to trigger a preview deployment. Wildcard - // syntax (`*`) is supported. - PathIncludes param.Field[[]string] `json:"path_includes"` - // Whether to enable PR comments. - PrCommentsEnabled param.Field[bool] `json:"pr_comments_enabled"` - // A list of branches that should not trigger a preview deployment. Wildcard syntax - // (`*`) is supported. Must be used with `preview_deployment_setting` set to - // `custom`. - PreviewBranchExcludes param.Field[[]string] `json:"preview_branch_excludes"` - // A list of branches that should trigger a preview deployment. Wildcard syntax - // (`*`) is supported. Must be used with `preview_deployment_setting` set to - // `custom`. - PreviewBranchIncludes param.Field[[]string] `json:"preview_branch_includes"` - // Controls whether commits to preview branches trigger a preview deployment. - PreviewDeploymentSetting param.Field[DeploymentSourceConfigPreviewDeploymentSetting] `json:"preview_deployment_setting"` - // The production branch of the repository. - ProductionBranch param.Field[string] `json:"production_branch"` - // Whether to trigger a production deployment on commits to the production branch. - ProductionDeploymentsEnabled param.Field[bool] `json:"production_deployments_enabled"` - // The name of the repository. - RepoName param.Field[string] `json:"repo_name"` -} - -func (r DeploymentSourceConfigParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectNewResponseDeploymentConfigsPreviewEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) } -type Project struct { - // ID of the project. - ID string `json:"id,required"` - // Name of the project. - Name string `json:"name,required"` - // Production branch of the project. Used to identify production deployments. - ProductionBranch string `json:"production_branch,required"` - // Configs for the project build process. - BuildConfig ProjectBuildConfig `json:"build_config,nullable"` - // Most recent production deployment of the project. - CanonicalDeployment Deployment `json:"canonical_deployment,nullable"` - // When the project was created. - CreatedOn time.Time `json:"created_on" format:"date-time"` - // Configs for deployments in a project. - DeploymentConfigs ProjectDeploymentConfigs `json:"deployment_configs,nullable"` - // A list of associated custom domains for the project. - Domains []string `json:"domains"` - // Framework the project is using. - Framework string `json:"framework"` - // Version of the framework the project is using. - FrameworkVersion string `json:"framework_version"` - // Most recent deployment of the project. - LatestDeployment Deployment `json:"latest_deployment,nullable"` - // Name of the preview script. - PreviewScriptName string `json:"preview_script_name"` - // Name of the production script. - ProductionScriptName string `json:"production_script_name"` - Source ProjectSource `json:"source"` - // The Cloudflare subdomain associated with the project. - Subdomain string `json:"subdomain"` - // Whether the project uses functions. - UsesFunctions bool `json:"uses_functions"` - JSON projectJSON `json:"-"` +// A plaintext environment variable. +type ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar struct { + Type ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON `json:"-"` } -// projectJSON contains the JSON metadata for the struct [Project] -type projectJSON struct { - ID apijson.Field - Name apijson.Field - ProductionBranch apijson.Field - BuildConfig apijson.Field - CanonicalDeployment apijson.Field - CreatedOn apijson.Field - DeploymentConfigs apijson.Field - Domains apijson.Field - Framework apijson.Field - FrameworkVersion apijson.Field - LatestDeployment apijson.Field - PreviewScriptName apijson.Field - ProductionScriptName apijson.Field - Source apijson.Field - Subdomain apijson.Field - UsesFunctions apijson.Field - raw string - ExtraFields map[string]apijson.Field +// projectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] +type projectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r *Project) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { return r.raw } -// Configs for the project build process. -type ProjectBuildConfig struct { - // Enable build caching for the project. - BuildCaching bool `json:"build_caching,nullable"` - // Command used to build project. - BuildCommand string `json:"build_command,nullable"` - // Output directory of the build. - DestinationDir string `json:"destination_dir,nullable"` - // Directory to run the command. - RootDir string `json:"root_dir,nullable"` - // The classifying tag for analytics. - WebAnalyticsTag string `json:"web_analytics_tag,nullable"` - // The auth token for analytics. - WebAnalyticsToken string `json:"web_analytics_token,nullable"` - JSON projectBuildConfigJSON `json:"-"` +func (r ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) implementsProjectNewResponseDeploymentConfigsPreviewEnvVar() { } -// projectBuildConfigJSON contains the JSON metadata for the struct -// [ProjectBuildConfig] -type projectBuildConfigJSON struct { - BuildCaching apijson.Field - BuildCommand apijson.Field - DestinationDir apijson.Field - RootDir apijson.Field - WebAnalyticsTag apijson.Field - WebAnalyticsToken apijson.Field - raw string - ExtraFields map[string]apijson.Field -} +type ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType string -func (r *ProjectBuildConfig) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} +const ( + ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType = "plain_text" +) -func (r projectBuildConfigJSON) RawJSON() string { - return r.raw +func (r ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false } -// Configs for deployments in a project. -type ProjectDeploymentConfigs struct { - // Configs for preview deploys. - Preview ProjectDeploymentConfigsPreview `json:"preview,nullable"` - // Configs for production deploys. - Production ProjectDeploymentConfigsProduction `json:"production,nullable"` - JSON projectDeploymentConfigsJSON `json:"-"` +// An encrypted environment variable. +type ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar struct { + Type ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON `json:"-"` } -// projectDeploymentConfigsJSON contains the JSON metadata for the struct -// [ProjectDeploymentConfigs] -type projectDeploymentConfigsJSON struct { - Preview apijson.Field - Production apijson.Field +// projectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar] +type projectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigs) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { return r.raw } -// Configs for preview deploys. -type ProjectDeploymentConfigsPreview struct { - // Constellation bindings used for Pages Functions. - AIBindings map[string]ProjectDeploymentConfigsPreviewAIBinding `json:"ai_bindings,nullable"` - // Whether to always use the latest compatibility date for Pages Functions. - AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date"` - // Analytics Engine bindings used for Pages Functions. - AnalyticsEngineDatasets map[string]ProjectDeploymentConfigsPreviewAnalyticsEngineDataset `json:"analytics_engine_datasets,nullable"` - // Browser bindings used for Pages Functions. - Browsers map[string]ProjectDeploymentConfigsPreviewBrowser `json:"browsers,nullable"` - // The major version of the build image to use for Pages Functions. - BuildImageMajorVersion int64 `json:"build_image_major_version"` - // Compatibility date used for Pages Functions. - CompatibilityDate string `json:"compatibility_date"` - // Compatibility flags used for Pages Functions. - CompatibilityFlags []string `json:"compatibility_flags,nullable"` - // D1 databases used for Pages Functions. - D1Databases map[string]ProjectDeploymentConfigsPreviewD1Database `json:"d1_databases,nullable"` - // Durable Object namespaces used for Pages Functions. - DurableObjectNamespaces map[string]ProjectDeploymentConfigsPreviewDurableObjectNamespace `json:"durable_object_namespaces,nullable"` - // Environment variables used for builds and Pages Functions. - EnvVars map[string]ProjectDeploymentConfigsPreviewEnvVar `json:"env_vars,nullable"` - // Whether to fail open when the deployment config cannot be applied. - FailOpen bool `json:"fail_open"` - // Hyperdrive bindings used for Pages Functions. - HyperdriveBindings map[string]ProjectDeploymentConfigsPreviewHyperdriveBinding `json:"hyperdrive_bindings,nullable"` - // KV namespaces used for Pages Functions. - KVNamespaces map[string]ProjectDeploymentConfigsPreviewKVNamespace `json:"kv_namespaces,nullable"` - // Limits for Pages Functions. - Limits ProjectDeploymentConfigsPreviewLimits `json:"limits,nullable"` - // mTLS bindings used for Pages Functions. - MTLSCertificates map[string]ProjectDeploymentConfigsPreviewMTLSCertificate `json:"mtls_certificates,nullable"` - // Placement setting used for Pages Functions. - Placement ProjectDeploymentConfigsPreviewPlacement `json:"placement,nullable"` - // Queue Producer bindings used for Pages Functions. - QueueProducers map[string]ProjectDeploymentConfigsPreviewQueueProducer `json:"queue_producers,nullable"` - // R2 buckets used for Pages Functions. - R2Buckets map[string]ProjectDeploymentConfigsPreviewR2Bucket `json:"r2_buckets,nullable"` - // Services used for Pages Functions. - Services map[string]ProjectDeploymentConfigsPreviewService `json:"services,nullable"` - // The usage model for Pages Functions. - // - // Deprecated: All new projects now use the Standard usage model. - UsageModel ProjectDeploymentConfigsPreviewUsageModel `json:"usage_model"` - // Vectorize bindings used for Pages Functions. - VectorizeBindings map[string]ProjectDeploymentConfigsPreviewVectorizeBinding `json:"vectorize_bindings,nullable"` - // Hash of the Wrangler configuration used for the deployment. - WranglerConfigHash string `json:"wrangler_config_hash"` - JSON projectDeploymentConfigsPreviewJSON `json:"-"` +func (r ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) implementsProjectNewResponseDeploymentConfigsPreviewEnvVar() { } -// projectDeploymentConfigsPreviewJSON contains the JSON metadata for the struct -// [ProjectDeploymentConfigsPreview] -type projectDeploymentConfigsPreviewJSON struct { - AIBindings apijson.Field - AlwaysUseLatestCompatibilityDate apijson.Field - AnalyticsEngineDatasets apijson.Field - Browsers apijson.Field - BuildImageMajorVersion apijson.Field - CompatibilityDate apijson.Field - CompatibilityFlags apijson.Field - D1Databases apijson.Field - DurableObjectNamespaces apijson.Field - EnvVars apijson.Field - FailOpen apijson.Field - HyperdriveBindings apijson.Field - KVNamespaces apijson.Field - Limits apijson.Field - MTLSCertificates apijson.Field - Placement apijson.Field - QueueProducers apijson.Field - R2Buckets apijson.Field - Services apijson.Field - UsageModel apijson.Field - VectorizeBindings apijson.Field - WranglerConfigHash apijson.Field - raw string - ExtraFields map[string]apijson.Field +type ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectNewResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false } -func (r *ProjectDeploymentConfigsPreview) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +type ProjectNewResponseDeploymentConfigsPreviewEnvVarsType string + +const ( + ProjectNewResponseDeploymentConfigsPreviewEnvVarsTypePlainText ProjectNewResponseDeploymentConfigsPreviewEnvVarsType = "plain_text" + ProjectNewResponseDeploymentConfigsPreviewEnvVarsTypeSecretText ProjectNewResponseDeploymentConfigsPreviewEnvVarsType = "secret_text" +) + +func (r ProjectNewResponseDeploymentConfigsPreviewEnvVarsType) IsKnown() bool { + switch r { + case ProjectNewResponseDeploymentConfigsPreviewEnvVarsTypePlainText, ProjectNewResponseDeploymentConfigsPreviewEnvVarsTypeSecretText: + return true + } + return false } -func (r projectDeploymentConfigsPreviewJSON) RawJSON() string { - return r.raw +// The usage model for Pages Functions. +type ProjectNewResponseDeploymentConfigsPreviewUsageModel string + +const ( + ProjectNewResponseDeploymentConfigsPreviewUsageModelStandard ProjectNewResponseDeploymentConfigsPreviewUsageModel = "standard" + ProjectNewResponseDeploymentConfigsPreviewUsageModelBundled ProjectNewResponseDeploymentConfigsPreviewUsageModel = "bundled" + ProjectNewResponseDeploymentConfigsPreviewUsageModelUnbound ProjectNewResponseDeploymentConfigsPreviewUsageModel = "unbound" +) + +func (r ProjectNewResponseDeploymentConfigsPreviewUsageModel) IsKnown() bool { + switch r { + case ProjectNewResponseDeploymentConfigsPreviewUsageModelStandard, ProjectNewResponseDeploymentConfigsPreviewUsageModelBundled, ProjectNewResponseDeploymentConfigsPreviewUsageModelUnbound: + return true + } + return false } // AI binding. -type ProjectDeploymentConfigsPreviewAIBinding struct { - ProjectID string `json:"project_id"` - JSON projectDeploymentConfigsPreviewAIBindingJSON `json:"-"` +type ProjectNewResponseDeploymentConfigsPreviewAIBinding struct { + ProjectID string `json:"project_id,required"` + JSON projectNewResponseDeploymentConfigsPreviewAIBindingJSON `json:"-"` } -// projectDeploymentConfigsPreviewAIBindingJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsPreviewAIBinding] -type projectDeploymentConfigsPreviewAIBindingJSON struct { +// projectNewResponseDeploymentConfigsPreviewAIBindingJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsPreviewAIBinding] +type projectNewResponseDeploymentConfigsPreviewAIBindingJSON struct { ProjectID apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewAIBinding) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewAIBinding) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewAIBindingJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewAIBindingJSON) RawJSON() string { return r.raw } // Analytics Engine binding. -type ProjectDeploymentConfigsPreviewAnalyticsEngineDataset struct { +type ProjectNewResponseDeploymentConfigsPreviewAnalyticsEngineDataset struct { // Name of the dataset. - Dataset string `json:"dataset"` - JSON projectDeploymentConfigsPreviewAnalyticsEngineDatasetJSON `json:"-"` + Dataset string `json:"dataset,required"` + JSON projectNewResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON `json:"-"` } -// projectDeploymentConfigsPreviewAnalyticsEngineDatasetJSON contains the JSON -// metadata for the struct [ProjectDeploymentConfigsPreviewAnalyticsEngineDataset] -type projectDeploymentConfigsPreviewAnalyticsEngineDatasetJSON struct { +// projectNewResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON contains +// the JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsPreviewAnalyticsEngineDataset] +type projectNewResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON struct { Dataset apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewAnalyticsEngineDatasetJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON) RawJSON() string { return r.raw } // Browser binding. -type ProjectDeploymentConfigsPreviewBrowser struct { - JSON projectDeploymentConfigsPreviewBrowserJSON `json:"-"` +type ProjectNewResponseDeploymentConfigsPreviewBrowser struct { + JSON projectNewResponseDeploymentConfigsPreviewBrowserJSON `json:"-"` } -// projectDeploymentConfigsPreviewBrowserJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsPreviewBrowser] -type projectDeploymentConfigsPreviewBrowserJSON struct { +// projectNewResponseDeploymentConfigsPreviewBrowserJSON contains the JSON metadata +// for the struct [ProjectNewResponseDeploymentConfigsPreviewBrowser] +type projectNewResponseDeploymentConfigsPreviewBrowserJSON struct { raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewBrowser) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewBrowser) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewBrowserJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewBrowserJSON) RawJSON() string { return r.raw } // D1 binding. -type ProjectDeploymentConfigsPreviewD1Database struct { +type ProjectNewResponseDeploymentConfigsPreviewD1Database struct { // UUID of the D1 database. - ID string `json:"id"` - JSON projectDeploymentConfigsPreviewD1DatabaseJSON `json:"-"` + ID string `json:"id,required"` + JSON projectNewResponseDeploymentConfigsPreviewD1DatabaseJSON `json:"-"` } -// projectDeploymentConfigsPreviewD1DatabaseJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsPreviewD1Database] -type projectDeploymentConfigsPreviewD1DatabaseJSON struct { +// projectNewResponseDeploymentConfigsPreviewD1DatabaseJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsPreviewD1Database] +type projectNewResponseDeploymentConfigsPreviewD1DatabaseJSON struct { ID apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewD1Database) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewD1Database) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewD1DatabaseJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewD1DatabaseJSON) RawJSON() string { return r.raw } // Durable Object binding. -type ProjectDeploymentConfigsPreviewDurableObjectNamespace struct { +type ProjectNewResponseDeploymentConfigsPreviewDurableObjectNamespace struct { // ID of the Durable Object namespace. - NamespaceID string `json:"namespace_id"` - JSON projectDeploymentConfigsPreviewDurableObjectNamespaceJSON `json:"-"` + NamespaceID string `json:"namespace_id,required"` + JSON projectNewResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON `json:"-"` } -// projectDeploymentConfigsPreviewDurableObjectNamespaceJSON contains the JSON -// metadata for the struct [ProjectDeploymentConfigsPreviewDurableObjectNamespace] -type projectDeploymentConfigsPreviewDurableObjectNamespaceJSON struct { +// projectNewResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON contains +// the JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsPreviewDurableObjectNamespace] +type projectNewResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON struct { NamespaceID apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewDurableObjectNamespaceJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON) RawJSON() string { return r.raw } -// A plaintext environment variable. -type ProjectDeploymentConfigsPreviewEnvVar struct { - Type ProjectDeploymentConfigsPreviewEnvVarsType `json:"type,required"` - // Environment variable value. - Value string `json:"value,required"` - JSON projectDeploymentConfigsPreviewEnvVarJSON `json:"-"` - union ProjectDeploymentConfigsPreviewEnvVarsUnion +// Hyperdrive binding. +type ProjectNewResponseDeploymentConfigsPreviewHyperdriveBinding struct { + ID string `json:"id,required"` + JSON projectNewResponseDeploymentConfigsPreviewHyperdriveBindingJSON `json:"-"` } -// projectDeploymentConfigsPreviewEnvVarJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsPreviewEnvVar] -type projectDeploymentConfigsPreviewEnvVarJSON struct { - Type apijson.Field - Value apijson.Field +// projectNewResponseDeploymentConfigsPreviewHyperdriveBindingJSON contains the +// JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsPreviewHyperdriveBinding] +type projectNewResponseDeploymentConfigsPreviewHyperdriveBindingJSON struct { + ID apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r projectDeploymentConfigsPreviewEnvVarJSON) RawJSON() string { +func (r *ProjectNewResponseDeploymentConfigsPreviewHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsPreviewHyperdriveBindingJSON) RawJSON() string { return r.raw } -func (r *ProjectDeploymentConfigsPreviewEnvVar) UnmarshalJSON(data []byte) (err error) { - *r = ProjectDeploymentConfigsPreviewEnvVar{} - err = apijson.UnmarshalRoot(data, &r.union) - if err != nil { - return err - } - return apijson.Port(r.union, &r) +// KV namespace binding. +type ProjectNewResponseDeploymentConfigsPreviewKVNamespace struct { + // ID of the KV namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectNewResponseDeploymentConfigsPreviewKVNamespaceJSON `json:"-"` } -// AsUnion returns a [ProjectDeploymentConfigsPreviewEnvVarsUnion] interface which -// you can cast to the specific types for more type safety. -// -// Possible runtime types of the union are -// [ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar], -// [ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. -func (r ProjectDeploymentConfigsPreviewEnvVar) AsUnion() ProjectDeploymentConfigsPreviewEnvVarsUnion { - return r.union +// projectNewResponseDeploymentConfigsPreviewKVNamespaceJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsPreviewKVNamespace] +type projectNewResponseDeploymentConfigsPreviewKVNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field } -// A plaintext environment variable. -// -// Union satisfied by [ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] -// or [ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. -type ProjectDeploymentConfigsPreviewEnvVarsUnion interface { - implementsProjectDeploymentConfigsPreviewEnvVar() +func (r *ProjectNewResponseDeploymentConfigsPreviewKVNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func init() { - apijson.RegisterUnion( - reflect.TypeOf((*ProjectDeploymentConfigsPreviewEnvVarsUnion)(nil)).Elem(), - "type", - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar{}), - DiscriminatorValue: "plain_text", - }, - apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar{}), - DiscriminatorValue: "secret_text", - }, - ) +func (r projectNewResponseDeploymentConfigsPreviewKVNamespaceJSON) RawJSON() string { + return r.raw } -// A plaintext environment variable. -type ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar struct { - Type ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType `json:"type,required"` - // Environment variable value. - Value string `json:"value,required"` - JSON projectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +// Limits for Pages Functions. +type ProjectNewResponseDeploymentConfigsPreviewLimits struct { + // CPU time limit in milliseconds. + CPUMs int64 `json:"cpu_ms,required"` + JSON projectNewResponseDeploymentConfigsPreviewLimitsJSON `json:"-"` } -// projectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON contains the JSON -// metadata for the struct -// [ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] -type projectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON struct { - Type apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r projectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { - return r.raw -} - -func (r ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) implementsProjectDeploymentConfigsPreviewEnvVar() { -} - -type ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType string - -const ( - ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType = "plain_text" -) - -func (r ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { - switch r { - case ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText: - return true - } - return false -} - -// An encrypted environment variable. -type ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar struct { - Type ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType `json:"type,required"` - // Secret value. - Value string `json:"value,required"` - JSON projectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON `json:"-"` -} - -// projectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON contains the -// JSON metadata for the struct -// [ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar] -type projectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON struct { - Type apijson.Field - Value apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r projectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { - return r.raw -} - -func (r ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) implementsProjectDeploymentConfigsPreviewEnvVar() { -} - -type ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType string - -const ( - ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType = "secret_text" -) - -func (r ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { - switch r { - case ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText: - return true - } - return false -} - -type ProjectDeploymentConfigsPreviewEnvVarsType string - -const ( - ProjectDeploymentConfigsPreviewEnvVarsTypePlainText ProjectDeploymentConfigsPreviewEnvVarsType = "plain_text" - ProjectDeploymentConfigsPreviewEnvVarsTypeSecretText ProjectDeploymentConfigsPreviewEnvVarsType = "secret_text" -) - -func (r ProjectDeploymentConfigsPreviewEnvVarsType) IsKnown() bool { - switch r { - case ProjectDeploymentConfigsPreviewEnvVarsTypePlainText, ProjectDeploymentConfigsPreviewEnvVarsTypeSecretText: - return true - } - return false -} - -// Hyperdrive binding. -type ProjectDeploymentConfigsPreviewHyperdriveBinding struct { - ID string `json:"id"` - JSON projectDeploymentConfigsPreviewHyperdriveBindingJSON `json:"-"` -} - -// projectDeploymentConfigsPreviewHyperdriveBindingJSON contains the JSON metadata -// for the struct [ProjectDeploymentConfigsPreviewHyperdriveBinding] -type projectDeploymentConfigsPreviewHyperdriveBindingJSON struct { - ID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ProjectDeploymentConfigsPreviewHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r projectDeploymentConfigsPreviewHyperdriveBindingJSON) RawJSON() string { - return r.raw -} - -// KV namespace binding. -type ProjectDeploymentConfigsPreviewKVNamespace struct { - // ID of the KV namespace. - NamespaceID string `json:"namespace_id"` - JSON projectDeploymentConfigsPreviewKVNamespaceJSON `json:"-"` -} - -// projectDeploymentConfigsPreviewKVNamespaceJSON contains the JSON metadata for -// the struct [ProjectDeploymentConfigsPreviewKVNamespace] -type projectDeploymentConfigsPreviewKVNamespaceJSON struct { - NamespaceID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ProjectDeploymentConfigsPreviewKVNamespace) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r projectDeploymentConfigsPreviewKVNamespaceJSON) RawJSON() string { - return r.raw -} - -// Limits for Pages Functions. -type ProjectDeploymentConfigsPreviewLimits struct { - // CPU time limit in milliseconds. - CPUMs int64 `json:"cpu_ms"` - JSON projectDeploymentConfigsPreviewLimitsJSON `json:"-"` -} - -// projectDeploymentConfigsPreviewLimitsJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsPreviewLimits] -type projectDeploymentConfigsPreviewLimitsJSON struct { +// projectNewResponseDeploymentConfigsPreviewLimitsJSON contains the JSON metadata +// for the struct [ProjectNewResponseDeploymentConfigsPreviewLimits] +type projectNewResponseDeploymentConfigsPreviewLimitsJSON struct { CPUMs apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewLimits) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewLimits) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewLimitsJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewLimitsJSON) RawJSON() string { return r.raw } // mTLS binding. -type ProjectDeploymentConfigsPreviewMTLSCertificate struct { - CertificateID string `json:"certificate_id"` - JSON projectDeploymentConfigsPreviewMTLSCertificateJSON `json:"-"` +type ProjectNewResponseDeploymentConfigsPreviewMTLSCertificate struct { + CertificateID string `json:"certificate_id,required"` + JSON projectNewResponseDeploymentConfigsPreviewMTLSCertificateJSON `json:"-"` } -// projectDeploymentConfigsPreviewMTLSCertificateJSON contains the JSON metadata -// for the struct [ProjectDeploymentConfigsPreviewMTLSCertificate] -type projectDeploymentConfigsPreviewMTLSCertificateJSON struct { +// projectNewResponseDeploymentConfigsPreviewMTLSCertificateJSON contains the JSON +// metadata for the struct +// [ProjectNewResponseDeploymentConfigsPreviewMTLSCertificate] +type projectNewResponseDeploymentConfigsPreviewMTLSCertificateJSON struct { CertificateID apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewMTLSCertificate) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewMTLSCertificate) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewMTLSCertificateJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewMTLSCertificateJSON) RawJSON() string { return r.raw } // Placement setting used for Pages Functions. -type ProjectDeploymentConfigsPreviewPlacement struct { +type ProjectNewResponseDeploymentConfigsPreviewPlacement struct { // Placement mode. - Mode string `json:"mode"` - JSON projectDeploymentConfigsPreviewPlacementJSON `json:"-"` + Mode string `json:"mode,required"` + JSON projectNewResponseDeploymentConfigsPreviewPlacementJSON `json:"-"` } -// projectDeploymentConfigsPreviewPlacementJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsPreviewPlacement] -type projectDeploymentConfigsPreviewPlacementJSON struct { +// projectNewResponseDeploymentConfigsPreviewPlacementJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsPreviewPlacement] +type projectNewResponseDeploymentConfigsPreviewPlacementJSON struct { Mode apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewPlacement) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewPlacement) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewPlacementJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewPlacementJSON) RawJSON() string { return r.raw } // Queue Producer binding. -type ProjectDeploymentConfigsPreviewQueueProducer struct { +type ProjectNewResponseDeploymentConfigsPreviewQueueProducer struct { // Name of the Queue. - Name string `json:"name"` - JSON projectDeploymentConfigsPreviewQueueProducerJSON `json:"-"` + Name string `json:"name,required"` + JSON projectNewResponseDeploymentConfigsPreviewQueueProducerJSON `json:"-"` } -// projectDeploymentConfigsPreviewQueueProducerJSON contains the JSON metadata for -// the struct [ProjectDeploymentConfigsPreviewQueueProducer] -type projectDeploymentConfigsPreviewQueueProducerJSON struct { +// projectNewResponseDeploymentConfigsPreviewQueueProducerJSON contains the JSON +// metadata for the struct +// [ProjectNewResponseDeploymentConfigsPreviewQueueProducer] +type projectNewResponseDeploymentConfigsPreviewQueueProducerJSON struct { Name apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewQueueProducer) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewQueueProducer) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewQueueProducerJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewQueueProducerJSON) RawJSON() string { return r.raw } // R2 binding. -type ProjectDeploymentConfigsPreviewR2Bucket struct { - // Jurisdiction of the R2 bucket. - Jurisdiction string `json:"jurisdiction,nullable"` +type ProjectNewResponseDeploymentConfigsPreviewR2Bucket struct { // Name of the R2 bucket. - Name string `json:"name"` - JSON projectDeploymentConfigsPreviewR2BucketJSON `json:"-"` + Name string `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction string `json:"jurisdiction,nullable"` + JSON projectNewResponseDeploymentConfigsPreviewR2BucketJSON `json:"-"` } -// projectDeploymentConfigsPreviewR2BucketJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsPreviewR2Bucket] -type projectDeploymentConfigsPreviewR2BucketJSON struct { - Jurisdiction apijson.Field +// projectNewResponseDeploymentConfigsPreviewR2BucketJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsPreviewR2Bucket] +type projectNewResponseDeploymentConfigsPreviewR2BucketJSON struct { Name apijson.Field + Jurisdiction apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewR2Bucket) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewR2Bucket) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewR2BucketJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewR2BucketJSON) RawJSON() string { return r.raw } // Service binding. -type ProjectDeploymentConfigsPreviewService struct { - // The entrypoint to bind to. - Entrypoint string `json:"entrypoint,nullable"` +type ProjectNewResponseDeploymentConfigsPreviewService struct { // The Service environment. - Environment string `json:"environment"` + Environment string `json:"environment,required"` // The Service name. - Service string `json:"service"` - JSON projectDeploymentConfigsPreviewServiceJSON `json:"-"` + Service string `json:"service,required"` + // The entrypoint to bind to. + Entrypoint string `json:"entrypoint,nullable"` + JSON projectNewResponseDeploymentConfigsPreviewServiceJSON `json:"-"` } -// projectDeploymentConfigsPreviewServiceJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsPreviewService] -type projectDeploymentConfigsPreviewServiceJSON struct { - Entrypoint apijson.Field +// projectNewResponseDeploymentConfigsPreviewServiceJSON contains the JSON metadata +// for the struct [ProjectNewResponseDeploymentConfigsPreviewService] +type projectNewResponseDeploymentConfigsPreviewServiceJSON struct { Environment apijson.Field Service apijson.Field + Entrypoint apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewService) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewService) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewServiceJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewServiceJSON) RawJSON() string { return r.raw } -// The usage model for Pages Functions. -type ProjectDeploymentConfigsPreviewUsageModel string - -const ( - ProjectDeploymentConfigsPreviewUsageModelStandard ProjectDeploymentConfigsPreviewUsageModel = "standard" - ProjectDeploymentConfigsPreviewUsageModelBundled ProjectDeploymentConfigsPreviewUsageModel = "bundled" - ProjectDeploymentConfigsPreviewUsageModelUnbound ProjectDeploymentConfigsPreviewUsageModel = "unbound" -) - -func (r ProjectDeploymentConfigsPreviewUsageModel) IsKnown() bool { - switch r { - case ProjectDeploymentConfigsPreviewUsageModelStandard, ProjectDeploymentConfigsPreviewUsageModelBundled, ProjectDeploymentConfigsPreviewUsageModelUnbound: - return true - } - return false -} - // Vectorize binding. -type ProjectDeploymentConfigsPreviewVectorizeBinding struct { - IndexName string `json:"index_name"` - JSON projectDeploymentConfigsPreviewVectorizeBindingJSON `json:"-"` +type ProjectNewResponseDeploymentConfigsPreviewVectorizeBinding struct { + IndexName string `json:"index_name,required"` + JSON projectNewResponseDeploymentConfigsPreviewVectorizeBindingJSON `json:"-"` } -// projectDeploymentConfigsPreviewVectorizeBindingJSON contains the JSON metadata -// for the struct [ProjectDeploymentConfigsPreviewVectorizeBinding] -type projectDeploymentConfigsPreviewVectorizeBindingJSON struct { +// projectNewResponseDeploymentConfigsPreviewVectorizeBindingJSON contains the JSON +// metadata for the struct +// [ProjectNewResponseDeploymentConfigsPreviewVectorizeBinding] +type projectNewResponseDeploymentConfigsPreviewVectorizeBindingJSON struct { IndexName apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsPreviewVectorizeBinding) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsPreviewVectorizeBinding) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsPreviewVectorizeBindingJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsPreviewVectorizeBindingJSON) RawJSON() string { return r.raw } // Configs for production deploys. -type ProjectDeploymentConfigsProduction struct { - // Constellation bindings used for Pages Functions. - AIBindings map[string]ProjectDeploymentConfigsProductionAIBinding `json:"ai_bindings,nullable"` +type ProjectNewResponseDeploymentConfigsProduction struct { // Whether to always use the latest compatibility date for Pages Functions. - AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date"` - // Analytics Engine bindings used for Pages Functions. - AnalyticsEngineDatasets map[string]ProjectDeploymentConfigsProductionAnalyticsEngineDataset `json:"analytics_engine_datasets,nullable"` - // Browser bindings used for Pages Functions. - Browsers map[string]ProjectDeploymentConfigsProductionBrowser `json:"browsers,nullable"` + AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date,required"` // The major version of the build image to use for Pages Functions. - BuildImageMajorVersion int64 `json:"build_image_major_version"` + BuildImageMajorVersion int64 `json:"build_image_major_version,required"` // Compatibility date used for Pages Functions. - CompatibilityDate string `json:"compatibility_date"` + CompatibilityDate string `json:"compatibility_date,required"` // Compatibility flags used for Pages Functions. - CompatibilityFlags []string `json:"compatibility_flags,nullable"` - // D1 databases used for Pages Functions. - D1Databases map[string]ProjectDeploymentConfigsProductionD1Database `json:"d1_databases,nullable"` - // Durable Object namespaces used for Pages Functions. - DurableObjectNamespaces map[string]ProjectDeploymentConfigsProductionDurableObjectNamespace `json:"durable_object_namespaces,nullable"` + CompatibilityFlags []string `json:"compatibility_flags,required"` // Environment variables used for builds and Pages Functions. - EnvVars map[string]ProjectDeploymentConfigsProductionEnvVar `json:"env_vars,nullable"` + EnvVars map[string]ProjectNewResponseDeploymentConfigsProductionEnvVar `json:"env_vars,required,nullable"` // Whether to fail open when the deployment config cannot be applied. - FailOpen bool `json:"fail_open"` + FailOpen bool `json:"fail_open,required"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel ProjectNewResponseDeploymentConfigsProductionUsageModel `json:"usage_model,required"` + // Constellation bindings used for Pages Functions. + AIBindings map[string]ProjectNewResponseDeploymentConfigsProductionAIBinding `json:"ai_bindings"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets map[string]ProjectNewResponseDeploymentConfigsProductionAnalyticsEngineDataset `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers map[string]ProjectNewResponseDeploymentConfigsProductionBrowser `json:"browsers"` + // D1 databases used for Pages Functions. + D1Databases map[string]ProjectNewResponseDeploymentConfigsProductionD1Database `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces map[string]ProjectNewResponseDeploymentConfigsProductionDurableObjectNamespace `json:"durable_object_namespaces"` // Hyperdrive bindings used for Pages Functions. - HyperdriveBindings map[string]ProjectDeploymentConfigsProductionHyperdriveBinding `json:"hyperdrive_bindings,nullable"` + HyperdriveBindings map[string]ProjectNewResponseDeploymentConfigsProductionHyperdriveBinding `json:"hyperdrive_bindings"` // KV namespaces used for Pages Functions. - KVNamespaces map[string]ProjectDeploymentConfigsProductionKVNamespace `json:"kv_namespaces,nullable"` + KVNamespaces map[string]ProjectNewResponseDeploymentConfigsProductionKVNamespace `json:"kv_namespaces"` // Limits for Pages Functions. - Limits ProjectDeploymentConfigsProductionLimits `json:"limits,nullable"` + Limits ProjectNewResponseDeploymentConfigsProductionLimits `json:"limits"` // mTLS bindings used for Pages Functions. - MTLSCertificates map[string]ProjectDeploymentConfigsProductionMTLSCertificate `json:"mtls_certificates,nullable"` + MTLSCertificates map[string]ProjectNewResponseDeploymentConfigsProductionMTLSCertificate `json:"mtls_certificates"` // Placement setting used for Pages Functions. - Placement ProjectDeploymentConfigsProductionPlacement `json:"placement,nullable"` + Placement ProjectNewResponseDeploymentConfigsProductionPlacement `json:"placement"` // Queue Producer bindings used for Pages Functions. - QueueProducers map[string]ProjectDeploymentConfigsProductionQueueProducer `json:"queue_producers,nullable"` + QueueProducers map[string]ProjectNewResponseDeploymentConfigsProductionQueueProducer `json:"queue_producers"` // R2 buckets used for Pages Functions. - R2Buckets map[string]ProjectDeploymentConfigsProductionR2Bucket `json:"r2_buckets,nullable"` + R2Buckets map[string]ProjectNewResponseDeploymentConfigsProductionR2Bucket `json:"r2_buckets"` // Services used for Pages Functions. - Services map[string]ProjectDeploymentConfigsProductionService `json:"services,nullable"` - // The usage model for Pages Functions. - // - // Deprecated: All new projects now use the Standard usage model. - UsageModel ProjectDeploymentConfigsProductionUsageModel `json:"usage_model"` + Services map[string]ProjectNewResponseDeploymentConfigsProductionService `json:"services"` // Vectorize bindings used for Pages Functions. - VectorizeBindings map[string]ProjectDeploymentConfigsProductionVectorizeBinding `json:"vectorize_bindings,nullable"` + VectorizeBindings map[string]ProjectNewResponseDeploymentConfigsProductionVectorizeBinding `json:"vectorize_bindings"` // Hash of the Wrangler configuration used for the deployment. - WranglerConfigHash string `json:"wrangler_config_hash"` - JSON projectDeploymentConfigsProductionJSON `json:"-"` + WranglerConfigHash string `json:"wrangler_config_hash"` + JSON projectNewResponseDeploymentConfigsProductionJSON `json:"-"` } -// projectDeploymentConfigsProductionJSON contains the JSON metadata for the struct -// [ProjectDeploymentConfigsProduction] -type projectDeploymentConfigsProductionJSON struct { - AIBindings apijson.Field +// projectNewResponseDeploymentConfigsProductionJSON contains the JSON metadata for +// the struct [ProjectNewResponseDeploymentConfigsProduction] +type projectNewResponseDeploymentConfigsProductionJSON struct { AlwaysUseLatestCompatibilityDate apijson.Field - AnalyticsEngineDatasets apijson.Field - Browsers apijson.Field BuildImageMajorVersion apijson.Field CompatibilityDate apijson.Field CompatibilityFlags apijson.Field - D1Databases apijson.Field - DurableObjectNamespaces apijson.Field EnvVars apijson.Field FailOpen apijson.Field + UsageModel apijson.Field + AIBindings apijson.Field + AnalyticsEngineDatasets apijson.Field + Browsers apijson.Field + D1Databases apijson.Field + DurableObjectNamespaces apijson.Field HyperdriveBindings apijson.Field KVNamespaces apijson.Field Limits apijson.Field @@ -1591,158 +1508,44 @@ type projectDeploymentConfigsProductionJSON struct { QueueProducers apijson.Field R2Buckets apijson.Field Services apijson.Field - UsageModel apijson.Field VectorizeBindings apijson.Field WranglerConfigHash apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProduction) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r projectDeploymentConfigsProductionJSON) RawJSON() string { - return r.raw -} - -// AI binding. -type ProjectDeploymentConfigsProductionAIBinding struct { - ProjectID string `json:"project_id"` - JSON projectDeploymentConfigsProductionAIBindingJSON `json:"-"` -} - -// projectDeploymentConfigsProductionAIBindingJSON contains the JSON metadata for -// the struct [ProjectDeploymentConfigsProductionAIBinding] -type projectDeploymentConfigsProductionAIBindingJSON struct { - ProjectID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ProjectDeploymentConfigsProductionAIBinding) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r projectDeploymentConfigsProductionAIBindingJSON) RawJSON() string { - return r.raw -} - -// Analytics Engine binding. -type ProjectDeploymentConfigsProductionAnalyticsEngineDataset struct { - // Name of the dataset. - Dataset string `json:"dataset"` - JSON projectDeploymentConfigsProductionAnalyticsEngineDatasetJSON `json:"-"` -} - -// projectDeploymentConfigsProductionAnalyticsEngineDatasetJSON contains the JSON -// metadata for the struct -// [ProjectDeploymentConfigsProductionAnalyticsEngineDataset] -type projectDeploymentConfigsProductionAnalyticsEngineDatasetJSON struct { - Dataset apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ProjectDeploymentConfigsProductionAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r projectDeploymentConfigsProductionAnalyticsEngineDatasetJSON) RawJSON() string { - return r.raw -} - -// Browser binding. -type ProjectDeploymentConfigsProductionBrowser struct { - JSON projectDeploymentConfigsProductionBrowserJSON `json:"-"` -} - -// projectDeploymentConfigsProductionBrowserJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsProductionBrowser] -type projectDeploymentConfigsProductionBrowserJSON struct { - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ProjectDeploymentConfigsProductionBrowser) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r projectDeploymentConfigsProductionBrowserJSON) RawJSON() string { - return r.raw -} - -// D1 binding. -type ProjectDeploymentConfigsProductionD1Database struct { - // UUID of the D1 database. - ID string `json:"id"` - JSON projectDeploymentConfigsProductionD1DatabaseJSON `json:"-"` -} - -// projectDeploymentConfigsProductionD1DatabaseJSON contains the JSON metadata for -// the struct [ProjectDeploymentConfigsProductionD1Database] -type projectDeploymentConfigsProductionD1DatabaseJSON struct { - ID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ProjectDeploymentConfigsProductionD1Database) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r projectDeploymentConfigsProductionD1DatabaseJSON) RawJSON() string { - return r.raw -} - -// Durable Object binding. -type ProjectDeploymentConfigsProductionDurableObjectNamespace struct { - // ID of the Durable Object namespace. - NamespaceID string `json:"namespace_id"` - JSON projectDeploymentConfigsProductionDurableObjectNamespaceJSON `json:"-"` -} - -// projectDeploymentConfigsProductionDurableObjectNamespaceJSON contains the JSON -// metadata for the struct -// [ProjectDeploymentConfigsProductionDurableObjectNamespace] -type projectDeploymentConfigsProductionDurableObjectNamespaceJSON struct { - NamespaceID apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *ProjectDeploymentConfigsProductionDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsProduction) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionDurableObjectNamespaceJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsProductionJSON) RawJSON() string { return r.raw } // A plaintext environment variable. -type ProjectDeploymentConfigsProductionEnvVar struct { - Type ProjectDeploymentConfigsProductionEnvVarsType `json:"type,required"` +type ProjectNewResponseDeploymentConfigsProductionEnvVar struct { + Type ProjectNewResponseDeploymentConfigsProductionEnvVarsType `json:"type,required"` // Environment variable value. - Value string `json:"value,required"` - JSON projectDeploymentConfigsProductionEnvVarJSON `json:"-"` - union ProjectDeploymentConfigsProductionEnvVarsUnion + Value string `json:"value,required"` + JSON projectNewResponseDeploymentConfigsProductionEnvVarJSON `json:"-"` + union ProjectNewResponseDeploymentConfigsProductionEnvVarsUnion } -// projectDeploymentConfigsProductionEnvVarJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsProductionEnvVar] -type projectDeploymentConfigsProductionEnvVarJSON struct { +// projectNewResponseDeploymentConfigsProductionEnvVarJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsProductionEnvVar] +type projectNewResponseDeploymentConfigsProductionEnvVarJSON struct { Type apijson.Field Value apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r projectDeploymentConfigsProductionEnvVarJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsProductionEnvVarJSON) RawJSON() string { return r.raw } -func (r *ProjectDeploymentConfigsProductionEnvVar) UnmarshalJSON(data []byte) (err error) { - *r = ProjectDeploymentConfigsProductionEnvVar{} +func (r *ProjectNewResponseDeploymentConfigsProductionEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectNewResponseDeploymentConfigsProductionEnvVar{} err = apijson.UnmarshalRoot(data, &r.union) if err != nil { return err @@ -1750,510 +1553,9609 @@ func (r *ProjectDeploymentConfigsProductionEnvVar) UnmarshalJSON(data []byte) (e return apijson.Port(r.union, &r) } -// AsUnion returns a [ProjectDeploymentConfigsProductionEnvVarsUnion] interface -// which you can cast to the specific types for more type safety. +// AsUnion returns a [ProjectNewResponseDeploymentConfigsProductionEnvVarsUnion] +// interface which you can cast to the specific types for more type safety. // // Possible runtime types of the union are -// [ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar], -// [ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. -func (r ProjectDeploymentConfigsProductionEnvVar) AsUnion() ProjectDeploymentConfigsProductionEnvVarsUnion { +// [ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar], +// [ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. +func (r ProjectNewResponseDeploymentConfigsProductionEnvVar) AsUnion() ProjectNewResponseDeploymentConfigsProductionEnvVarsUnion { return r.union } // A plaintext environment variable. // // Union satisfied by -// [ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] or -// [ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. -type ProjectDeploymentConfigsProductionEnvVarsUnion interface { - implementsProjectDeploymentConfigsProductionEnvVar() +// [ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] or +// [ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. +type ProjectNewResponseDeploymentConfigsProductionEnvVarsUnion interface { + implementsProjectNewResponseDeploymentConfigsProductionEnvVar() } func init() { apijson.RegisterUnion( - reflect.TypeOf((*ProjectDeploymentConfigsProductionEnvVarsUnion)(nil)).Elem(), + reflect.TypeOf((*ProjectNewResponseDeploymentConfigsProductionEnvVarsUnion)(nil)).Elem(), "type", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar{}), + Type: reflect.TypeOf(ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar{}), DiscriminatorValue: "plain_text", }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar{}), + Type: reflect.TypeOf(ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar{}), DiscriminatorValue: "secret_text", }, ) } // A plaintext environment variable. -type ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar struct { - Type ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType `json:"type,required"` +type ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar struct { + Type ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType `json:"type,required"` // Environment variable value. - Value string `json:"value,required"` - JSON projectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON `json:"-"` + Value string `json:"value,required"` + JSON projectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON `json:"-"` } -// projectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON contains the -// JSON metadata for the struct -// [ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] -type projectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON struct { +// projectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] +type projectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON struct { Type apijson.Field Value apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { return r.raw } -func (r ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) implementsProjectDeploymentConfigsProductionEnvVar() { +func (r ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) implementsProjectNewResponseDeploymentConfigsProductionEnvVar() { } -type ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType string +type ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType string const ( - ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType = "plain_text" + ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType = "plain_text" ) -func (r ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { +func (r ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { switch r { - case ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText: + case ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText: return true } return false } // An encrypted environment variable. -type ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar struct { - Type ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType `json:"type,required"` +type ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar struct { + Type ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType `json:"type,required"` // Secret value. - Value string `json:"value,required"` - JSON projectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON `json:"-"` + Value string `json:"value,required"` + JSON projectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON `json:"-"` } -// projectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON contains the -// JSON metadata for the struct -// [ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar] -type projectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON struct { +// projectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar] +type projectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON struct { Type apijson.Field Value apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { +func (r projectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { return r.raw } -func (r ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) implementsProjectDeploymentConfigsProductionEnvVar() { +func (r ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) implementsProjectNewResponseDeploymentConfigsProductionEnvVar() { +} + +type ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectNewResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectNewResponseDeploymentConfigsProductionEnvVarsType string + +const ( + ProjectNewResponseDeploymentConfigsProductionEnvVarsTypePlainText ProjectNewResponseDeploymentConfigsProductionEnvVarsType = "plain_text" + ProjectNewResponseDeploymentConfigsProductionEnvVarsTypeSecretText ProjectNewResponseDeploymentConfigsProductionEnvVarsType = "secret_text" +) + +func (r ProjectNewResponseDeploymentConfigsProductionEnvVarsType) IsKnown() bool { + switch r { + case ProjectNewResponseDeploymentConfigsProductionEnvVarsTypePlainText, ProjectNewResponseDeploymentConfigsProductionEnvVarsTypeSecretText: + return true + } + return false +} + +// The usage model for Pages Functions. +type ProjectNewResponseDeploymentConfigsProductionUsageModel string + +const ( + ProjectNewResponseDeploymentConfigsProductionUsageModelStandard ProjectNewResponseDeploymentConfigsProductionUsageModel = "standard" + ProjectNewResponseDeploymentConfigsProductionUsageModelBundled ProjectNewResponseDeploymentConfigsProductionUsageModel = "bundled" + ProjectNewResponseDeploymentConfigsProductionUsageModelUnbound ProjectNewResponseDeploymentConfigsProductionUsageModel = "unbound" +) + +func (r ProjectNewResponseDeploymentConfigsProductionUsageModel) IsKnown() bool { + switch r { + case ProjectNewResponseDeploymentConfigsProductionUsageModelStandard, ProjectNewResponseDeploymentConfigsProductionUsageModelBundled, ProjectNewResponseDeploymentConfigsProductionUsageModelUnbound: + return true + } + return false +} + +// AI binding. +type ProjectNewResponseDeploymentConfigsProductionAIBinding struct { + ProjectID string `json:"project_id,required"` + JSON projectNewResponseDeploymentConfigsProductionAIBindingJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionAIBindingJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsProductionAIBinding] +type projectNewResponseDeploymentConfigsProductionAIBindingJSON struct { + ProjectID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionAIBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionAIBindingJSON) RawJSON() string { + return r.raw +} + +// Analytics Engine binding. +type ProjectNewResponseDeploymentConfigsProductionAnalyticsEngineDataset struct { + // Name of the dataset. + Dataset string `json:"dataset,required"` + JSON projectNewResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON contains +// the JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionAnalyticsEngineDataset] +type projectNewResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON struct { + Dataset apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON) RawJSON() string { + return r.raw +} + +// Browser binding. +type ProjectNewResponseDeploymentConfigsProductionBrowser struct { + JSON projectNewResponseDeploymentConfigsProductionBrowserJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionBrowserJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsProductionBrowser] +type projectNewResponseDeploymentConfigsProductionBrowserJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionBrowser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionBrowserJSON) RawJSON() string { + return r.raw +} + +// D1 binding. +type ProjectNewResponseDeploymentConfigsProductionD1Database struct { + // UUID of the D1 database. + ID string `json:"id,required"` + JSON projectNewResponseDeploymentConfigsProductionD1DatabaseJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionD1DatabaseJSON contains the JSON +// metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionD1Database] +type projectNewResponseDeploymentConfigsProductionD1DatabaseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionD1Database) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionD1DatabaseJSON) RawJSON() string { + return r.raw +} + +// Durable Object binding. +type ProjectNewResponseDeploymentConfigsProductionDurableObjectNamespace struct { + // ID of the Durable Object namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectNewResponseDeploymentConfigsProductionDurableObjectNamespaceJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionDurableObjectNamespaceJSON contains +// the JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionDurableObjectNamespace] +type projectNewResponseDeploymentConfigsProductionDurableObjectNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionDurableObjectNamespaceJSON) RawJSON() string { + return r.raw +} + +// Hyperdrive binding. +type ProjectNewResponseDeploymentConfigsProductionHyperdriveBinding struct { + ID string `json:"id,required"` + JSON projectNewResponseDeploymentConfigsProductionHyperdriveBindingJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionHyperdriveBindingJSON contains the +// JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionHyperdriveBinding] +type projectNewResponseDeploymentConfigsProductionHyperdriveBindingJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionHyperdriveBindingJSON) RawJSON() string { + return r.raw +} + +// KV namespace binding. +type ProjectNewResponseDeploymentConfigsProductionKVNamespace struct { + // ID of the KV namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectNewResponseDeploymentConfigsProductionKVNamespaceJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionKVNamespaceJSON contains the JSON +// metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionKVNamespace] +type projectNewResponseDeploymentConfigsProductionKVNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionKVNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionKVNamespaceJSON) RawJSON() string { + return r.raw +} + +// Limits for Pages Functions. +type ProjectNewResponseDeploymentConfigsProductionLimits struct { + // CPU time limit in milliseconds. + CPUMs int64 `json:"cpu_ms,required"` + JSON projectNewResponseDeploymentConfigsProductionLimitsJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionLimitsJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsProductionLimits] +type projectNewResponseDeploymentConfigsProductionLimitsJSON struct { + CPUMs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionLimits) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionLimitsJSON) RawJSON() string { + return r.raw +} + +// mTLS binding. +type ProjectNewResponseDeploymentConfigsProductionMTLSCertificate struct { + CertificateID string `json:"certificate_id,required"` + JSON projectNewResponseDeploymentConfigsProductionMTLSCertificateJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionMTLSCertificateJSON contains the +// JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionMTLSCertificate] +type projectNewResponseDeploymentConfigsProductionMTLSCertificateJSON struct { + CertificateID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionMTLSCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionMTLSCertificateJSON) RawJSON() string { + return r.raw +} + +// Placement setting used for Pages Functions. +type ProjectNewResponseDeploymentConfigsProductionPlacement struct { + // Placement mode. + Mode string `json:"mode,required"` + JSON projectNewResponseDeploymentConfigsProductionPlacementJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionPlacementJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsProductionPlacement] +type projectNewResponseDeploymentConfigsProductionPlacementJSON struct { + Mode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionPlacement) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionPlacementJSON) RawJSON() string { + return r.raw +} + +// Queue Producer binding. +type ProjectNewResponseDeploymentConfigsProductionQueueProducer struct { + // Name of the Queue. + Name string `json:"name,required"` + JSON projectNewResponseDeploymentConfigsProductionQueueProducerJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionQueueProducerJSON contains the JSON +// metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionQueueProducer] +type projectNewResponseDeploymentConfigsProductionQueueProducerJSON struct { + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionQueueProducer) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionQueueProducerJSON) RawJSON() string { + return r.raw +} + +// R2 binding. +type ProjectNewResponseDeploymentConfigsProductionR2Bucket struct { + // Name of the R2 bucket. + Name string `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction string `json:"jurisdiction,nullable"` + JSON projectNewResponseDeploymentConfigsProductionR2BucketJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionR2BucketJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsProductionR2Bucket] +type projectNewResponseDeploymentConfigsProductionR2BucketJSON struct { + Name apijson.Field + Jurisdiction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionR2Bucket) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionR2BucketJSON) RawJSON() string { + return r.raw +} + +// Service binding. +type ProjectNewResponseDeploymentConfigsProductionService struct { + // The Service environment. + Environment string `json:"environment,required"` + // The Service name. + Service string `json:"service,required"` + // The entrypoint to bind to. + Entrypoint string `json:"entrypoint,nullable"` + JSON projectNewResponseDeploymentConfigsProductionServiceJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionServiceJSON contains the JSON +// metadata for the struct [ProjectNewResponseDeploymentConfigsProductionService] +type projectNewResponseDeploymentConfigsProductionServiceJSON struct { + Environment apijson.Field + Service apijson.Field + Entrypoint apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionService) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionServiceJSON) RawJSON() string { + return r.raw +} + +// Vectorize binding. +type ProjectNewResponseDeploymentConfigsProductionVectorizeBinding struct { + IndexName string `json:"index_name,required"` + JSON projectNewResponseDeploymentConfigsProductionVectorizeBindingJSON `json:"-"` +} + +// projectNewResponseDeploymentConfigsProductionVectorizeBindingJSON contains the +// JSON metadata for the struct +// [ProjectNewResponseDeploymentConfigsProductionVectorizeBinding] +type projectNewResponseDeploymentConfigsProductionVectorizeBindingJSON struct { + IndexName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseDeploymentConfigsProductionVectorizeBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseDeploymentConfigsProductionVectorizeBindingJSON) RawJSON() string { + return r.raw +} + +// Most recent deployment of the project. +type ProjectNewResponseLatestDeployment struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectNewResponseLatestDeploymentBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectNewResponseLatestDeploymentDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectNewResponseLatestDeploymentEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectNewResponseLatestDeploymentEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectNewResponseLatestDeploymentSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectNewResponseLatestDeploymentJSON `json:"-"` +} + +// projectNewResponseLatestDeploymentJSON contains the JSON metadata for the struct +// [ProjectNewResponseLatestDeployment] +type projectNewResponseLatestDeploymentJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseLatestDeployment) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseLatestDeploymentJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectNewResponseLatestDeploymentBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectNewResponseLatestDeploymentBuildConfigJSON `json:"-"` +} + +// projectNewResponseLatestDeploymentBuildConfigJSON contains the JSON metadata for +// the struct [ProjectNewResponseLatestDeploymentBuildConfig] +type projectNewResponseLatestDeploymentBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseLatestDeploymentBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseLatestDeploymentBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectNewResponseLatestDeploymentDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectNewResponseLatestDeploymentDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectNewResponseLatestDeploymentDeploymentTriggerType `json:"type,required"` + JSON projectNewResponseLatestDeploymentDeploymentTriggerJSON `json:"-"` +} + +// projectNewResponseLatestDeploymentDeploymentTriggerJSON contains the JSON +// metadata for the struct [ProjectNewResponseLatestDeploymentDeploymentTrigger] +type projectNewResponseLatestDeploymentDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseLatestDeploymentDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseLatestDeploymentDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectNewResponseLatestDeploymentDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectNewResponseLatestDeploymentDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectNewResponseLatestDeploymentDeploymentTriggerMetadataJSON contains the +// JSON metadata for the struct +// [ProjectNewResponseLatestDeploymentDeploymentTriggerMetadata] +type projectNewResponseLatestDeploymentDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseLatestDeploymentDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseLatestDeploymentDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectNewResponseLatestDeploymentDeploymentTriggerType string + +const ( + ProjectNewResponseLatestDeploymentDeploymentTriggerTypeGitHubPush ProjectNewResponseLatestDeploymentDeploymentTriggerType = "github:push" + ProjectNewResponseLatestDeploymentDeploymentTriggerTypeADHoc ProjectNewResponseLatestDeploymentDeploymentTriggerType = "ad_hoc" + ProjectNewResponseLatestDeploymentDeploymentTriggerTypeDeployHook ProjectNewResponseLatestDeploymentDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectNewResponseLatestDeploymentDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectNewResponseLatestDeploymentDeploymentTriggerTypeGitHubPush, ProjectNewResponseLatestDeploymentDeploymentTriggerTypeADHoc, ProjectNewResponseLatestDeploymentDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectNewResponseLatestDeploymentEnvVar struct { + Type ProjectNewResponseLatestDeploymentEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectNewResponseLatestDeploymentEnvVarJSON `json:"-"` + union ProjectNewResponseLatestDeploymentEnvVarsUnion +} + +// projectNewResponseLatestDeploymentEnvVarJSON contains the JSON metadata for the +// struct [ProjectNewResponseLatestDeploymentEnvVar] +type projectNewResponseLatestDeploymentEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectNewResponseLatestDeploymentEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectNewResponseLatestDeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectNewResponseLatestDeploymentEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectNewResponseLatestDeploymentEnvVarsUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar], +// [ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar]. +func (r ProjectNewResponseLatestDeploymentEnvVar) AsUnion() ProjectNewResponseLatestDeploymentEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar] or +// [ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar]. +type ProjectNewResponseLatestDeploymentEnvVarsUnion interface { + implementsProjectNewResponseLatestDeploymentEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectNewResponseLatestDeploymentEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar struct { + Type ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar] +type projectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar) implementsProjectNewResponseLatestDeploymentEnvVar() { +} + +type ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectNewResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar struct { + Type ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar] +type projectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar) implementsProjectNewResponseLatestDeploymentEnvVar() { +} + +type ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectNewResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectNewResponseLatestDeploymentEnvVarsType string + +const ( + ProjectNewResponseLatestDeploymentEnvVarsTypePlainText ProjectNewResponseLatestDeploymentEnvVarsType = "plain_text" + ProjectNewResponseLatestDeploymentEnvVarsTypeSecretText ProjectNewResponseLatestDeploymentEnvVarsType = "secret_text" +) + +func (r ProjectNewResponseLatestDeploymentEnvVarsType) IsKnown() bool { + switch r { + case ProjectNewResponseLatestDeploymentEnvVarsTypePlainText, ProjectNewResponseLatestDeploymentEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectNewResponseLatestDeploymentEnvironment string + +const ( + ProjectNewResponseLatestDeploymentEnvironmentPreview ProjectNewResponseLatestDeploymentEnvironment = "preview" + ProjectNewResponseLatestDeploymentEnvironmentProduction ProjectNewResponseLatestDeploymentEnvironment = "production" +) + +func (r ProjectNewResponseLatestDeploymentEnvironment) IsKnown() bool { + switch r { + case ProjectNewResponseLatestDeploymentEnvironmentPreview, ProjectNewResponseLatestDeploymentEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectNewResponseLatestDeploymentSource struct { + Config ProjectNewResponseLatestDeploymentSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectNewResponseLatestDeploymentSourceType `json:"type,required"` + JSON projectNewResponseLatestDeploymentSourceJSON `json:"-"` +} + +// projectNewResponseLatestDeploymentSourceJSON contains the JSON metadata for the +// struct [ProjectNewResponseLatestDeploymentSource] +type projectNewResponseLatestDeploymentSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseLatestDeploymentSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseLatestDeploymentSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectNewResponseLatestDeploymentSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectNewResponseLatestDeploymentSourceConfigJSON `json:"-"` +} + +// projectNewResponseLatestDeploymentSourceConfigJSON contains the JSON metadata +// for the struct [ProjectNewResponseLatestDeploymentSourceConfig] +type projectNewResponseLatestDeploymentSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseLatestDeploymentSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseLatestDeploymentSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSetting string + +const ( + ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSettingAll ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "all" + ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSettingNone ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "none" + ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSettingCustom ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSettingAll, ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSettingNone, ProjectNewResponseLatestDeploymentSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectNewResponseLatestDeploymentSourceType string + +const ( + ProjectNewResponseLatestDeploymentSourceTypeGitHub ProjectNewResponseLatestDeploymentSourceType = "github" + ProjectNewResponseLatestDeploymentSourceTypeGitlab ProjectNewResponseLatestDeploymentSourceType = "gitlab" +) + +func (r ProjectNewResponseLatestDeploymentSourceType) IsKnown() bool { + switch r { + case ProjectNewResponseLatestDeploymentSourceTypeGitHub, ProjectNewResponseLatestDeploymentSourceTypeGitlab: + return true + } + return false +} + +// Configs for the project build process. +type ProjectNewResponseBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectNewResponseBuildConfigJSON `json:"-"` +} + +// projectNewResponseBuildConfigJSON contains the JSON metadata for the struct +// [ProjectNewResponseBuildConfig] +type projectNewResponseBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Configs for the project source control. +type ProjectNewResponseSource struct { + Config ProjectNewResponseSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectNewResponseSourceType `json:"type,required"` + JSON projectNewResponseSourceJSON `json:"-"` +} + +// projectNewResponseSourceJSON contains the JSON metadata for the struct +// [ProjectNewResponseSource] +type projectNewResponseSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectNewResponseSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectNewResponseSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectNewResponseSourceConfigJSON `json:"-"` +} + +// projectNewResponseSourceConfigJSON contains the JSON metadata for the struct +// [ProjectNewResponseSourceConfig] +type projectNewResponseSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectNewResponseSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectNewResponseSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectNewResponseSourceConfigPreviewDeploymentSetting string + +const ( + ProjectNewResponseSourceConfigPreviewDeploymentSettingAll ProjectNewResponseSourceConfigPreviewDeploymentSetting = "all" + ProjectNewResponseSourceConfigPreviewDeploymentSettingNone ProjectNewResponseSourceConfigPreviewDeploymentSetting = "none" + ProjectNewResponseSourceConfigPreviewDeploymentSettingCustom ProjectNewResponseSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectNewResponseSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectNewResponseSourceConfigPreviewDeploymentSettingAll, ProjectNewResponseSourceConfigPreviewDeploymentSettingNone, ProjectNewResponseSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectNewResponseSourceType string + +const ( + ProjectNewResponseSourceTypeGitHub ProjectNewResponseSourceType = "github" + ProjectNewResponseSourceTypeGitlab ProjectNewResponseSourceType = "gitlab" +) + +func (r ProjectNewResponseSourceType) IsKnown() bool { + switch r { + case ProjectNewResponseSourceTypeGitHub, ProjectNewResponseSourceTypeGitlab: + return true + } + return false +} + +type ProjectListResponse struct { + // ID of the project. + ID string `json:"id,required"` + // Most recent production deployment of the project. + CanonicalDeployment ProjectListResponseCanonicalDeployment `json:"canonical_deployment,required,nullable"` + // When the project was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Configs for deployments in a project. + DeploymentConfigs ProjectListResponseDeploymentConfigs `json:"deployment_configs,required"` + // Framework the project is using. + Framework string `json:"framework,required"` + // Version of the framework the project is using. + FrameworkVersion string `json:"framework_version,required"` + // Most recent deployment of the project. + LatestDeployment ProjectListResponseLatestDeployment `json:"latest_deployment,required,nullable"` + // Name of the project. + Name string `json:"name,required"` + // Name of the preview script. + PreviewScriptName string `json:"preview_script_name,required"` + // Production branch of the project. Used to identify production deployments. + ProductionBranch string `json:"production_branch,required"` + // Name of the production script. + ProductionScriptName string `json:"production_script_name,required"` + // Whether the project uses functions. + UsesFunctions bool `json:"uses_functions,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectListResponseBuildConfig `json:"build_config"` + // A list of associated custom domains for the project. + Domains []string `json:"domains"` + // Configs for the project source control. + Source ProjectListResponseSource `json:"source"` + // The Cloudflare subdomain associated with the project. + Subdomain string `json:"subdomain"` + JSON projectListResponseJSON `json:"-"` +} + +// projectListResponseJSON contains the JSON metadata for the struct +// [ProjectListResponse] +type projectListResponseJSON struct { + ID apijson.Field + CanonicalDeployment apijson.Field + CreatedOn apijson.Field + DeploymentConfigs apijson.Field + Framework apijson.Field + FrameworkVersion apijson.Field + LatestDeployment apijson.Field + Name apijson.Field + PreviewScriptName apijson.Field + ProductionBranch apijson.Field + ProductionScriptName apijson.Field + UsesFunctions apijson.Field + BuildConfig apijson.Field + Domains apijson.Field + Source apijson.Field + Subdomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseJSON) RawJSON() string { + return r.raw +} + +// Most recent production deployment of the project. +type ProjectListResponseCanonicalDeployment struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectListResponseCanonicalDeploymentBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectListResponseCanonicalDeploymentDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectListResponseCanonicalDeploymentEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectListResponseCanonicalDeploymentEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectListResponseCanonicalDeploymentSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectListResponseCanonicalDeploymentJSON `json:"-"` +} + +// projectListResponseCanonicalDeploymentJSON contains the JSON metadata for the +// struct [ProjectListResponseCanonicalDeployment] +type projectListResponseCanonicalDeploymentJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseCanonicalDeployment) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseCanonicalDeploymentJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectListResponseCanonicalDeploymentBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectListResponseCanonicalDeploymentBuildConfigJSON `json:"-"` +} + +// projectListResponseCanonicalDeploymentBuildConfigJSON contains the JSON metadata +// for the struct [ProjectListResponseCanonicalDeploymentBuildConfig] +type projectListResponseCanonicalDeploymentBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseCanonicalDeploymentBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseCanonicalDeploymentBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectListResponseCanonicalDeploymentDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectListResponseCanonicalDeploymentDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectListResponseCanonicalDeploymentDeploymentTriggerType `json:"type,required"` + JSON projectListResponseCanonicalDeploymentDeploymentTriggerJSON `json:"-"` +} + +// projectListResponseCanonicalDeploymentDeploymentTriggerJSON contains the JSON +// metadata for the struct +// [ProjectListResponseCanonicalDeploymentDeploymentTrigger] +type projectListResponseCanonicalDeploymentDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseCanonicalDeploymentDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseCanonicalDeploymentDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectListResponseCanonicalDeploymentDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectListResponseCanonicalDeploymentDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectListResponseCanonicalDeploymentDeploymentTriggerMetadataJSON contains the +// JSON metadata for the struct +// [ProjectListResponseCanonicalDeploymentDeploymentTriggerMetadata] +type projectListResponseCanonicalDeploymentDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseCanonicalDeploymentDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseCanonicalDeploymentDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectListResponseCanonicalDeploymentDeploymentTriggerType string + +const ( + ProjectListResponseCanonicalDeploymentDeploymentTriggerTypeGitHubPush ProjectListResponseCanonicalDeploymentDeploymentTriggerType = "github:push" + ProjectListResponseCanonicalDeploymentDeploymentTriggerTypeADHoc ProjectListResponseCanonicalDeploymentDeploymentTriggerType = "ad_hoc" + ProjectListResponseCanonicalDeploymentDeploymentTriggerTypeDeployHook ProjectListResponseCanonicalDeploymentDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectListResponseCanonicalDeploymentDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectListResponseCanonicalDeploymentDeploymentTriggerTypeGitHubPush, ProjectListResponseCanonicalDeploymentDeploymentTriggerTypeADHoc, ProjectListResponseCanonicalDeploymentDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectListResponseCanonicalDeploymentEnvVar struct { + Type ProjectListResponseCanonicalDeploymentEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectListResponseCanonicalDeploymentEnvVarJSON `json:"-"` + union ProjectListResponseCanonicalDeploymentEnvVarsUnion +} + +// projectListResponseCanonicalDeploymentEnvVarJSON contains the JSON metadata for +// the struct [ProjectListResponseCanonicalDeploymentEnvVar] +type projectListResponseCanonicalDeploymentEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectListResponseCanonicalDeploymentEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectListResponseCanonicalDeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectListResponseCanonicalDeploymentEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectListResponseCanonicalDeploymentEnvVarsUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar], +// [ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar]. +func (r ProjectListResponseCanonicalDeploymentEnvVar) AsUnion() ProjectListResponseCanonicalDeploymentEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar] or +// [ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar]. +type ProjectListResponseCanonicalDeploymentEnvVarsUnion interface { + implementsProjectListResponseCanonicalDeploymentEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectListResponseCanonicalDeploymentEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar struct { + Type ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON contains +// the JSON metadata for the struct +// [ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar] +type projectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar) implementsProjectListResponseCanonicalDeploymentEnvVar() { +} + +type ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectListResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar struct { + Type ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON contains +// the JSON metadata for the struct +// [ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar] +type projectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar) implementsProjectListResponseCanonicalDeploymentEnvVar() { +} + +type ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectListResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectListResponseCanonicalDeploymentEnvVarsType string + +const ( + ProjectListResponseCanonicalDeploymentEnvVarsTypePlainText ProjectListResponseCanonicalDeploymentEnvVarsType = "plain_text" + ProjectListResponseCanonicalDeploymentEnvVarsTypeSecretText ProjectListResponseCanonicalDeploymentEnvVarsType = "secret_text" +) + +func (r ProjectListResponseCanonicalDeploymentEnvVarsType) IsKnown() bool { + switch r { + case ProjectListResponseCanonicalDeploymentEnvVarsTypePlainText, ProjectListResponseCanonicalDeploymentEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectListResponseCanonicalDeploymentEnvironment string + +const ( + ProjectListResponseCanonicalDeploymentEnvironmentPreview ProjectListResponseCanonicalDeploymentEnvironment = "preview" + ProjectListResponseCanonicalDeploymentEnvironmentProduction ProjectListResponseCanonicalDeploymentEnvironment = "production" +) + +func (r ProjectListResponseCanonicalDeploymentEnvironment) IsKnown() bool { + switch r { + case ProjectListResponseCanonicalDeploymentEnvironmentPreview, ProjectListResponseCanonicalDeploymentEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectListResponseCanonicalDeploymentSource struct { + Config ProjectListResponseCanonicalDeploymentSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectListResponseCanonicalDeploymentSourceType `json:"type,required"` + JSON projectListResponseCanonicalDeploymentSourceJSON `json:"-"` +} + +// projectListResponseCanonicalDeploymentSourceJSON contains the JSON metadata for +// the struct [ProjectListResponseCanonicalDeploymentSource] +type projectListResponseCanonicalDeploymentSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseCanonicalDeploymentSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseCanonicalDeploymentSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectListResponseCanonicalDeploymentSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectListResponseCanonicalDeploymentSourceConfigJSON `json:"-"` +} + +// projectListResponseCanonicalDeploymentSourceConfigJSON contains the JSON +// metadata for the struct [ProjectListResponseCanonicalDeploymentSourceConfig] +type projectListResponseCanonicalDeploymentSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseCanonicalDeploymentSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseCanonicalDeploymentSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting string + +const ( + ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingAll ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "all" + ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingNone ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "none" + ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingCustom ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingAll, ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingNone, ProjectListResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectListResponseCanonicalDeploymentSourceType string + +const ( + ProjectListResponseCanonicalDeploymentSourceTypeGitHub ProjectListResponseCanonicalDeploymentSourceType = "github" + ProjectListResponseCanonicalDeploymentSourceTypeGitlab ProjectListResponseCanonicalDeploymentSourceType = "gitlab" +) + +func (r ProjectListResponseCanonicalDeploymentSourceType) IsKnown() bool { + switch r { + case ProjectListResponseCanonicalDeploymentSourceTypeGitHub, ProjectListResponseCanonicalDeploymentSourceTypeGitlab: + return true + } + return false +} + +// Configs for deployments in a project. +type ProjectListResponseDeploymentConfigs struct { + // Configs for preview deploys. + Preview ProjectListResponseDeploymentConfigsPreview `json:"preview,required"` + // Configs for production deploys. + Production ProjectListResponseDeploymentConfigsProduction `json:"production,required"` + JSON projectListResponseDeploymentConfigsJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsJSON contains the JSON metadata for the +// struct [ProjectListResponseDeploymentConfigs] +type projectListResponseDeploymentConfigsJSON struct { + Preview apijson.Field + Production apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigs) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsJSON) RawJSON() string { + return r.raw +} + +// Configs for preview deploys. +type ProjectListResponseDeploymentConfigsPreview struct { + // Whether to always use the latest compatibility date for Pages Functions. + AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date,required"` + // The major version of the build image to use for Pages Functions. + BuildImageMajorVersion int64 `json:"build_image_major_version,required"` + // Compatibility date used for Pages Functions. + CompatibilityDate string `json:"compatibility_date,required"` + // Compatibility flags used for Pages Functions. + CompatibilityFlags []string `json:"compatibility_flags,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectListResponseDeploymentConfigsPreviewEnvVar `json:"env_vars,required,nullable"` + // Whether to fail open when the deployment config cannot be applied. + FailOpen bool `json:"fail_open,required"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel ProjectListResponseDeploymentConfigsPreviewUsageModel `json:"usage_model,required"` + // Constellation bindings used for Pages Functions. + AIBindings map[string]ProjectListResponseDeploymentConfigsPreviewAIBinding `json:"ai_bindings"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets map[string]ProjectListResponseDeploymentConfigsPreviewAnalyticsEngineDataset `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers map[string]ProjectListResponseDeploymentConfigsPreviewBrowser `json:"browsers"` + // D1 databases used for Pages Functions. + D1Databases map[string]ProjectListResponseDeploymentConfigsPreviewD1Database `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces map[string]ProjectListResponseDeploymentConfigsPreviewDurableObjectNamespace `json:"durable_object_namespaces"` + // Hyperdrive bindings used for Pages Functions. + HyperdriveBindings map[string]ProjectListResponseDeploymentConfigsPreviewHyperdriveBinding `json:"hyperdrive_bindings"` + // KV namespaces used for Pages Functions. + KVNamespaces map[string]ProjectListResponseDeploymentConfigsPreviewKVNamespace `json:"kv_namespaces"` + // Limits for Pages Functions. + Limits ProjectListResponseDeploymentConfigsPreviewLimits `json:"limits"` + // mTLS bindings used for Pages Functions. + MTLSCertificates map[string]ProjectListResponseDeploymentConfigsPreviewMTLSCertificate `json:"mtls_certificates"` + // Placement setting used for Pages Functions. + Placement ProjectListResponseDeploymentConfigsPreviewPlacement `json:"placement"` + // Queue Producer bindings used for Pages Functions. + QueueProducers map[string]ProjectListResponseDeploymentConfigsPreviewQueueProducer `json:"queue_producers"` + // R2 buckets used for Pages Functions. + R2Buckets map[string]ProjectListResponseDeploymentConfigsPreviewR2Bucket `json:"r2_buckets"` + // Services used for Pages Functions. + Services map[string]ProjectListResponseDeploymentConfigsPreviewService `json:"services"` + // Vectorize bindings used for Pages Functions. + VectorizeBindings map[string]ProjectListResponseDeploymentConfigsPreviewVectorizeBinding `json:"vectorize_bindings"` + // Hash of the Wrangler configuration used for the deployment. + WranglerConfigHash string `json:"wrangler_config_hash"` + JSON projectListResponseDeploymentConfigsPreviewJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewJSON contains the JSON metadata for +// the struct [ProjectListResponseDeploymentConfigsPreview] +type projectListResponseDeploymentConfigsPreviewJSON struct { + AlwaysUseLatestCompatibilityDate apijson.Field + BuildImageMajorVersion apijson.Field + CompatibilityDate apijson.Field + CompatibilityFlags apijson.Field + EnvVars apijson.Field + FailOpen apijson.Field + UsageModel apijson.Field + AIBindings apijson.Field + AnalyticsEngineDatasets apijson.Field + Browsers apijson.Field + D1Databases apijson.Field + DurableObjectNamespaces apijson.Field + HyperdriveBindings apijson.Field + KVNamespaces apijson.Field + Limits apijson.Field + MTLSCertificates apijson.Field + Placement apijson.Field + QueueProducers apijson.Field + R2Buckets apijson.Field + Services apijson.Field + VectorizeBindings apijson.Field + WranglerConfigHash apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreview) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewJSON) RawJSON() string { + return r.raw +} + +// A plaintext environment variable. +type ProjectListResponseDeploymentConfigsPreviewEnvVar struct { + Type ProjectListResponseDeploymentConfigsPreviewEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectListResponseDeploymentConfigsPreviewEnvVarJSON `json:"-"` + union ProjectListResponseDeploymentConfigsPreviewEnvVarsUnion +} + +// projectListResponseDeploymentConfigsPreviewEnvVarJSON contains the JSON metadata +// for the struct [ProjectListResponseDeploymentConfigsPreviewEnvVar] +type projectListResponseDeploymentConfigsPreviewEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectListResponseDeploymentConfigsPreviewEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectListResponseDeploymentConfigsPreviewEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectListResponseDeploymentConfigsPreviewEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectListResponseDeploymentConfigsPreviewEnvVarsUnion] +// interface which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar], +// [ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. +func (r ProjectListResponseDeploymentConfigsPreviewEnvVar) AsUnion() ProjectListResponseDeploymentConfigsPreviewEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] or +// [ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. +type ProjectListResponseDeploymentConfigsPreviewEnvVarsUnion interface { + implementsProjectListResponseDeploymentConfigsPreviewEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectListResponseDeploymentConfigsPreviewEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar struct { + Type ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] +type projectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) implementsProjectListResponseDeploymentConfigsPreviewEnvVar() { +} + +type ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar struct { + Type ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar] +type projectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) implementsProjectListResponseDeploymentConfigsPreviewEnvVar() { +} + +type ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectListResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectListResponseDeploymentConfigsPreviewEnvVarsType string + +const ( + ProjectListResponseDeploymentConfigsPreviewEnvVarsTypePlainText ProjectListResponseDeploymentConfigsPreviewEnvVarsType = "plain_text" + ProjectListResponseDeploymentConfigsPreviewEnvVarsTypeSecretText ProjectListResponseDeploymentConfigsPreviewEnvVarsType = "secret_text" +) + +func (r ProjectListResponseDeploymentConfigsPreviewEnvVarsType) IsKnown() bool { + switch r { + case ProjectListResponseDeploymentConfigsPreviewEnvVarsTypePlainText, ProjectListResponseDeploymentConfigsPreviewEnvVarsTypeSecretText: + return true + } + return false +} + +// The usage model for Pages Functions. +type ProjectListResponseDeploymentConfigsPreviewUsageModel string + +const ( + ProjectListResponseDeploymentConfigsPreviewUsageModelStandard ProjectListResponseDeploymentConfigsPreviewUsageModel = "standard" + ProjectListResponseDeploymentConfigsPreviewUsageModelBundled ProjectListResponseDeploymentConfigsPreviewUsageModel = "bundled" + ProjectListResponseDeploymentConfigsPreviewUsageModelUnbound ProjectListResponseDeploymentConfigsPreviewUsageModel = "unbound" +) + +func (r ProjectListResponseDeploymentConfigsPreviewUsageModel) IsKnown() bool { + switch r { + case ProjectListResponseDeploymentConfigsPreviewUsageModelStandard, ProjectListResponseDeploymentConfigsPreviewUsageModelBundled, ProjectListResponseDeploymentConfigsPreviewUsageModelUnbound: + return true + } + return false +} + +// AI binding. +type ProjectListResponseDeploymentConfigsPreviewAIBinding struct { + ProjectID string `json:"project_id,required"` + JSON projectListResponseDeploymentConfigsPreviewAIBindingJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewAIBindingJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsPreviewAIBinding] +type projectListResponseDeploymentConfigsPreviewAIBindingJSON struct { + ProjectID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewAIBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewAIBindingJSON) RawJSON() string { + return r.raw +} + +// Analytics Engine binding. +type ProjectListResponseDeploymentConfigsPreviewAnalyticsEngineDataset struct { + // Name of the dataset. + Dataset string `json:"dataset,required"` + JSON projectListResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON contains +// the JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsPreviewAnalyticsEngineDataset] +type projectListResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON struct { + Dataset apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON) RawJSON() string { + return r.raw +} + +// Browser binding. +type ProjectListResponseDeploymentConfigsPreviewBrowser struct { + JSON projectListResponseDeploymentConfigsPreviewBrowserJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewBrowserJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsPreviewBrowser] +type projectListResponseDeploymentConfigsPreviewBrowserJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewBrowser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewBrowserJSON) RawJSON() string { + return r.raw +} + +// D1 binding. +type ProjectListResponseDeploymentConfigsPreviewD1Database struct { + // UUID of the D1 database. + ID string `json:"id,required"` + JSON projectListResponseDeploymentConfigsPreviewD1DatabaseJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewD1DatabaseJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsPreviewD1Database] +type projectListResponseDeploymentConfigsPreviewD1DatabaseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewD1Database) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewD1DatabaseJSON) RawJSON() string { + return r.raw +} + +// Durable Object binding. +type ProjectListResponseDeploymentConfigsPreviewDurableObjectNamespace struct { + // ID of the Durable Object namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectListResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON contains +// the JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsPreviewDurableObjectNamespace] +type projectListResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON) RawJSON() string { + return r.raw +} + +// Hyperdrive binding. +type ProjectListResponseDeploymentConfigsPreviewHyperdriveBinding struct { + ID string `json:"id,required"` + JSON projectListResponseDeploymentConfigsPreviewHyperdriveBindingJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewHyperdriveBindingJSON contains the +// JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsPreviewHyperdriveBinding] +type projectListResponseDeploymentConfigsPreviewHyperdriveBindingJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewHyperdriveBindingJSON) RawJSON() string { + return r.raw +} + +// KV namespace binding. +type ProjectListResponseDeploymentConfigsPreviewKVNamespace struct { + // ID of the KV namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectListResponseDeploymentConfigsPreviewKVNamespaceJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewKVNamespaceJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsPreviewKVNamespace] +type projectListResponseDeploymentConfigsPreviewKVNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewKVNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewKVNamespaceJSON) RawJSON() string { + return r.raw +} + +// Limits for Pages Functions. +type ProjectListResponseDeploymentConfigsPreviewLimits struct { + // CPU time limit in milliseconds. + CPUMs int64 `json:"cpu_ms,required"` + JSON projectListResponseDeploymentConfigsPreviewLimitsJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewLimitsJSON contains the JSON metadata +// for the struct [ProjectListResponseDeploymentConfigsPreviewLimits] +type projectListResponseDeploymentConfigsPreviewLimitsJSON struct { + CPUMs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewLimits) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewLimitsJSON) RawJSON() string { + return r.raw +} + +// mTLS binding. +type ProjectListResponseDeploymentConfigsPreviewMTLSCertificate struct { + CertificateID string `json:"certificate_id,required"` + JSON projectListResponseDeploymentConfigsPreviewMTLSCertificateJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewMTLSCertificateJSON contains the JSON +// metadata for the struct +// [ProjectListResponseDeploymentConfigsPreviewMTLSCertificate] +type projectListResponseDeploymentConfigsPreviewMTLSCertificateJSON struct { + CertificateID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewMTLSCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewMTLSCertificateJSON) RawJSON() string { + return r.raw +} + +// Placement setting used for Pages Functions. +type ProjectListResponseDeploymentConfigsPreviewPlacement struct { + // Placement mode. + Mode string `json:"mode,required"` + JSON projectListResponseDeploymentConfigsPreviewPlacementJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewPlacementJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsPreviewPlacement] +type projectListResponseDeploymentConfigsPreviewPlacementJSON struct { + Mode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewPlacement) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewPlacementJSON) RawJSON() string { + return r.raw +} + +// Queue Producer binding. +type ProjectListResponseDeploymentConfigsPreviewQueueProducer struct { + // Name of the Queue. + Name string `json:"name,required"` + JSON projectListResponseDeploymentConfigsPreviewQueueProducerJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewQueueProducerJSON contains the JSON +// metadata for the struct +// [ProjectListResponseDeploymentConfigsPreviewQueueProducer] +type projectListResponseDeploymentConfigsPreviewQueueProducerJSON struct { + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewQueueProducer) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewQueueProducerJSON) RawJSON() string { + return r.raw +} + +// R2 binding. +type ProjectListResponseDeploymentConfigsPreviewR2Bucket struct { + // Name of the R2 bucket. + Name string `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction string `json:"jurisdiction,nullable"` + JSON projectListResponseDeploymentConfigsPreviewR2BucketJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewR2BucketJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsPreviewR2Bucket] +type projectListResponseDeploymentConfigsPreviewR2BucketJSON struct { + Name apijson.Field + Jurisdiction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewR2Bucket) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewR2BucketJSON) RawJSON() string { + return r.raw +} + +// Service binding. +type ProjectListResponseDeploymentConfigsPreviewService struct { + // The Service environment. + Environment string `json:"environment,required"` + // The Service name. + Service string `json:"service,required"` + // The entrypoint to bind to. + Entrypoint string `json:"entrypoint,nullable"` + JSON projectListResponseDeploymentConfigsPreviewServiceJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewServiceJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsPreviewService] +type projectListResponseDeploymentConfigsPreviewServiceJSON struct { + Environment apijson.Field + Service apijson.Field + Entrypoint apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewService) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewServiceJSON) RawJSON() string { + return r.raw +} + +// Vectorize binding. +type ProjectListResponseDeploymentConfigsPreviewVectorizeBinding struct { + IndexName string `json:"index_name,required"` + JSON projectListResponseDeploymentConfigsPreviewVectorizeBindingJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsPreviewVectorizeBindingJSON contains the +// JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsPreviewVectorizeBinding] +type projectListResponseDeploymentConfigsPreviewVectorizeBindingJSON struct { + IndexName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsPreviewVectorizeBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsPreviewVectorizeBindingJSON) RawJSON() string { + return r.raw +} + +// Configs for production deploys. +type ProjectListResponseDeploymentConfigsProduction struct { + // Whether to always use the latest compatibility date for Pages Functions. + AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date,required"` + // The major version of the build image to use for Pages Functions. + BuildImageMajorVersion int64 `json:"build_image_major_version,required"` + // Compatibility date used for Pages Functions. + CompatibilityDate string `json:"compatibility_date,required"` + // Compatibility flags used for Pages Functions. + CompatibilityFlags []string `json:"compatibility_flags,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectListResponseDeploymentConfigsProductionEnvVar `json:"env_vars,required,nullable"` + // Whether to fail open when the deployment config cannot be applied. + FailOpen bool `json:"fail_open,required"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel ProjectListResponseDeploymentConfigsProductionUsageModel `json:"usage_model,required"` + // Constellation bindings used for Pages Functions. + AIBindings map[string]ProjectListResponseDeploymentConfigsProductionAIBinding `json:"ai_bindings"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets map[string]ProjectListResponseDeploymentConfigsProductionAnalyticsEngineDataset `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers map[string]ProjectListResponseDeploymentConfigsProductionBrowser `json:"browsers"` + // D1 databases used for Pages Functions. + D1Databases map[string]ProjectListResponseDeploymentConfigsProductionD1Database `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces map[string]ProjectListResponseDeploymentConfigsProductionDurableObjectNamespace `json:"durable_object_namespaces"` + // Hyperdrive bindings used for Pages Functions. + HyperdriveBindings map[string]ProjectListResponseDeploymentConfigsProductionHyperdriveBinding `json:"hyperdrive_bindings"` + // KV namespaces used for Pages Functions. + KVNamespaces map[string]ProjectListResponseDeploymentConfigsProductionKVNamespace `json:"kv_namespaces"` + // Limits for Pages Functions. + Limits ProjectListResponseDeploymentConfigsProductionLimits `json:"limits"` + // mTLS bindings used for Pages Functions. + MTLSCertificates map[string]ProjectListResponseDeploymentConfigsProductionMTLSCertificate `json:"mtls_certificates"` + // Placement setting used for Pages Functions. + Placement ProjectListResponseDeploymentConfigsProductionPlacement `json:"placement"` + // Queue Producer bindings used for Pages Functions. + QueueProducers map[string]ProjectListResponseDeploymentConfigsProductionQueueProducer `json:"queue_producers"` + // R2 buckets used for Pages Functions. + R2Buckets map[string]ProjectListResponseDeploymentConfigsProductionR2Bucket `json:"r2_buckets"` + // Services used for Pages Functions. + Services map[string]ProjectListResponseDeploymentConfigsProductionService `json:"services"` + // Vectorize bindings used for Pages Functions. + VectorizeBindings map[string]ProjectListResponseDeploymentConfigsProductionVectorizeBinding `json:"vectorize_bindings"` + // Hash of the Wrangler configuration used for the deployment. + WranglerConfigHash string `json:"wrangler_config_hash"` + JSON projectListResponseDeploymentConfigsProductionJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionJSON contains the JSON metadata +// for the struct [ProjectListResponseDeploymentConfigsProduction] +type projectListResponseDeploymentConfigsProductionJSON struct { + AlwaysUseLatestCompatibilityDate apijson.Field + BuildImageMajorVersion apijson.Field + CompatibilityDate apijson.Field + CompatibilityFlags apijson.Field + EnvVars apijson.Field + FailOpen apijson.Field + UsageModel apijson.Field + AIBindings apijson.Field + AnalyticsEngineDatasets apijson.Field + Browsers apijson.Field + D1Databases apijson.Field + DurableObjectNamespaces apijson.Field + HyperdriveBindings apijson.Field + KVNamespaces apijson.Field + Limits apijson.Field + MTLSCertificates apijson.Field + Placement apijson.Field + QueueProducers apijson.Field + R2Buckets apijson.Field + Services apijson.Field + VectorizeBindings apijson.Field + WranglerConfigHash apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProduction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionJSON) RawJSON() string { + return r.raw +} + +// A plaintext environment variable. +type ProjectListResponseDeploymentConfigsProductionEnvVar struct { + Type ProjectListResponseDeploymentConfigsProductionEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectListResponseDeploymentConfigsProductionEnvVarJSON `json:"-"` + union ProjectListResponseDeploymentConfigsProductionEnvVarsUnion +} + +// projectListResponseDeploymentConfigsProductionEnvVarJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsProductionEnvVar] +type projectListResponseDeploymentConfigsProductionEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectListResponseDeploymentConfigsProductionEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectListResponseDeploymentConfigsProductionEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectListResponseDeploymentConfigsProductionEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectListResponseDeploymentConfigsProductionEnvVarsUnion] +// interface which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar], +// [ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. +func (r ProjectListResponseDeploymentConfigsProductionEnvVar) AsUnion() ProjectListResponseDeploymentConfigsProductionEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] or +// [ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. +type ProjectListResponseDeploymentConfigsProductionEnvVarsUnion interface { + implementsProjectListResponseDeploymentConfigsProductionEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectListResponseDeploymentConfigsProductionEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar struct { + Type ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] +type projectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) implementsProjectListResponseDeploymentConfigsProductionEnvVar() { +} + +type ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectListResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar struct { + Type ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar] +type projectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) implementsProjectListResponseDeploymentConfigsProductionEnvVar() { +} + +type ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectListResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectListResponseDeploymentConfigsProductionEnvVarsType string + +const ( + ProjectListResponseDeploymentConfigsProductionEnvVarsTypePlainText ProjectListResponseDeploymentConfigsProductionEnvVarsType = "plain_text" + ProjectListResponseDeploymentConfigsProductionEnvVarsTypeSecretText ProjectListResponseDeploymentConfigsProductionEnvVarsType = "secret_text" +) + +func (r ProjectListResponseDeploymentConfigsProductionEnvVarsType) IsKnown() bool { + switch r { + case ProjectListResponseDeploymentConfigsProductionEnvVarsTypePlainText, ProjectListResponseDeploymentConfigsProductionEnvVarsTypeSecretText: + return true + } + return false +} + +// The usage model for Pages Functions. +type ProjectListResponseDeploymentConfigsProductionUsageModel string + +const ( + ProjectListResponseDeploymentConfigsProductionUsageModelStandard ProjectListResponseDeploymentConfigsProductionUsageModel = "standard" + ProjectListResponseDeploymentConfigsProductionUsageModelBundled ProjectListResponseDeploymentConfigsProductionUsageModel = "bundled" + ProjectListResponseDeploymentConfigsProductionUsageModelUnbound ProjectListResponseDeploymentConfigsProductionUsageModel = "unbound" +) + +func (r ProjectListResponseDeploymentConfigsProductionUsageModel) IsKnown() bool { + switch r { + case ProjectListResponseDeploymentConfigsProductionUsageModelStandard, ProjectListResponseDeploymentConfigsProductionUsageModelBundled, ProjectListResponseDeploymentConfigsProductionUsageModelUnbound: + return true + } + return false +} + +// AI binding. +type ProjectListResponseDeploymentConfigsProductionAIBinding struct { + ProjectID string `json:"project_id,required"` + JSON projectListResponseDeploymentConfigsProductionAIBindingJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionAIBindingJSON contains the JSON +// metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionAIBinding] +type projectListResponseDeploymentConfigsProductionAIBindingJSON struct { + ProjectID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionAIBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionAIBindingJSON) RawJSON() string { + return r.raw +} + +// Analytics Engine binding. +type ProjectListResponseDeploymentConfigsProductionAnalyticsEngineDataset struct { + // Name of the dataset. + Dataset string `json:"dataset,required"` + JSON projectListResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON +// contains the JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionAnalyticsEngineDataset] +type projectListResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON struct { + Dataset apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON) RawJSON() string { + return r.raw +} + +// Browser binding. +type ProjectListResponseDeploymentConfigsProductionBrowser struct { + JSON projectListResponseDeploymentConfigsProductionBrowserJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionBrowserJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsProductionBrowser] +type projectListResponseDeploymentConfigsProductionBrowserJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionBrowser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionBrowserJSON) RawJSON() string { + return r.raw +} + +// D1 binding. +type ProjectListResponseDeploymentConfigsProductionD1Database struct { + // UUID of the D1 database. + ID string `json:"id,required"` + JSON projectListResponseDeploymentConfigsProductionD1DatabaseJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionD1DatabaseJSON contains the JSON +// metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionD1Database] +type projectListResponseDeploymentConfigsProductionD1DatabaseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionD1Database) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionD1DatabaseJSON) RawJSON() string { + return r.raw +} + +// Durable Object binding. +type ProjectListResponseDeploymentConfigsProductionDurableObjectNamespace struct { + // ID of the Durable Object namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectListResponseDeploymentConfigsProductionDurableObjectNamespaceJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionDurableObjectNamespaceJSON +// contains the JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionDurableObjectNamespace] +type projectListResponseDeploymentConfigsProductionDurableObjectNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionDurableObjectNamespaceJSON) RawJSON() string { + return r.raw +} + +// Hyperdrive binding. +type ProjectListResponseDeploymentConfigsProductionHyperdriveBinding struct { + ID string `json:"id,required"` + JSON projectListResponseDeploymentConfigsProductionHyperdriveBindingJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionHyperdriveBindingJSON contains the +// JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionHyperdriveBinding] +type projectListResponseDeploymentConfigsProductionHyperdriveBindingJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionHyperdriveBindingJSON) RawJSON() string { + return r.raw +} + +// KV namespace binding. +type ProjectListResponseDeploymentConfigsProductionKVNamespace struct { + // ID of the KV namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectListResponseDeploymentConfigsProductionKVNamespaceJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionKVNamespaceJSON contains the JSON +// metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionKVNamespace] +type projectListResponseDeploymentConfigsProductionKVNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionKVNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionKVNamespaceJSON) RawJSON() string { + return r.raw +} + +// Limits for Pages Functions. +type ProjectListResponseDeploymentConfigsProductionLimits struct { + // CPU time limit in milliseconds. + CPUMs int64 `json:"cpu_ms,required"` + JSON projectListResponseDeploymentConfigsProductionLimitsJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionLimitsJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsProductionLimits] +type projectListResponseDeploymentConfigsProductionLimitsJSON struct { + CPUMs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionLimits) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionLimitsJSON) RawJSON() string { + return r.raw +} + +// mTLS binding. +type ProjectListResponseDeploymentConfigsProductionMTLSCertificate struct { + CertificateID string `json:"certificate_id,required"` + JSON projectListResponseDeploymentConfigsProductionMTLSCertificateJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionMTLSCertificateJSON contains the +// JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionMTLSCertificate] +type projectListResponseDeploymentConfigsProductionMTLSCertificateJSON struct { + CertificateID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionMTLSCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionMTLSCertificateJSON) RawJSON() string { + return r.raw +} + +// Placement setting used for Pages Functions. +type ProjectListResponseDeploymentConfigsProductionPlacement struct { + // Placement mode. + Mode string `json:"mode,required"` + JSON projectListResponseDeploymentConfigsProductionPlacementJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionPlacementJSON contains the JSON +// metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionPlacement] +type projectListResponseDeploymentConfigsProductionPlacementJSON struct { + Mode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionPlacement) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionPlacementJSON) RawJSON() string { + return r.raw +} + +// Queue Producer binding. +type ProjectListResponseDeploymentConfigsProductionQueueProducer struct { + // Name of the Queue. + Name string `json:"name,required"` + JSON projectListResponseDeploymentConfigsProductionQueueProducerJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionQueueProducerJSON contains the +// JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionQueueProducer] +type projectListResponseDeploymentConfigsProductionQueueProducerJSON struct { + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionQueueProducer) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionQueueProducerJSON) RawJSON() string { + return r.raw +} + +// R2 binding. +type ProjectListResponseDeploymentConfigsProductionR2Bucket struct { + // Name of the R2 bucket. + Name string `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction string `json:"jurisdiction,nullable"` + JSON projectListResponseDeploymentConfigsProductionR2BucketJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionR2BucketJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsProductionR2Bucket] +type projectListResponseDeploymentConfigsProductionR2BucketJSON struct { + Name apijson.Field + Jurisdiction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionR2Bucket) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionR2BucketJSON) RawJSON() string { + return r.raw +} + +// Service binding. +type ProjectListResponseDeploymentConfigsProductionService struct { + // The Service environment. + Environment string `json:"environment,required"` + // The Service name. + Service string `json:"service,required"` + // The entrypoint to bind to. + Entrypoint string `json:"entrypoint,nullable"` + JSON projectListResponseDeploymentConfigsProductionServiceJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionServiceJSON contains the JSON +// metadata for the struct [ProjectListResponseDeploymentConfigsProductionService] +type projectListResponseDeploymentConfigsProductionServiceJSON struct { + Environment apijson.Field + Service apijson.Field + Entrypoint apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionService) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionServiceJSON) RawJSON() string { + return r.raw +} + +// Vectorize binding. +type ProjectListResponseDeploymentConfigsProductionVectorizeBinding struct { + IndexName string `json:"index_name,required"` + JSON projectListResponseDeploymentConfigsProductionVectorizeBindingJSON `json:"-"` +} + +// projectListResponseDeploymentConfigsProductionVectorizeBindingJSON contains the +// JSON metadata for the struct +// [ProjectListResponseDeploymentConfigsProductionVectorizeBinding] +type projectListResponseDeploymentConfigsProductionVectorizeBindingJSON struct { + IndexName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseDeploymentConfigsProductionVectorizeBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseDeploymentConfigsProductionVectorizeBindingJSON) RawJSON() string { + return r.raw +} + +// Most recent deployment of the project. +type ProjectListResponseLatestDeployment struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectListResponseLatestDeploymentBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectListResponseLatestDeploymentDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectListResponseLatestDeploymentEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectListResponseLatestDeploymentEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectListResponseLatestDeploymentSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectListResponseLatestDeploymentJSON `json:"-"` +} + +// projectListResponseLatestDeploymentJSON contains the JSON metadata for the +// struct [ProjectListResponseLatestDeployment] +type projectListResponseLatestDeploymentJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseLatestDeployment) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseLatestDeploymentJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectListResponseLatestDeploymentBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectListResponseLatestDeploymentBuildConfigJSON `json:"-"` +} + +// projectListResponseLatestDeploymentBuildConfigJSON contains the JSON metadata +// for the struct [ProjectListResponseLatestDeploymentBuildConfig] +type projectListResponseLatestDeploymentBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseLatestDeploymentBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseLatestDeploymentBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectListResponseLatestDeploymentDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectListResponseLatestDeploymentDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectListResponseLatestDeploymentDeploymentTriggerType `json:"type,required"` + JSON projectListResponseLatestDeploymentDeploymentTriggerJSON `json:"-"` +} + +// projectListResponseLatestDeploymentDeploymentTriggerJSON contains the JSON +// metadata for the struct [ProjectListResponseLatestDeploymentDeploymentTrigger] +type projectListResponseLatestDeploymentDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseLatestDeploymentDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseLatestDeploymentDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectListResponseLatestDeploymentDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectListResponseLatestDeploymentDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectListResponseLatestDeploymentDeploymentTriggerMetadataJSON contains the +// JSON metadata for the struct +// [ProjectListResponseLatestDeploymentDeploymentTriggerMetadata] +type projectListResponseLatestDeploymentDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseLatestDeploymentDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseLatestDeploymentDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectListResponseLatestDeploymentDeploymentTriggerType string + +const ( + ProjectListResponseLatestDeploymentDeploymentTriggerTypeGitHubPush ProjectListResponseLatestDeploymentDeploymentTriggerType = "github:push" + ProjectListResponseLatestDeploymentDeploymentTriggerTypeADHoc ProjectListResponseLatestDeploymentDeploymentTriggerType = "ad_hoc" + ProjectListResponseLatestDeploymentDeploymentTriggerTypeDeployHook ProjectListResponseLatestDeploymentDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectListResponseLatestDeploymentDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectListResponseLatestDeploymentDeploymentTriggerTypeGitHubPush, ProjectListResponseLatestDeploymentDeploymentTriggerTypeADHoc, ProjectListResponseLatestDeploymentDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectListResponseLatestDeploymentEnvVar struct { + Type ProjectListResponseLatestDeploymentEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectListResponseLatestDeploymentEnvVarJSON `json:"-"` + union ProjectListResponseLatestDeploymentEnvVarsUnion +} + +// projectListResponseLatestDeploymentEnvVarJSON contains the JSON metadata for the +// struct [ProjectListResponseLatestDeploymentEnvVar] +type projectListResponseLatestDeploymentEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectListResponseLatestDeploymentEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectListResponseLatestDeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectListResponseLatestDeploymentEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectListResponseLatestDeploymentEnvVarsUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar], +// [ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar]. +func (r ProjectListResponseLatestDeploymentEnvVar) AsUnion() ProjectListResponseLatestDeploymentEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar] or +// [ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar]. +type ProjectListResponseLatestDeploymentEnvVarsUnion interface { + implementsProjectListResponseLatestDeploymentEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectListResponseLatestDeploymentEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar struct { + Type ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar] +type projectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar) implementsProjectListResponseLatestDeploymentEnvVar() { +} + +type ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectListResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar struct { + Type ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar] +type projectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar) implementsProjectListResponseLatestDeploymentEnvVar() { +} + +type ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectListResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectListResponseLatestDeploymentEnvVarsType string + +const ( + ProjectListResponseLatestDeploymentEnvVarsTypePlainText ProjectListResponseLatestDeploymentEnvVarsType = "plain_text" + ProjectListResponseLatestDeploymentEnvVarsTypeSecretText ProjectListResponseLatestDeploymentEnvVarsType = "secret_text" +) + +func (r ProjectListResponseLatestDeploymentEnvVarsType) IsKnown() bool { + switch r { + case ProjectListResponseLatestDeploymentEnvVarsTypePlainText, ProjectListResponseLatestDeploymentEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectListResponseLatestDeploymentEnvironment string + +const ( + ProjectListResponseLatestDeploymentEnvironmentPreview ProjectListResponseLatestDeploymentEnvironment = "preview" + ProjectListResponseLatestDeploymentEnvironmentProduction ProjectListResponseLatestDeploymentEnvironment = "production" +) + +func (r ProjectListResponseLatestDeploymentEnvironment) IsKnown() bool { + switch r { + case ProjectListResponseLatestDeploymentEnvironmentPreview, ProjectListResponseLatestDeploymentEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectListResponseLatestDeploymentSource struct { + Config ProjectListResponseLatestDeploymentSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectListResponseLatestDeploymentSourceType `json:"type,required"` + JSON projectListResponseLatestDeploymentSourceJSON `json:"-"` +} + +// projectListResponseLatestDeploymentSourceJSON contains the JSON metadata for the +// struct [ProjectListResponseLatestDeploymentSource] +type projectListResponseLatestDeploymentSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseLatestDeploymentSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseLatestDeploymentSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectListResponseLatestDeploymentSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectListResponseLatestDeploymentSourceConfigJSON `json:"-"` +} + +// projectListResponseLatestDeploymentSourceConfigJSON contains the JSON metadata +// for the struct [ProjectListResponseLatestDeploymentSourceConfig] +type projectListResponseLatestDeploymentSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseLatestDeploymentSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseLatestDeploymentSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSetting string + +const ( + ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSettingAll ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "all" + ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSettingNone ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "none" + ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSettingCustom ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSettingAll, ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSettingNone, ProjectListResponseLatestDeploymentSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectListResponseLatestDeploymentSourceType string + +const ( + ProjectListResponseLatestDeploymentSourceTypeGitHub ProjectListResponseLatestDeploymentSourceType = "github" + ProjectListResponseLatestDeploymentSourceTypeGitlab ProjectListResponseLatestDeploymentSourceType = "gitlab" +) + +func (r ProjectListResponseLatestDeploymentSourceType) IsKnown() bool { + switch r { + case ProjectListResponseLatestDeploymentSourceTypeGitHub, ProjectListResponseLatestDeploymentSourceTypeGitlab: + return true + } + return false +} + +// Configs for the project build process. +type ProjectListResponseBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectListResponseBuildConfigJSON `json:"-"` +} + +// projectListResponseBuildConfigJSON contains the JSON metadata for the struct +// [ProjectListResponseBuildConfig] +type projectListResponseBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Configs for the project source control. +type ProjectListResponseSource struct { + Config ProjectListResponseSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectListResponseSourceType `json:"type,required"` + JSON projectListResponseSourceJSON `json:"-"` +} + +// projectListResponseSourceJSON contains the JSON metadata for the struct +// [ProjectListResponseSource] +type projectListResponseSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectListResponseSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectListResponseSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectListResponseSourceConfigJSON `json:"-"` +} + +// projectListResponseSourceConfigJSON contains the JSON metadata for the struct +// [ProjectListResponseSourceConfig] +type projectListResponseSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectListResponseSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectListResponseSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectListResponseSourceConfigPreviewDeploymentSetting string + +const ( + ProjectListResponseSourceConfigPreviewDeploymentSettingAll ProjectListResponseSourceConfigPreviewDeploymentSetting = "all" + ProjectListResponseSourceConfigPreviewDeploymentSettingNone ProjectListResponseSourceConfigPreviewDeploymentSetting = "none" + ProjectListResponseSourceConfigPreviewDeploymentSettingCustom ProjectListResponseSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectListResponseSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectListResponseSourceConfigPreviewDeploymentSettingAll, ProjectListResponseSourceConfigPreviewDeploymentSettingNone, ProjectListResponseSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectListResponseSourceType string + +const ( + ProjectListResponseSourceTypeGitHub ProjectListResponseSourceType = "github" + ProjectListResponseSourceTypeGitlab ProjectListResponseSourceType = "gitlab" +) + +func (r ProjectListResponseSourceType) IsKnown() bool { + switch r { + case ProjectListResponseSourceTypeGitHub, ProjectListResponseSourceTypeGitlab: + return true + } + return false +} + +type ProjectDeleteResponse = interface{} + +type ProjectEditResponse struct { + // ID of the project. + ID string `json:"id,required"` + // Most recent production deployment of the project. + CanonicalDeployment ProjectEditResponseCanonicalDeployment `json:"canonical_deployment,required,nullable"` + // When the project was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Configs for deployments in a project. + DeploymentConfigs ProjectEditResponseDeploymentConfigs `json:"deployment_configs,required"` + // Framework the project is using. + Framework string `json:"framework,required"` + // Version of the framework the project is using. + FrameworkVersion string `json:"framework_version,required"` + // Most recent deployment of the project. + LatestDeployment ProjectEditResponseLatestDeployment `json:"latest_deployment,required,nullable"` + // Name of the project. + Name string `json:"name,required"` + // Name of the preview script. + PreviewScriptName string `json:"preview_script_name,required"` + // Production branch of the project. Used to identify production deployments. + ProductionBranch string `json:"production_branch,required"` + // Name of the production script. + ProductionScriptName string `json:"production_script_name,required"` + // Whether the project uses functions. + UsesFunctions bool `json:"uses_functions,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectEditResponseBuildConfig `json:"build_config"` + // A list of associated custom domains for the project. + Domains []string `json:"domains"` + // Configs for the project source control. + Source ProjectEditResponseSource `json:"source"` + // The Cloudflare subdomain associated with the project. + Subdomain string `json:"subdomain"` + JSON projectEditResponseJSON `json:"-"` +} + +// projectEditResponseJSON contains the JSON metadata for the struct +// [ProjectEditResponse] +type projectEditResponseJSON struct { + ID apijson.Field + CanonicalDeployment apijson.Field + CreatedOn apijson.Field + DeploymentConfigs apijson.Field + Framework apijson.Field + FrameworkVersion apijson.Field + LatestDeployment apijson.Field + Name apijson.Field + PreviewScriptName apijson.Field + ProductionBranch apijson.Field + ProductionScriptName apijson.Field + UsesFunctions apijson.Field + BuildConfig apijson.Field + Domains apijson.Field + Source apijson.Field + Subdomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseJSON) RawJSON() string { + return r.raw +} + +// Most recent production deployment of the project. +type ProjectEditResponseCanonicalDeployment struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectEditResponseCanonicalDeploymentBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectEditResponseCanonicalDeploymentDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectEditResponseCanonicalDeploymentEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectEditResponseCanonicalDeploymentEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectEditResponseCanonicalDeploymentSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectEditResponseCanonicalDeploymentJSON `json:"-"` +} + +// projectEditResponseCanonicalDeploymentJSON contains the JSON metadata for the +// struct [ProjectEditResponseCanonicalDeployment] +type projectEditResponseCanonicalDeploymentJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseCanonicalDeployment) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseCanonicalDeploymentJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectEditResponseCanonicalDeploymentBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectEditResponseCanonicalDeploymentBuildConfigJSON `json:"-"` +} + +// projectEditResponseCanonicalDeploymentBuildConfigJSON contains the JSON metadata +// for the struct [ProjectEditResponseCanonicalDeploymentBuildConfig] +type projectEditResponseCanonicalDeploymentBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseCanonicalDeploymentBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseCanonicalDeploymentBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectEditResponseCanonicalDeploymentDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectEditResponseCanonicalDeploymentDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectEditResponseCanonicalDeploymentDeploymentTriggerType `json:"type,required"` + JSON projectEditResponseCanonicalDeploymentDeploymentTriggerJSON `json:"-"` +} + +// projectEditResponseCanonicalDeploymentDeploymentTriggerJSON contains the JSON +// metadata for the struct +// [ProjectEditResponseCanonicalDeploymentDeploymentTrigger] +type projectEditResponseCanonicalDeploymentDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseCanonicalDeploymentDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseCanonicalDeploymentDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectEditResponseCanonicalDeploymentDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectEditResponseCanonicalDeploymentDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectEditResponseCanonicalDeploymentDeploymentTriggerMetadataJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseCanonicalDeploymentDeploymentTriggerMetadata] +type projectEditResponseCanonicalDeploymentDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseCanonicalDeploymentDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseCanonicalDeploymentDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectEditResponseCanonicalDeploymentDeploymentTriggerType string + +const ( + ProjectEditResponseCanonicalDeploymentDeploymentTriggerTypeGitHubPush ProjectEditResponseCanonicalDeploymentDeploymentTriggerType = "github:push" + ProjectEditResponseCanonicalDeploymentDeploymentTriggerTypeADHoc ProjectEditResponseCanonicalDeploymentDeploymentTriggerType = "ad_hoc" + ProjectEditResponseCanonicalDeploymentDeploymentTriggerTypeDeployHook ProjectEditResponseCanonicalDeploymentDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectEditResponseCanonicalDeploymentDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectEditResponseCanonicalDeploymentDeploymentTriggerTypeGitHubPush, ProjectEditResponseCanonicalDeploymentDeploymentTriggerTypeADHoc, ProjectEditResponseCanonicalDeploymentDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectEditResponseCanonicalDeploymentEnvVar struct { + Type ProjectEditResponseCanonicalDeploymentEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectEditResponseCanonicalDeploymentEnvVarJSON `json:"-"` + union ProjectEditResponseCanonicalDeploymentEnvVarsUnion +} + +// projectEditResponseCanonicalDeploymentEnvVarJSON contains the JSON metadata for +// the struct [ProjectEditResponseCanonicalDeploymentEnvVar] +type projectEditResponseCanonicalDeploymentEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectEditResponseCanonicalDeploymentEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectEditResponseCanonicalDeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectEditResponseCanonicalDeploymentEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectEditResponseCanonicalDeploymentEnvVarsUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar], +// [ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar]. +func (r ProjectEditResponseCanonicalDeploymentEnvVar) AsUnion() ProjectEditResponseCanonicalDeploymentEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar] or +// [ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar]. +type ProjectEditResponseCanonicalDeploymentEnvVarsUnion interface { + implementsProjectEditResponseCanonicalDeploymentEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectEditResponseCanonicalDeploymentEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar struct { + Type ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON contains +// the JSON metadata for the struct +// [ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar] +type projectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar) implementsProjectEditResponseCanonicalDeploymentEnvVar() { +} + +type ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar struct { + Type ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON contains +// the JSON metadata for the struct +// [ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar] +type projectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar) implementsProjectEditResponseCanonicalDeploymentEnvVar() { +} + +type ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectEditResponseCanonicalDeploymentEnvVarsType string + +const ( + ProjectEditResponseCanonicalDeploymentEnvVarsTypePlainText ProjectEditResponseCanonicalDeploymentEnvVarsType = "plain_text" + ProjectEditResponseCanonicalDeploymentEnvVarsTypeSecretText ProjectEditResponseCanonicalDeploymentEnvVarsType = "secret_text" +) + +func (r ProjectEditResponseCanonicalDeploymentEnvVarsType) IsKnown() bool { + switch r { + case ProjectEditResponseCanonicalDeploymentEnvVarsTypePlainText, ProjectEditResponseCanonicalDeploymentEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectEditResponseCanonicalDeploymentEnvironment string + +const ( + ProjectEditResponseCanonicalDeploymentEnvironmentPreview ProjectEditResponseCanonicalDeploymentEnvironment = "preview" + ProjectEditResponseCanonicalDeploymentEnvironmentProduction ProjectEditResponseCanonicalDeploymentEnvironment = "production" +) + +func (r ProjectEditResponseCanonicalDeploymentEnvironment) IsKnown() bool { + switch r { + case ProjectEditResponseCanonicalDeploymentEnvironmentPreview, ProjectEditResponseCanonicalDeploymentEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectEditResponseCanonicalDeploymentSource struct { + Config ProjectEditResponseCanonicalDeploymentSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectEditResponseCanonicalDeploymentSourceType `json:"type,required"` + JSON projectEditResponseCanonicalDeploymentSourceJSON `json:"-"` +} + +// projectEditResponseCanonicalDeploymentSourceJSON contains the JSON metadata for +// the struct [ProjectEditResponseCanonicalDeploymentSource] +type projectEditResponseCanonicalDeploymentSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseCanonicalDeploymentSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseCanonicalDeploymentSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectEditResponseCanonicalDeploymentSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectEditResponseCanonicalDeploymentSourceConfigJSON `json:"-"` +} + +// projectEditResponseCanonicalDeploymentSourceConfigJSON contains the JSON +// metadata for the struct [ProjectEditResponseCanonicalDeploymentSourceConfig] +type projectEditResponseCanonicalDeploymentSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseCanonicalDeploymentSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseCanonicalDeploymentSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting string + +const ( + ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingAll ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "all" + ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingNone ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "none" + ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingCustom ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingAll, ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingNone, ProjectEditResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectEditResponseCanonicalDeploymentSourceType string + +const ( + ProjectEditResponseCanonicalDeploymentSourceTypeGitHub ProjectEditResponseCanonicalDeploymentSourceType = "github" + ProjectEditResponseCanonicalDeploymentSourceTypeGitlab ProjectEditResponseCanonicalDeploymentSourceType = "gitlab" +) + +func (r ProjectEditResponseCanonicalDeploymentSourceType) IsKnown() bool { + switch r { + case ProjectEditResponseCanonicalDeploymentSourceTypeGitHub, ProjectEditResponseCanonicalDeploymentSourceTypeGitlab: + return true + } + return false +} + +// Configs for deployments in a project. +type ProjectEditResponseDeploymentConfigs struct { + // Configs for preview deploys. + Preview ProjectEditResponseDeploymentConfigsPreview `json:"preview,required"` + // Configs for production deploys. + Production ProjectEditResponseDeploymentConfigsProduction `json:"production,required"` + JSON projectEditResponseDeploymentConfigsJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsJSON contains the JSON metadata for the +// struct [ProjectEditResponseDeploymentConfigs] +type projectEditResponseDeploymentConfigsJSON struct { + Preview apijson.Field + Production apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigs) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsJSON) RawJSON() string { + return r.raw +} + +// Configs for preview deploys. +type ProjectEditResponseDeploymentConfigsPreview struct { + // Whether to always use the latest compatibility date for Pages Functions. + AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date,required"` + // The major version of the build image to use for Pages Functions. + BuildImageMajorVersion int64 `json:"build_image_major_version,required"` + // Compatibility date used for Pages Functions. + CompatibilityDate string `json:"compatibility_date,required"` + // Compatibility flags used for Pages Functions. + CompatibilityFlags []string `json:"compatibility_flags,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectEditResponseDeploymentConfigsPreviewEnvVar `json:"env_vars,required,nullable"` + // Whether to fail open when the deployment config cannot be applied. + FailOpen bool `json:"fail_open,required"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel ProjectEditResponseDeploymentConfigsPreviewUsageModel `json:"usage_model,required"` + // Constellation bindings used for Pages Functions. + AIBindings map[string]ProjectEditResponseDeploymentConfigsPreviewAIBinding `json:"ai_bindings"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets map[string]ProjectEditResponseDeploymentConfigsPreviewAnalyticsEngineDataset `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers map[string]ProjectEditResponseDeploymentConfigsPreviewBrowser `json:"browsers"` + // D1 databases used for Pages Functions. + D1Databases map[string]ProjectEditResponseDeploymentConfigsPreviewD1Database `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces map[string]ProjectEditResponseDeploymentConfigsPreviewDurableObjectNamespace `json:"durable_object_namespaces"` + // Hyperdrive bindings used for Pages Functions. + HyperdriveBindings map[string]ProjectEditResponseDeploymentConfigsPreviewHyperdriveBinding `json:"hyperdrive_bindings"` + // KV namespaces used for Pages Functions. + KVNamespaces map[string]ProjectEditResponseDeploymentConfigsPreviewKVNamespace `json:"kv_namespaces"` + // Limits for Pages Functions. + Limits ProjectEditResponseDeploymentConfigsPreviewLimits `json:"limits"` + // mTLS bindings used for Pages Functions. + MTLSCertificates map[string]ProjectEditResponseDeploymentConfigsPreviewMTLSCertificate `json:"mtls_certificates"` + // Placement setting used for Pages Functions. + Placement ProjectEditResponseDeploymentConfigsPreviewPlacement `json:"placement"` + // Queue Producer bindings used for Pages Functions. + QueueProducers map[string]ProjectEditResponseDeploymentConfigsPreviewQueueProducer `json:"queue_producers"` + // R2 buckets used for Pages Functions. + R2Buckets map[string]ProjectEditResponseDeploymentConfigsPreviewR2Bucket `json:"r2_buckets"` + // Services used for Pages Functions. + Services map[string]ProjectEditResponseDeploymentConfigsPreviewService `json:"services"` + // Vectorize bindings used for Pages Functions. + VectorizeBindings map[string]ProjectEditResponseDeploymentConfigsPreviewVectorizeBinding `json:"vectorize_bindings"` + // Hash of the Wrangler configuration used for the deployment. + WranglerConfigHash string `json:"wrangler_config_hash"` + JSON projectEditResponseDeploymentConfigsPreviewJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewJSON contains the JSON metadata for +// the struct [ProjectEditResponseDeploymentConfigsPreview] +type projectEditResponseDeploymentConfigsPreviewJSON struct { + AlwaysUseLatestCompatibilityDate apijson.Field + BuildImageMajorVersion apijson.Field + CompatibilityDate apijson.Field + CompatibilityFlags apijson.Field + EnvVars apijson.Field + FailOpen apijson.Field + UsageModel apijson.Field + AIBindings apijson.Field + AnalyticsEngineDatasets apijson.Field + Browsers apijson.Field + D1Databases apijson.Field + DurableObjectNamespaces apijson.Field + HyperdriveBindings apijson.Field + KVNamespaces apijson.Field + Limits apijson.Field + MTLSCertificates apijson.Field + Placement apijson.Field + QueueProducers apijson.Field + R2Buckets apijson.Field + Services apijson.Field + VectorizeBindings apijson.Field + WranglerConfigHash apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreview) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewJSON) RawJSON() string { + return r.raw +} + +// A plaintext environment variable. +type ProjectEditResponseDeploymentConfigsPreviewEnvVar struct { + Type ProjectEditResponseDeploymentConfigsPreviewEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectEditResponseDeploymentConfigsPreviewEnvVarJSON `json:"-"` + union ProjectEditResponseDeploymentConfigsPreviewEnvVarsUnion +} + +// projectEditResponseDeploymentConfigsPreviewEnvVarJSON contains the JSON metadata +// for the struct [ProjectEditResponseDeploymentConfigsPreviewEnvVar] +type projectEditResponseDeploymentConfigsPreviewEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectEditResponseDeploymentConfigsPreviewEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectEditResponseDeploymentConfigsPreviewEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectEditResponseDeploymentConfigsPreviewEnvVarsUnion] +// interface which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar], +// [ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. +func (r ProjectEditResponseDeploymentConfigsPreviewEnvVar) AsUnion() ProjectEditResponseDeploymentConfigsPreviewEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] or +// [ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. +type ProjectEditResponseDeploymentConfigsPreviewEnvVarsUnion interface { + implementsProjectEditResponseDeploymentConfigsPreviewEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectEditResponseDeploymentConfigsPreviewEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar struct { + Type ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] +type projectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) implementsProjectEditResponseDeploymentConfigsPreviewEnvVar() { +} + +type ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar struct { + Type ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar] +type projectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) implementsProjectEditResponseDeploymentConfigsPreviewEnvVar() { +} + +type ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectEditResponseDeploymentConfigsPreviewEnvVarsType string + +const ( + ProjectEditResponseDeploymentConfigsPreviewEnvVarsTypePlainText ProjectEditResponseDeploymentConfigsPreviewEnvVarsType = "plain_text" + ProjectEditResponseDeploymentConfigsPreviewEnvVarsTypeSecretText ProjectEditResponseDeploymentConfigsPreviewEnvVarsType = "secret_text" +) + +func (r ProjectEditResponseDeploymentConfigsPreviewEnvVarsType) IsKnown() bool { + switch r { + case ProjectEditResponseDeploymentConfigsPreviewEnvVarsTypePlainText, ProjectEditResponseDeploymentConfigsPreviewEnvVarsTypeSecretText: + return true + } + return false +} + +// The usage model for Pages Functions. +type ProjectEditResponseDeploymentConfigsPreviewUsageModel string + +const ( + ProjectEditResponseDeploymentConfigsPreviewUsageModelStandard ProjectEditResponseDeploymentConfigsPreviewUsageModel = "standard" + ProjectEditResponseDeploymentConfigsPreviewUsageModelBundled ProjectEditResponseDeploymentConfigsPreviewUsageModel = "bundled" + ProjectEditResponseDeploymentConfigsPreviewUsageModelUnbound ProjectEditResponseDeploymentConfigsPreviewUsageModel = "unbound" +) + +func (r ProjectEditResponseDeploymentConfigsPreviewUsageModel) IsKnown() bool { + switch r { + case ProjectEditResponseDeploymentConfigsPreviewUsageModelStandard, ProjectEditResponseDeploymentConfigsPreviewUsageModelBundled, ProjectEditResponseDeploymentConfigsPreviewUsageModelUnbound: + return true + } + return false +} + +// AI binding. +type ProjectEditResponseDeploymentConfigsPreviewAIBinding struct { + ProjectID string `json:"project_id,required"` + JSON projectEditResponseDeploymentConfigsPreviewAIBindingJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewAIBindingJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsPreviewAIBinding] +type projectEditResponseDeploymentConfigsPreviewAIBindingJSON struct { + ProjectID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewAIBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewAIBindingJSON) RawJSON() string { + return r.raw +} + +// Analytics Engine binding. +type ProjectEditResponseDeploymentConfigsPreviewAnalyticsEngineDataset struct { + // Name of the dataset. + Dataset string `json:"dataset,required"` + JSON projectEditResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON contains +// the JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsPreviewAnalyticsEngineDataset] +type projectEditResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON struct { + Dataset apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON) RawJSON() string { + return r.raw +} + +// Browser binding. +type ProjectEditResponseDeploymentConfigsPreviewBrowser struct { + JSON projectEditResponseDeploymentConfigsPreviewBrowserJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewBrowserJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsPreviewBrowser] +type projectEditResponseDeploymentConfigsPreviewBrowserJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewBrowser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewBrowserJSON) RawJSON() string { + return r.raw +} + +// D1 binding. +type ProjectEditResponseDeploymentConfigsPreviewD1Database struct { + // UUID of the D1 database. + ID string `json:"id,required"` + JSON projectEditResponseDeploymentConfigsPreviewD1DatabaseJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewD1DatabaseJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsPreviewD1Database] +type projectEditResponseDeploymentConfigsPreviewD1DatabaseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewD1Database) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewD1DatabaseJSON) RawJSON() string { + return r.raw +} + +// Durable Object binding. +type ProjectEditResponseDeploymentConfigsPreviewDurableObjectNamespace struct { + // ID of the Durable Object namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectEditResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON contains +// the JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsPreviewDurableObjectNamespace] +type projectEditResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON) RawJSON() string { + return r.raw +} + +// Hyperdrive binding. +type ProjectEditResponseDeploymentConfigsPreviewHyperdriveBinding struct { + ID string `json:"id,required"` + JSON projectEditResponseDeploymentConfigsPreviewHyperdriveBindingJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewHyperdriveBindingJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsPreviewHyperdriveBinding] +type projectEditResponseDeploymentConfigsPreviewHyperdriveBindingJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewHyperdriveBindingJSON) RawJSON() string { + return r.raw +} + +// KV namespace binding. +type ProjectEditResponseDeploymentConfigsPreviewKVNamespace struct { + // ID of the KV namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectEditResponseDeploymentConfigsPreviewKVNamespaceJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewKVNamespaceJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsPreviewKVNamespace] +type projectEditResponseDeploymentConfigsPreviewKVNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewKVNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewKVNamespaceJSON) RawJSON() string { + return r.raw +} + +// Limits for Pages Functions. +type ProjectEditResponseDeploymentConfigsPreviewLimits struct { + // CPU time limit in milliseconds. + CPUMs int64 `json:"cpu_ms,required"` + JSON projectEditResponseDeploymentConfigsPreviewLimitsJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewLimitsJSON contains the JSON metadata +// for the struct [ProjectEditResponseDeploymentConfigsPreviewLimits] +type projectEditResponseDeploymentConfigsPreviewLimitsJSON struct { + CPUMs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewLimits) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewLimitsJSON) RawJSON() string { + return r.raw +} + +// mTLS binding. +type ProjectEditResponseDeploymentConfigsPreviewMTLSCertificate struct { + CertificateID string `json:"certificate_id,required"` + JSON projectEditResponseDeploymentConfigsPreviewMTLSCertificateJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewMTLSCertificateJSON contains the JSON +// metadata for the struct +// [ProjectEditResponseDeploymentConfigsPreviewMTLSCertificate] +type projectEditResponseDeploymentConfigsPreviewMTLSCertificateJSON struct { + CertificateID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewMTLSCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewMTLSCertificateJSON) RawJSON() string { + return r.raw +} + +// Placement setting used for Pages Functions. +type ProjectEditResponseDeploymentConfigsPreviewPlacement struct { + // Placement mode. + Mode string `json:"mode,required"` + JSON projectEditResponseDeploymentConfigsPreviewPlacementJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewPlacementJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsPreviewPlacement] +type projectEditResponseDeploymentConfigsPreviewPlacementJSON struct { + Mode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewPlacement) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewPlacementJSON) RawJSON() string { + return r.raw +} + +// Queue Producer binding. +type ProjectEditResponseDeploymentConfigsPreviewQueueProducer struct { + // Name of the Queue. + Name string `json:"name,required"` + JSON projectEditResponseDeploymentConfigsPreviewQueueProducerJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewQueueProducerJSON contains the JSON +// metadata for the struct +// [ProjectEditResponseDeploymentConfigsPreviewQueueProducer] +type projectEditResponseDeploymentConfigsPreviewQueueProducerJSON struct { + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewQueueProducer) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewQueueProducerJSON) RawJSON() string { + return r.raw +} + +// R2 binding. +type ProjectEditResponseDeploymentConfigsPreviewR2Bucket struct { + // Name of the R2 bucket. + Name string `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction string `json:"jurisdiction,nullable"` + JSON projectEditResponseDeploymentConfigsPreviewR2BucketJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewR2BucketJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsPreviewR2Bucket] +type projectEditResponseDeploymentConfigsPreviewR2BucketJSON struct { + Name apijson.Field + Jurisdiction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewR2Bucket) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewR2BucketJSON) RawJSON() string { + return r.raw +} + +// Service binding. +type ProjectEditResponseDeploymentConfigsPreviewService struct { + // The Service environment. + Environment string `json:"environment,required"` + // The Service name. + Service string `json:"service,required"` + // The entrypoint to bind to. + Entrypoint string `json:"entrypoint,nullable"` + JSON projectEditResponseDeploymentConfigsPreviewServiceJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewServiceJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsPreviewService] +type projectEditResponseDeploymentConfigsPreviewServiceJSON struct { + Environment apijson.Field + Service apijson.Field + Entrypoint apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewService) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewServiceJSON) RawJSON() string { + return r.raw +} + +// Vectorize binding. +type ProjectEditResponseDeploymentConfigsPreviewVectorizeBinding struct { + IndexName string `json:"index_name,required"` + JSON projectEditResponseDeploymentConfigsPreviewVectorizeBindingJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsPreviewVectorizeBindingJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsPreviewVectorizeBinding] +type projectEditResponseDeploymentConfigsPreviewVectorizeBindingJSON struct { + IndexName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsPreviewVectorizeBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsPreviewVectorizeBindingJSON) RawJSON() string { + return r.raw +} + +// Configs for production deploys. +type ProjectEditResponseDeploymentConfigsProduction struct { + // Whether to always use the latest compatibility date for Pages Functions. + AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date,required"` + // The major version of the build image to use for Pages Functions. + BuildImageMajorVersion int64 `json:"build_image_major_version,required"` + // Compatibility date used for Pages Functions. + CompatibilityDate string `json:"compatibility_date,required"` + // Compatibility flags used for Pages Functions. + CompatibilityFlags []string `json:"compatibility_flags,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectEditResponseDeploymentConfigsProductionEnvVar `json:"env_vars,required,nullable"` + // Whether to fail open when the deployment config cannot be applied. + FailOpen bool `json:"fail_open,required"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel ProjectEditResponseDeploymentConfigsProductionUsageModel `json:"usage_model,required"` + // Constellation bindings used for Pages Functions. + AIBindings map[string]ProjectEditResponseDeploymentConfigsProductionAIBinding `json:"ai_bindings"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets map[string]ProjectEditResponseDeploymentConfigsProductionAnalyticsEngineDataset `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers map[string]ProjectEditResponseDeploymentConfigsProductionBrowser `json:"browsers"` + // D1 databases used for Pages Functions. + D1Databases map[string]ProjectEditResponseDeploymentConfigsProductionD1Database `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces map[string]ProjectEditResponseDeploymentConfigsProductionDurableObjectNamespace `json:"durable_object_namespaces"` + // Hyperdrive bindings used for Pages Functions. + HyperdriveBindings map[string]ProjectEditResponseDeploymentConfigsProductionHyperdriveBinding `json:"hyperdrive_bindings"` + // KV namespaces used for Pages Functions. + KVNamespaces map[string]ProjectEditResponseDeploymentConfigsProductionKVNamespace `json:"kv_namespaces"` + // Limits for Pages Functions. + Limits ProjectEditResponseDeploymentConfigsProductionLimits `json:"limits"` + // mTLS bindings used for Pages Functions. + MTLSCertificates map[string]ProjectEditResponseDeploymentConfigsProductionMTLSCertificate `json:"mtls_certificates"` + // Placement setting used for Pages Functions. + Placement ProjectEditResponseDeploymentConfigsProductionPlacement `json:"placement"` + // Queue Producer bindings used for Pages Functions. + QueueProducers map[string]ProjectEditResponseDeploymentConfigsProductionQueueProducer `json:"queue_producers"` + // R2 buckets used for Pages Functions. + R2Buckets map[string]ProjectEditResponseDeploymentConfigsProductionR2Bucket `json:"r2_buckets"` + // Services used for Pages Functions. + Services map[string]ProjectEditResponseDeploymentConfigsProductionService `json:"services"` + // Vectorize bindings used for Pages Functions. + VectorizeBindings map[string]ProjectEditResponseDeploymentConfigsProductionVectorizeBinding `json:"vectorize_bindings"` + // Hash of the Wrangler configuration used for the deployment. + WranglerConfigHash string `json:"wrangler_config_hash"` + JSON projectEditResponseDeploymentConfigsProductionJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionJSON contains the JSON metadata +// for the struct [ProjectEditResponseDeploymentConfigsProduction] +type projectEditResponseDeploymentConfigsProductionJSON struct { + AlwaysUseLatestCompatibilityDate apijson.Field + BuildImageMajorVersion apijson.Field + CompatibilityDate apijson.Field + CompatibilityFlags apijson.Field + EnvVars apijson.Field + FailOpen apijson.Field + UsageModel apijson.Field + AIBindings apijson.Field + AnalyticsEngineDatasets apijson.Field + Browsers apijson.Field + D1Databases apijson.Field + DurableObjectNamespaces apijson.Field + HyperdriveBindings apijson.Field + KVNamespaces apijson.Field + Limits apijson.Field + MTLSCertificates apijson.Field + Placement apijson.Field + QueueProducers apijson.Field + R2Buckets apijson.Field + Services apijson.Field + VectorizeBindings apijson.Field + WranglerConfigHash apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProduction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionJSON) RawJSON() string { + return r.raw +} + +// A plaintext environment variable. +type ProjectEditResponseDeploymentConfigsProductionEnvVar struct { + Type ProjectEditResponseDeploymentConfigsProductionEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectEditResponseDeploymentConfigsProductionEnvVarJSON `json:"-"` + union ProjectEditResponseDeploymentConfigsProductionEnvVarsUnion +} + +// projectEditResponseDeploymentConfigsProductionEnvVarJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsProductionEnvVar] +type projectEditResponseDeploymentConfigsProductionEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectEditResponseDeploymentConfigsProductionEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectEditResponseDeploymentConfigsProductionEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectEditResponseDeploymentConfigsProductionEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectEditResponseDeploymentConfigsProductionEnvVarsUnion] +// interface which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar], +// [ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. +func (r ProjectEditResponseDeploymentConfigsProductionEnvVar) AsUnion() ProjectEditResponseDeploymentConfigsProductionEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] or +// [ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. +type ProjectEditResponseDeploymentConfigsProductionEnvVarsUnion interface { + implementsProjectEditResponseDeploymentConfigsProductionEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectEditResponseDeploymentConfigsProductionEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar struct { + Type ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] +type projectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) implementsProjectEditResponseDeploymentConfigsProductionEnvVar() { +} + +type ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar struct { + Type ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar] +type projectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) implementsProjectEditResponseDeploymentConfigsProductionEnvVar() { +} + +type ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectEditResponseDeploymentConfigsProductionEnvVarsType string + +const ( + ProjectEditResponseDeploymentConfigsProductionEnvVarsTypePlainText ProjectEditResponseDeploymentConfigsProductionEnvVarsType = "plain_text" + ProjectEditResponseDeploymentConfigsProductionEnvVarsTypeSecretText ProjectEditResponseDeploymentConfigsProductionEnvVarsType = "secret_text" +) + +func (r ProjectEditResponseDeploymentConfigsProductionEnvVarsType) IsKnown() bool { + switch r { + case ProjectEditResponseDeploymentConfigsProductionEnvVarsTypePlainText, ProjectEditResponseDeploymentConfigsProductionEnvVarsTypeSecretText: + return true + } + return false +} + +// The usage model for Pages Functions. +type ProjectEditResponseDeploymentConfigsProductionUsageModel string + +const ( + ProjectEditResponseDeploymentConfigsProductionUsageModelStandard ProjectEditResponseDeploymentConfigsProductionUsageModel = "standard" + ProjectEditResponseDeploymentConfigsProductionUsageModelBundled ProjectEditResponseDeploymentConfigsProductionUsageModel = "bundled" + ProjectEditResponseDeploymentConfigsProductionUsageModelUnbound ProjectEditResponseDeploymentConfigsProductionUsageModel = "unbound" +) + +func (r ProjectEditResponseDeploymentConfigsProductionUsageModel) IsKnown() bool { + switch r { + case ProjectEditResponseDeploymentConfigsProductionUsageModelStandard, ProjectEditResponseDeploymentConfigsProductionUsageModelBundled, ProjectEditResponseDeploymentConfigsProductionUsageModelUnbound: + return true + } + return false +} + +// AI binding. +type ProjectEditResponseDeploymentConfigsProductionAIBinding struct { + ProjectID string `json:"project_id,required"` + JSON projectEditResponseDeploymentConfigsProductionAIBindingJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionAIBindingJSON contains the JSON +// metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionAIBinding] +type projectEditResponseDeploymentConfigsProductionAIBindingJSON struct { + ProjectID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionAIBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionAIBindingJSON) RawJSON() string { + return r.raw +} + +// Analytics Engine binding. +type ProjectEditResponseDeploymentConfigsProductionAnalyticsEngineDataset struct { + // Name of the dataset. + Dataset string `json:"dataset,required"` + JSON projectEditResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON +// contains the JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionAnalyticsEngineDataset] +type projectEditResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON struct { + Dataset apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON) RawJSON() string { + return r.raw +} + +// Browser binding. +type ProjectEditResponseDeploymentConfigsProductionBrowser struct { + JSON projectEditResponseDeploymentConfigsProductionBrowserJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionBrowserJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsProductionBrowser] +type projectEditResponseDeploymentConfigsProductionBrowserJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionBrowser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionBrowserJSON) RawJSON() string { + return r.raw +} + +// D1 binding. +type ProjectEditResponseDeploymentConfigsProductionD1Database struct { + // UUID of the D1 database. + ID string `json:"id,required"` + JSON projectEditResponseDeploymentConfigsProductionD1DatabaseJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionD1DatabaseJSON contains the JSON +// metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionD1Database] +type projectEditResponseDeploymentConfigsProductionD1DatabaseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionD1Database) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionD1DatabaseJSON) RawJSON() string { + return r.raw +} + +// Durable Object binding. +type ProjectEditResponseDeploymentConfigsProductionDurableObjectNamespace struct { + // ID of the Durable Object namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectEditResponseDeploymentConfigsProductionDurableObjectNamespaceJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionDurableObjectNamespaceJSON +// contains the JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionDurableObjectNamespace] +type projectEditResponseDeploymentConfigsProductionDurableObjectNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionDurableObjectNamespaceJSON) RawJSON() string { + return r.raw +} + +// Hyperdrive binding. +type ProjectEditResponseDeploymentConfigsProductionHyperdriveBinding struct { + ID string `json:"id,required"` + JSON projectEditResponseDeploymentConfigsProductionHyperdriveBindingJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionHyperdriveBindingJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionHyperdriveBinding] +type projectEditResponseDeploymentConfigsProductionHyperdriveBindingJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionHyperdriveBindingJSON) RawJSON() string { + return r.raw +} + +// KV namespace binding. +type ProjectEditResponseDeploymentConfigsProductionKVNamespace struct { + // ID of the KV namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectEditResponseDeploymentConfigsProductionKVNamespaceJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionKVNamespaceJSON contains the JSON +// metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionKVNamespace] +type projectEditResponseDeploymentConfigsProductionKVNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionKVNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionKVNamespaceJSON) RawJSON() string { + return r.raw +} + +// Limits for Pages Functions. +type ProjectEditResponseDeploymentConfigsProductionLimits struct { + // CPU time limit in milliseconds. + CPUMs int64 `json:"cpu_ms,required"` + JSON projectEditResponseDeploymentConfigsProductionLimitsJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionLimitsJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsProductionLimits] +type projectEditResponseDeploymentConfigsProductionLimitsJSON struct { + CPUMs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionLimits) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionLimitsJSON) RawJSON() string { + return r.raw +} + +// mTLS binding. +type ProjectEditResponseDeploymentConfigsProductionMTLSCertificate struct { + CertificateID string `json:"certificate_id,required"` + JSON projectEditResponseDeploymentConfigsProductionMTLSCertificateJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionMTLSCertificateJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionMTLSCertificate] +type projectEditResponseDeploymentConfigsProductionMTLSCertificateJSON struct { + CertificateID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionMTLSCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionMTLSCertificateJSON) RawJSON() string { + return r.raw +} + +// Placement setting used for Pages Functions. +type ProjectEditResponseDeploymentConfigsProductionPlacement struct { + // Placement mode. + Mode string `json:"mode,required"` + JSON projectEditResponseDeploymentConfigsProductionPlacementJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionPlacementJSON contains the JSON +// metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionPlacement] +type projectEditResponseDeploymentConfigsProductionPlacementJSON struct { + Mode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionPlacement) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionPlacementJSON) RawJSON() string { + return r.raw +} + +// Queue Producer binding. +type ProjectEditResponseDeploymentConfigsProductionQueueProducer struct { + // Name of the Queue. + Name string `json:"name,required"` + JSON projectEditResponseDeploymentConfigsProductionQueueProducerJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionQueueProducerJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionQueueProducer] +type projectEditResponseDeploymentConfigsProductionQueueProducerJSON struct { + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionQueueProducer) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionQueueProducerJSON) RawJSON() string { + return r.raw +} + +// R2 binding. +type ProjectEditResponseDeploymentConfigsProductionR2Bucket struct { + // Name of the R2 bucket. + Name string `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction string `json:"jurisdiction,nullable"` + JSON projectEditResponseDeploymentConfigsProductionR2BucketJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionR2BucketJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsProductionR2Bucket] +type projectEditResponseDeploymentConfigsProductionR2BucketJSON struct { + Name apijson.Field + Jurisdiction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionR2Bucket) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionR2BucketJSON) RawJSON() string { + return r.raw +} + +// Service binding. +type ProjectEditResponseDeploymentConfigsProductionService struct { + // The Service environment. + Environment string `json:"environment,required"` + // The Service name. + Service string `json:"service,required"` + // The entrypoint to bind to. + Entrypoint string `json:"entrypoint,nullable"` + JSON projectEditResponseDeploymentConfigsProductionServiceJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionServiceJSON contains the JSON +// metadata for the struct [ProjectEditResponseDeploymentConfigsProductionService] +type projectEditResponseDeploymentConfigsProductionServiceJSON struct { + Environment apijson.Field + Service apijson.Field + Entrypoint apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionService) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionServiceJSON) RawJSON() string { + return r.raw +} + +// Vectorize binding. +type ProjectEditResponseDeploymentConfigsProductionVectorizeBinding struct { + IndexName string `json:"index_name,required"` + JSON projectEditResponseDeploymentConfigsProductionVectorizeBindingJSON `json:"-"` +} + +// projectEditResponseDeploymentConfigsProductionVectorizeBindingJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseDeploymentConfigsProductionVectorizeBinding] +type projectEditResponseDeploymentConfigsProductionVectorizeBindingJSON struct { + IndexName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseDeploymentConfigsProductionVectorizeBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseDeploymentConfigsProductionVectorizeBindingJSON) RawJSON() string { + return r.raw +} + +// Most recent deployment of the project. +type ProjectEditResponseLatestDeployment struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectEditResponseLatestDeploymentBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectEditResponseLatestDeploymentDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectEditResponseLatestDeploymentEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectEditResponseLatestDeploymentEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectEditResponseLatestDeploymentSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectEditResponseLatestDeploymentJSON `json:"-"` +} + +// projectEditResponseLatestDeploymentJSON contains the JSON metadata for the +// struct [ProjectEditResponseLatestDeployment] +type projectEditResponseLatestDeploymentJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseLatestDeployment) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseLatestDeploymentJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectEditResponseLatestDeploymentBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectEditResponseLatestDeploymentBuildConfigJSON `json:"-"` +} + +// projectEditResponseLatestDeploymentBuildConfigJSON contains the JSON metadata +// for the struct [ProjectEditResponseLatestDeploymentBuildConfig] +type projectEditResponseLatestDeploymentBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseLatestDeploymentBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseLatestDeploymentBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectEditResponseLatestDeploymentDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectEditResponseLatestDeploymentDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectEditResponseLatestDeploymentDeploymentTriggerType `json:"type,required"` + JSON projectEditResponseLatestDeploymentDeploymentTriggerJSON `json:"-"` +} + +// projectEditResponseLatestDeploymentDeploymentTriggerJSON contains the JSON +// metadata for the struct [ProjectEditResponseLatestDeploymentDeploymentTrigger] +type projectEditResponseLatestDeploymentDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseLatestDeploymentDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseLatestDeploymentDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectEditResponseLatestDeploymentDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectEditResponseLatestDeploymentDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectEditResponseLatestDeploymentDeploymentTriggerMetadataJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseLatestDeploymentDeploymentTriggerMetadata] +type projectEditResponseLatestDeploymentDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseLatestDeploymentDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseLatestDeploymentDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectEditResponseLatestDeploymentDeploymentTriggerType string + +const ( + ProjectEditResponseLatestDeploymentDeploymentTriggerTypeGitHubPush ProjectEditResponseLatestDeploymentDeploymentTriggerType = "github:push" + ProjectEditResponseLatestDeploymentDeploymentTriggerTypeADHoc ProjectEditResponseLatestDeploymentDeploymentTriggerType = "ad_hoc" + ProjectEditResponseLatestDeploymentDeploymentTriggerTypeDeployHook ProjectEditResponseLatestDeploymentDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectEditResponseLatestDeploymentDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectEditResponseLatestDeploymentDeploymentTriggerTypeGitHubPush, ProjectEditResponseLatestDeploymentDeploymentTriggerTypeADHoc, ProjectEditResponseLatestDeploymentDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectEditResponseLatestDeploymentEnvVar struct { + Type ProjectEditResponseLatestDeploymentEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectEditResponseLatestDeploymentEnvVarJSON `json:"-"` + union ProjectEditResponseLatestDeploymentEnvVarsUnion +} + +// projectEditResponseLatestDeploymentEnvVarJSON contains the JSON metadata for the +// struct [ProjectEditResponseLatestDeploymentEnvVar] +type projectEditResponseLatestDeploymentEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectEditResponseLatestDeploymentEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectEditResponseLatestDeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectEditResponseLatestDeploymentEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectEditResponseLatestDeploymentEnvVarsUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar], +// [ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar]. +func (r ProjectEditResponseLatestDeploymentEnvVar) AsUnion() ProjectEditResponseLatestDeploymentEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar] or +// [ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar]. +type ProjectEditResponseLatestDeploymentEnvVarsUnion interface { + implementsProjectEditResponseLatestDeploymentEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectEditResponseLatestDeploymentEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar struct { + Type ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar] +type projectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar) implementsProjectEditResponseLatestDeploymentEnvVar() { +} + +type ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar struct { + Type ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar] +type projectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar) implementsProjectEditResponseLatestDeploymentEnvVar() { +} + +type ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectEditResponseLatestDeploymentEnvVarsType string + +const ( + ProjectEditResponseLatestDeploymentEnvVarsTypePlainText ProjectEditResponseLatestDeploymentEnvVarsType = "plain_text" + ProjectEditResponseLatestDeploymentEnvVarsTypeSecretText ProjectEditResponseLatestDeploymentEnvVarsType = "secret_text" +) + +func (r ProjectEditResponseLatestDeploymentEnvVarsType) IsKnown() bool { + switch r { + case ProjectEditResponseLatestDeploymentEnvVarsTypePlainText, ProjectEditResponseLatestDeploymentEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectEditResponseLatestDeploymentEnvironment string + +const ( + ProjectEditResponseLatestDeploymentEnvironmentPreview ProjectEditResponseLatestDeploymentEnvironment = "preview" + ProjectEditResponseLatestDeploymentEnvironmentProduction ProjectEditResponseLatestDeploymentEnvironment = "production" +) + +func (r ProjectEditResponseLatestDeploymentEnvironment) IsKnown() bool { + switch r { + case ProjectEditResponseLatestDeploymentEnvironmentPreview, ProjectEditResponseLatestDeploymentEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectEditResponseLatestDeploymentSource struct { + Config ProjectEditResponseLatestDeploymentSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectEditResponseLatestDeploymentSourceType `json:"type,required"` + JSON projectEditResponseLatestDeploymentSourceJSON `json:"-"` +} + +// projectEditResponseLatestDeploymentSourceJSON contains the JSON metadata for the +// struct [ProjectEditResponseLatestDeploymentSource] +type projectEditResponseLatestDeploymentSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseLatestDeploymentSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseLatestDeploymentSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectEditResponseLatestDeploymentSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectEditResponseLatestDeploymentSourceConfigJSON `json:"-"` +} + +// projectEditResponseLatestDeploymentSourceConfigJSON contains the JSON metadata +// for the struct [ProjectEditResponseLatestDeploymentSourceConfig] +type projectEditResponseLatestDeploymentSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseLatestDeploymentSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseLatestDeploymentSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSetting string + +const ( + ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSettingAll ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "all" + ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSettingNone ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "none" + ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSettingCustom ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSettingAll, ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSettingNone, ProjectEditResponseLatestDeploymentSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectEditResponseLatestDeploymentSourceType string + +const ( + ProjectEditResponseLatestDeploymentSourceTypeGitHub ProjectEditResponseLatestDeploymentSourceType = "github" + ProjectEditResponseLatestDeploymentSourceTypeGitlab ProjectEditResponseLatestDeploymentSourceType = "gitlab" +) + +func (r ProjectEditResponseLatestDeploymentSourceType) IsKnown() bool { + switch r { + case ProjectEditResponseLatestDeploymentSourceTypeGitHub, ProjectEditResponseLatestDeploymentSourceTypeGitlab: + return true + } + return false +} + +// Configs for the project build process. +type ProjectEditResponseBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectEditResponseBuildConfigJSON `json:"-"` +} + +// projectEditResponseBuildConfigJSON contains the JSON metadata for the struct +// [ProjectEditResponseBuildConfig] +type projectEditResponseBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Configs for the project source control. +type ProjectEditResponseSource struct { + Config ProjectEditResponseSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectEditResponseSourceType `json:"type,required"` + JSON projectEditResponseSourceJSON `json:"-"` +} + +// projectEditResponseSourceJSON contains the JSON metadata for the struct +// [ProjectEditResponseSource] +type projectEditResponseSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectEditResponseSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectEditResponseSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectEditResponseSourceConfigJSON `json:"-"` +} + +// projectEditResponseSourceConfigJSON contains the JSON metadata for the struct +// [ProjectEditResponseSourceConfig] +type projectEditResponseSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectEditResponseSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectEditResponseSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectEditResponseSourceConfigPreviewDeploymentSetting string + +const ( + ProjectEditResponseSourceConfigPreviewDeploymentSettingAll ProjectEditResponseSourceConfigPreviewDeploymentSetting = "all" + ProjectEditResponseSourceConfigPreviewDeploymentSettingNone ProjectEditResponseSourceConfigPreviewDeploymentSetting = "none" + ProjectEditResponseSourceConfigPreviewDeploymentSettingCustom ProjectEditResponseSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectEditResponseSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectEditResponseSourceConfigPreviewDeploymentSettingAll, ProjectEditResponseSourceConfigPreviewDeploymentSettingNone, ProjectEditResponseSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectEditResponseSourceType string + +const ( + ProjectEditResponseSourceTypeGitHub ProjectEditResponseSourceType = "github" + ProjectEditResponseSourceTypeGitlab ProjectEditResponseSourceType = "gitlab" +) + +func (r ProjectEditResponseSourceType) IsKnown() bool { + switch r { + case ProjectEditResponseSourceTypeGitHub, ProjectEditResponseSourceTypeGitlab: + return true + } + return false +} + +type ProjectGetResponse struct { + // ID of the project. + ID string `json:"id,required"` + // Most recent production deployment of the project. + CanonicalDeployment ProjectGetResponseCanonicalDeployment `json:"canonical_deployment,required,nullable"` + // When the project was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Configs for deployments in a project. + DeploymentConfigs ProjectGetResponseDeploymentConfigs `json:"deployment_configs,required"` + // Framework the project is using. + Framework string `json:"framework,required"` + // Version of the framework the project is using. + FrameworkVersion string `json:"framework_version,required"` + // Most recent deployment of the project. + LatestDeployment ProjectGetResponseLatestDeployment `json:"latest_deployment,required,nullable"` + // Name of the project. + Name string `json:"name,required"` + // Name of the preview script. + PreviewScriptName string `json:"preview_script_name,required"` + // Production branch of the project. Used to identify production deployments. + ProductionBranch string `json:"production_branch,required"` + // Name of the production script. + ProductionScriptName string `json:"production_script_name,required"` + // Whether the project uses functions. + UsesFunctions bool `json:"uses_functions,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectGetResponseBuildConfig `json:"build_config"` + // A list of associated custom domains for the project. + Domains []string `json:"domains"` + // Configs for the project source control. + Source ProjectGetResponseSource `json:"source"` + // The Cloudflare subdomain associated with the project. + Subdomain string `json:"subdomain"` + JSON projectGetResponseJSON `json:"-"` +} + +// projectGetResponseJSON contains the JSON metadata for the struct +// [ProjectGetResponse] +type projectGetResponseJSON struct { + ID apijson.Field + CanonicalDeployment apijson.Field + CreatedOn apijson.Field + DeploymentConfigs apijson.Field + Framework apijson.Field + FrameworkVersion apijson.Field + LatestDeployment apijson.Field + Name apijson.Field + PreviewScriptName apijson.Field + ProductionBranch apijson.Field + ProductionScriptName apijson.Field + UsesFunctions apijson.Field + BuildConfig apijson.Field + Domains apijson.Field + Source apijson.Field + Subdomain apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseJSON) RawJSON() string { + return r.raw +} + +// Most recent production deployment of the project. +type ProjectGetResponseCanonicalDeployment struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectGetResponseCanonicalDeploymentBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectGetResponseCanonicalDeploymentDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectGetResponseCanonicalDeploymentEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectGetResponseCanonicalDeploymentEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectGetResponseCanonicalDeploymentSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectGetResponseCanonicalDeploymentJSON `json:"-"` +} + +// projectGetResponseCanonicalDeploymentJSON contains the JSON metadata for the +// struct [ProjectGetResponseCanonicalDeployment] +type projectGetResponseCanonicalDeploymentJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseCanonicalDeployment) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseCanonicalDeploymentJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectGetResponseCanonicalDeploymentBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectGetResponseCanonicalDeploymentBuildConfigJSON `json:"-"` +} + +// projectGetResponseCanonicalDeploymentBuildConfigJSON contains the JSON metadata +// for the struct [ProjectGetResponseCanonicalDeploymentBuildConfig] +type projectGetResponseCanonicalDeploymentBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseCanonicalDeploymentBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseCanonicalDeploymentBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectGetResponseCanonicalDeploymentDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectGetResponseCanonicalDeploymentDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectGetResponseCanonicalDeploymentDeploymentTriggerType `json:"type,required"` + JSON projectGetResponseCanonicalDeploymentDeploymentTriggerJSON `json:"-"` +} + +// projectGetResponseCanonicalDeploymentDeploymentTriggerJSON contains the JSON +// metadata for the struct [ProjectGetResponseCanonicalDeploymentDeploymentTrigger] +type projectGetResponseCanonicalDeploymentDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseCanonicalDeploymentDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseCanonicalDeploymentDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectGetResponseCanonicalDeploymentDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectGetResponseCanonicalDeploymentDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectGetResponseCanonicalDeploymentDeploymentTriggerMetadataJSON contains the +// JSON metadata for the struct +// [ProjectGetResponseCanonicalDeploymentDeploymentTriggerMetadata] +type projectGetResponseCanonicalDeploymentDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseCanonicalDeploymentDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseCanonicalDeploymentDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectGetResponseCanonicalDeploymentDeploymentTriggerType string + +const ( + ProjectGetResponseCanonicalDeploymentDeploymentTriggerTypeGitHubPush ProjectGetResponseCanonicalDeploymentDeploymentTriggerType = "github:push" + ProjectGetResponseCanonicalDeploymentDeploymentTriggerTypeADHoc ProjectGetResponseCanonicalDeploymentDeploymentTriggerType = "ad_hoc" + ProjectGetResponseCanonicalDeploymentDeploymentTriggerTypeDeployHook ProjectGetResponseCanonicalDeploymentDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectGetResponseCanonicalDeploymentDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectGetResponseCanonicalDeploymentDeploymentTriggerTypeGitHubPush, ProjectGetResponseCanonicalDeploymentDeploymentTriggerTypeADHoc, ProjectGetResponseCanonicalDeploymentDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectGetResponseCanonicalDeploymentEnvVar struct { + Type ProjectGetResponseCanonicalDeploymentEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectGetResponseCanonicalDeploymentEnvVarJSON `json:"-"` + union ProjectGetResponseCanonicalDeploymentEnvVarsUnion +} + +// projectGetResponseCanonicalDeploymentEnvVarJSON contains the JSON metadata for +// the struct [ProjectGetResponseCanonicalDeploymentEnvVar] +type projectGetResponseCanonicalDeploymentEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectGetResponseCanonicalDeploymentEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectGetResponseCanonicalDeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectGetResponseCanonicalDeploymentEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectGetResponseCanonicalDeploymentEnvVarsUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar], +// [ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar]. +func (r ProjectGetResponseCanonicalDeploymentEnvVar) AsUnion() ProjectGetResponseCanonicalDeploymentEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar] or +// [ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar]. +type ProjectGetResponseCanonicalDeploymentEnvVarsUnion interface { + implementsProjectGetResponseCanonicalDeploymentEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectGetResponseCanonicalDeploymentEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar struct { + Type ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON contains +// the JSON metadata for the struct +// [ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar] +type projectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVar) implementsProjectGetResponseCanonicalDeploymentEnvVar() { +} + +type ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectGetResponseCanonicalDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar struct { + Type ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON contains +// the JSON metadata for the struct +// [ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar] +type projectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVar) implementsProjectGetResponseCanonicalDeploymentEnvVar() { +} + +type ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectGetResponseCanonicalDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectGetResponseCanonicalDeploymentEnvVarsType string + +const ( + ProjectGetResponseCanonicalDeploymentEnvVarsTypePlainText ProjectGetResponseCanonicalDeploymentEnvVarsType = "plain_text" + ProjectGetResponseCanonicalDeploymentEnvVarsTypeSecretText ProjectGetResponseCanonicalDeploymentEnvVarsType = "secret_text" +) + +func (r ProjectGetResponseCanonicalDeploymentEnvVarsType) IsKnown() bool { + switch r { + case ProjectGetResponseCanonicalDeploymentEnvVarsTypePlainText, ProjectGetResponseCanonicalDeploymentEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectGetResponseCanonicalDeploymentEnvironment string + +const ( + ProjectGetResponseCanonicalDeploymentEnvironmentPreview ProjectGetResponseCanonicalDeploymentEnvironment = "preview" + ProjectGetResponseCanonicalDeploymentEnvironmentProduction ProjectGetResponseCanonicalDeploymentEnvironment = "production" +) + +func (r ProjectGetResponseCanonicalDeploymentEnvironment) IsKnown() bool { + switch r { + case ProjectGetResponseCanonicalDeploymentEnvironmentPreview, ProjectGetResponseCanonicalDeploymentEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectGetResponseCanonicalDeploymentSource struct { + Config ProjectGetResponseCanonicalDeploymentSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectGetResponseCanonicalDeploymentSourceType `json:"type,required"` + JSON projectGetResponseCanonicalDeploymentSourceJSON `json:"-"` +} + +// projectGetResponseCanonicalDeploymentSourceJSON contains the JSON metadata for +// the struct [ProjectGetResponseCanonicalDeploymentSource] +type projectGetResponseCanonicalDeploymentSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseCanonicalDeploymentSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseCanonicalDeploymentSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectGetResponseCanonicalDeploymentSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectGetResponseCanonicalDeploymentSourceConfigJSON `json:"-"` +} + +// projectGetResponseCanonicalDeploymentSourceConfigJSON contains the JSON metadata +// for the struct [ProjectGetResponseCanonicalDeploymentSourceConfig] +type projectGetResponseCanonicalDeploymentSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseCanonicalDeploymentSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseCanonicalDeploymentSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting string + +const ( + ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingAll ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "all" + ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingNone ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "none" + ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingCustom ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingAll, ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingNone, ProjectGetResponseCanonicalDeploymentSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectGetResponseCanonicalDeploymentSourceType string + +const ( + ProjectGetResponseCanonicalDeploymentSourceTypeGitHub ProjectGetResponseCanonicalDeploymentSourceType = "github" + ProjectGetResponseCanonicalDeploymentSourceTypeGitlab ProjectGetResponseCanonicalDeploymentSourceType = "gitlab" +) + +func (r ProjectGetResponseCanonicalDeploymentSourceType) IsKnown() bool { + switch r { + case ProjectGetResponseCanonicalDeploymentSourceTypeGitHub, ProjectGetResponseCanonicalDeploymentSourceTypeGitlab: + return true + } + return false +} + +// Configs for deployments in a project. +type ProjectGetResponseDeploymentConfigs struct { + // Configs for preview deploys. + Preview ProjectGetResponseDeploymentConfigsPreview `json:"preview,required"` + // Configs for production deploys. + Production ProjectGetResponseDeploymentConfigsProduction `json:"production,required"` + JSON projectGetResponseDeploymentConfigsJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsJSON contains the JSON metadata for the +// struct [ProjectGetResponseDeploymentConfigs] +type projectGetResponseDeploymentConfigsJSON struct { + Preview apijson.Field + Production apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigs) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsJSON) RawJSON() string { + return r.raw +} + +// Configs for preview deploys. +type ProjectGetResponseDeploymentConfigsPreview struct { + // Whether to always use the latest compatibility date for Pages Functions. + AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date,required"` + // The major version of the build image to use for Pages Functions. + BuildImageMajorVersion int64 `json:"build_image_major_version,required"` + // Compatibility date used for Pages Functions. + CompatibilityDate string `json:"compatibility_date,required"` + // Compatibility flags used for Pages Functions. + CompatibilityFlags []string `json:"compatibility_flags,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectGetResponseDeploymentConfigsPreviewEnvVar `json:"env_vars,required,nullable"` + // Whether to fail open when the deployment config cannot be applied. + FailOpen bool `json:"fail_open,required"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel ProjectGetResponseDeploymentConfigsPreviewUsageModel `json:"usage_model,required"` + // Constellation bindings used for Pages Functions. + AIBindings map[string]ProjectGetResponseDeploymentConfigsPreviewAIBinding `json:"ai_bindings"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets map[string]ProjectGetResponseDeploymentConfigsPreviewAnalyticsEngineDataset `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers map[string]ProjectGetResponseDeploymentConfigsPreviewBrowser `json:"browsers"` + // D1 databases used for Pages Functions. + D1Databases map[string]ProjectGetResponseDeploymentConfigsPreviewD1Database `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces map[string]ProjectGetResponseDeploymentConfigsPreviewDurableObjectNamespace `json:"durable_object_namespaces"` + // Hyperdrive bindings used for Pages Functions. + HyperdriveBindings map[string]ProjectGetResponseDeploymentConfigsPreviewHyperdriveBinding `json:"hyperdrive_bindings"` + // KV namespaces used for Pages Functions. + KVNamespaces map[string]ProjectGetResponseDeploymentConfigsPreviewKVNamespace `json:"kv_namespaces"` + // Limits for Pages Functions. + Limits ProjectGetResponseDeploymentConfigsPreviewLimits `json:"limits"` + // mTLS bindings used for Pages Functions. + MTLSCertificates map[string]ProjectGetResponseDeploymentConfigsPreviewMTLSCertificate `json:"mtls_certificates"` + // Placement setting used for Pages Functions. + Placement ProjectGetResponseDeploymentConfigsPreviewPlacement `json:"placement"` + // Queue Producer bindings used for Pages Functions. + QueueProducers map[string]ProjectGetResponseDeploymentConfigsPreviewQueueProducer `json:"queue_producers"` + // R2 buckets used for Pages Functions. + R2Buckets map[string]ProjectGetResponseDeploymentConfigsPreviewR2Bucket `json:"r2_buckets"` + // Services used for Pages Functions. + Services map[string]ProjectGetResponseDeploymentConfigsPreviewService `json:"services"` + // Vectorize bindings used for Pages Functions. + VectorizeBindings map[string]ProjectGetResponseDeploymentConfigsPreviewVectorizeBinding `json:"vectorize_bindings"` + // Hash of the Wrangler configuration used for the deployment. + WranglerConfigHash string `json:"wrangler_config_hash"` + JSON projectGetResponseDeploymentConfigsPreviewJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewJSON contains the JSON metadata for +// the struct [ProjectGetResponseDeploymentConfigsPreview] +type projectGetResponseDeploymentConfigsPreviewJSON struct { + AlwaysUseLatestCompatibilityDate apijson.Field + BuildImageMajorVersion apijson.Field + CompatibilityDate apijson.Field + CompatibilityFlags apijson.Field + EnvVars apijson.Field + FailOpen apijson.Field + UsageModel apijson.Field + AIBindings apijson.Field + AnalyticsEngineDatasets apijson.Field + Browsers apijson.Field + D1Databases apijson.Field + DurableObjectNamespaces apijson.Field + HyperdriveBindings apijson.Field + KVNamespaces apijson.Field + Limits apijson.Field + MTLSCertificates apijson.Field + Placement apijson.Field + QueueProducers apijson.Field + R2Buckets apijson.Field + Services apijson.Field + VectorizeBindings apijson.Field + WranglerConfigHash apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreview) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewJSON) RawJSON() string { + return r.raw +} + +// A plaintext environment variable. +type ProjectGetResponseDeploymentConfigsPreviewEnvVar struct { + Type ProjectGetResponseDeploymentConfigsPreviewEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectGetResponseDeploymentConfigsPreviewEnvVarJSON `json:"-"` + union ProjectGetResponseDeploymentConfigsPreviewEnvVarsUnion +} + +// projectGetResponseDeploymentConfigsPreviewEnvVarJSON contains the JSON metadata +// for the struct [ProjectGetResponseDeploymentConfigsPreviewEnvVar] +type projectGetResponseDeploymentConfigsPreviewEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectGetResponseDeploymentConfigsPreviewEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectGetResponseDeploymentConfigsPreviewEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectGetResponseDeploymentConfigsPreviewEnvVarsUnion] +// interface which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar], +// [ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. +func (r ProjectGetResponseDeploymentConfigsPreviewEnvVar) AsUnion() ProjectGetResponseDeploymentConfigsPreviewEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] or +// [ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar]. +type ProjectGetResponseDeploymentConfigsPreviewEnvVarsUnion interface { + implementsProjectGetResponseDeploymentConfigsPreviewEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectGetResponseDeploymentConfigsPreviewEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar struct { + Type ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar] +type projectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) implementsProjectGetResponseDeploymentConfigsPreviewEnvVar() { +} + +type ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar struct { + Type ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar] +type projectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) implementsProjectGetResponseDeploymentConfigsPreviewEnvVar() { +} + +type ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectGetResponseDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectGetResponseDeploymentConfigsPreviewEnvVarsType string + +const ( + ProjectGetResponseDeploymentConfigsPreviewEnvVarsTypePlainText ProjectGetResponseDeploymentConfigsPreviewEnvVarsType = "plain_text" + ProjectGetResponseDeploymentConfigsPreviewEnvVarsTypeSecretText ProjectGetResponseDeploymentConfigsPreviewEnvVarsType = "secret_text" +) + +func (r ProjectGetResponseDeploymentConfigsPreviewEnvVarsType) IsKnown() bool { + switch r { + case ProjectGetResponseDeploymentConfigsPreviewEnvVarsTypePlainText, ProjectGetResponseDeploymentConfigsPreviewEnvVarsTypeSecretText: + return true + } + return false +} + +// The usage model for Pages Functions. +type ProjectGetResponseDeploymentConfigsPreviewUsageModel string + +const ( + ProjectGetResponseDeploymentConfigsPreviewUsageModelStandard ProjectGetResponseDeploymentConfigsPreviewUsageModel = "standard" + ProjectGetResponseDeploymentConfigsPreviewUsageModelBundled ProjectGetResponseDeploymentConfigsPreviewUsageModel = "bundled" + ProjectGetResponseDeploymentConfigsPreviewUsageModelUnbound ProjectGetResponseDeploymentConfigsPreviewUsageModel = "unbound" +) + +func (r ProjectGetResponseDeploymentConfigsPreviewUsageModel) IsKnown() bool { + switch r { + case ProjectGetResponseDeploymentConfigsPreviewUsageModelStandard, ProjectGetResponseDeploymentConfigsPreviewUsageModelBundled, ProjectGetResponseDeploymentConfigsPreviewUsageModelUnbound: + return true + } + return false +} + +// AI binding. +type ProjectGetResponseDeploymentConfigsPreviewAIBinding struct { + ProjectID string `json:"project_id,required"` + JSON projectGetResponseDeploymentConfigsPreviewAIBindingJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewAIBindingJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsPreviewAIBinding] +type projectGetResponseDeploymentConfigsPreviewAIBindingJSON struct { + ProjectID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewAIBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewAIBindingJSON) RawJSON() string { + return r.raw +} + +// Analytics Engine binding. +type ProjectGetResponseDeploymentConfigsPreviewAnalyticsEngineDataset struct { + // Name of the dataset. + Dataset string `json:"dataset,required"` + JSON projectGetResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON contains +// the JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsPreviewAnalyticsEngineDataset] +type projectGetResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON struct { + Dataset apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewAnalyticsEngineDatasetJSON) RawJSON() string { + return r.raw +} + +// Browser binding. +type ProjectGetResponseDeploymentConfigsPreviewBrowser struct { + JSON projectGetResponseDeploymentConfigsPreviewBrowserJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewBrowserJSON contains the JSON metadata +// for the struct [ProjectGetResponseDeploymentConfigsPreviewBrowser] +type projectGetResponseDeploymentConfigsPreviewBrowserJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewBrowser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewBrowserJSON) RawJSON() string { + return r.raw +} + +// D1 binding. +type ProjectGetResponseDeploymentConfigsPreviewD1Database struct { + // UUID of the D1 database. + ID string `json:"id,required"` + JSON projectGetResponseDeploymentConfigsPreviewD1DatabaseJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewD1DatabaseJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsPreviewD1Database] +type projectGetResponseDeploymentConfigsPreviewD1DatabaseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewD1Database) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewD1DatabaseJSON) RawJSON() string { + return r.raw +} + +// Durable Object binding. +type ProjectGetResponseDeploymentConfigsPreviewDurableObjectNamespace struct { + // ID of the Durable Object namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectGetResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON contains +// the JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsPreviewDurableObjectNamespace] +type projectGetResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewDurableObjectNamespaceJSON) RawJSON() string { + return r.raw +} + +// Hyperdrive binding. +type ProjectGetResponseDeploymentConfigsPreviewHyperdriveBinding struct { + ID string `json:"id,required"` + JSON projectGetResponseDeploymentConfigsPreviewHyperdriveBindingJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewHyperdriveBindingJSON contains the +// JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsPreviewHyperdriveBinding] +type projectGetResponseDeploymentConfigsPreviewHyperdriveBindingJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewHyperdriveBindingJSON) RawJSON() string { + return r.raw +} + +// KV namespace binding. +type ProjectGetResponseDeploymentConfigsPreviewKVNamespace struct { + // ID of the KV namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectGetResponseDeploymentConfigsPreviewKVNamespaceJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewKVNamespaceJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsPreviewKVNamespace] +type projectGetResponseDeploymentConfigsPreviewKVNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewKVNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewKVNamespaceJSON) RawJSON() string { + return r.raw +} + +// Limits for Pages Functions. +type ProjectGetResponseDeploymentConfigsPreviewLimits struct { + // CPU time limit in milliseconds. + CPUMs int64 `json:"cpu_ms,required"` + JSON projectGetResponseDeploymentConfigsPreviewLimitsJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewLimitsJSON contains the JSON metadata +// for the struct [ProjectGetResponseDeploymentConfigsPreviewLimits] +type projectGetResponseDeploymentConfigsPreviewLimitsJSON struct { + CPUMs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewLimits) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewLimitsJSON) RawJSON() string { + return r.raw +} + +// mTLS binding. +type ProjectGetResponseDeploymentConfigsPreviewMTLSCertificate struct { + CertificateID string `json:"certificate_id,required"` + JSON projectGetResponseDeploymentConfigsPreviewMTLSCertificateJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewMTLSCertificateJSON contains the JSON +// metadata for the struct +// [ProjectGetResponseDeploymentConfigsPreviewMTLSCertificate] +type projectGetResponseDeploymentConfigsPreviewMTLSCertificateJSON struct { + CertificateID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewMTLSCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewMTLSCertificateJSON) RawJSON() string { + return r.raw +} + +// Placement setting used for Pages Functions. +type ProjectGetResponseDeploymentConfigsPreviewPlacement struct { + // Placement mode. + Mode string `json:"mode,required"` + JSON projectGetResponseDeploymentConfigsPreviewPlacementJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewPlacementJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsPreviewPlacement] +type projectGetResponseDeploymentConfigsPreviewPlacementJSON struct { + Mode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewPlacement) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewPlacementJSON) RawJSON() string { + return r.raw +} + +// Queue Producer binding. +type ProjectGetResponseDeploymentConfigsPreviewQueueProducer struct { + // Name of the Queue. + Name string `json:"name,required"` + JSON projectGetResponseDeploymentConfigsPreviewQueueProducerJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewQueueProducerJSON contains the JSON +// metadata for the struct +// [ProjectGetResponseDeploymentConfigsPreviewQueueProducer] +type projectGetResponseDeploymentConfigsPreviewQueueProducerJSON struct { + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewQueueProducer) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewQueueProducerJSON) RawJSON() string { + return r.raw +} + +// R2 binding. +type ProjectGetResponseDeploymentConfigsPreviewR2Bucket struct { + // Name of the R2 bucket. + Name string `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction string `json:"jurisdiction,nullable"` + JSON projectGetResponseDeploymentConfigsPreviewR2BucketJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewR2BucketJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsPreviewR2Bucket] +type projectGetResponseDeploymentConfigsPreviewR2BucketJSON struct { + Name apijson.Field + Jurisdiction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewR2Bucket) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewR2BucketJSON) RawJSON() string { + return r.raw +} + +// Service binding. +type ProjectGetResponseDeploymentConfigsPreviewService struct { + // The Service environment. + Environment string `json:"environment,required"` + // The Service name. + Service string `json:"service,required"` + // The entrypoint to bind to. + Entrypoint string `json:"entrypoint,nullable"` + JSON projectGetResponseDeploymentConfigsPreviewServiceJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewServiceJSON contains the JSON metadata +// for the struct [ProjectGetResponseDeploymentConfigsPreviewService] +type projectGetResponseDeploymentConfigsPreviewServiceJSON struct { + Environment apijson.Field + Service apijson.Field + Entrypoint apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewService) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewServiceJSON) RawJSON() string { + return r.raw +} + +// Vectorize binding. +type ProjectGetResponseDeploymentConfigsPreviewVectorizeBinding struct { + IndexName string `json:"index_name,required"` + JSON projectGetResponseDeploymentConfigsPreviewVectorizeBindingJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsPreviewVectorizeBindingJSON contains the JSON +// metadata for the struct +// [ProjectGetResponseDeploymentConfigsPreviewVectorizeBinding] +type projectGetResponseDeploymentConfigsPreviewVectorizeBindingJSON struct { + IndexName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsPreviewVectorizeBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsPreviewVectorizeBindingJSON) RawJSON() string { + return r.raw +} + +// Configs for production deploys. +type ProjectGetResponseDeploymentConfigsProduction struct { + // Whether to always use the latest compatibility date for Pages Functions. + AlwaysUseLatestCompatibilityDate bool `json:"always_use_latest_compatibility_date,required"` + // The major version of the build image to use for Pages Functions. + BuildImageMajorVersion int64 `json:"build_image_major_version,required"` + // Compatibility date used for Pages Functions. + CompatibilityDate string `json:"compatibility_date,required"` + // Compatibility flags used for Pages Functions. + CompatibilityFlags []string `json:"compatibility_flags,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectGetResponseDeploymentConfigsProductionEnvVar `json:"env_vars,required,nullable"` + // Whether to fail open when the deployment config cannot be applied. + FailOpen bool `json:"fail_open,required"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel ProjectGetResponseDeploymentConfigsProductionUsageModel `json:"usage_model,required"` + // Constellation bindings used for Pages Functions. + AIBindings map[string]ProjectGetResponseDeploymentConfigsProductionAIBinding `json:"ai_bindings"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets map[string]ProjectGetResponseDeploymentConfigsProductionAnalyticsEngineDataset `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers map[string]ProjectGetResponseDeploymentConfigsProductionBrowser `json:"browsers"` + // D1 databases used for Pages Functions. + D1Databases map[string]ProjectGetResponseDeploymentConfigsProductionD1Database `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces map[string]ProjectGetResponseDeploymentConfigsProductionDurableObjectNamespace `json:"durable_object_namespaces"` + // Hyperdrive bindings used for Pages Functions. + HyperdriveBindings map[string]ProjectGetResponseDeploymentConfigsProductionHyperdriveBinding `json:"hyperdrive_bindings"` + // KV namespaces used for Pages Functions. + KVNamespaces map[string]ProjectGetResponseDeploymentConfigsProductionKVNamespace `json:"kv_namespaces"` + // Limits for Pages Functions. + Limits ProjectGetResponseDeploymentConfigsProductionLimits `json:"limits"` + // mTLS bindings used for Pages Functions. + MTLSCertificates map[string]ProjectGetResponseDeploymentConfigsProductionMTLSCertificate `json:"mtls_certificates"` + // Placement setting used for Pages Functions. + Placement ProjectGetResponseDeploymentConfigsProductionPlacement `json:"placement"` + // Queue Producer bindings used for Pages Functions. + QueueProducers map[string]ProjectGetResponseDeploymentConfigsProductionQueueProducer `json:"queue_producers"` + // R2 buckets used for Pages Functions. + R2Buckets map[string]ProjectGetResponseDeploymentConfigsProductionR2Bucket `json:"r2_buckets"` + // Services used for Pages Functions. + Services map[string]ProjectGetResponseDeploymentConfigsProductionService `json:"services"` + // Vectorize bindings used for Pages Functions. + VectorizeBindings map[string]ProjectGetResponseDeploymentConfigsProductionVectorizeBinding `json:"vectorize_bindings"` + // Hash of the Wrangler configuration used for the deployment. + WranglerConfigHash string `json:"wrangler_config_hash"` + JSON projectGetResponseDeploymentConfigsProductionJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionJSON contains the JSON metadata for +// the struct [ProjectGetResponseDeploymentConfigsProduction] +type projectGetResponseDeploymentConfigsProductionJSON struct { + AlwaysUseLatestCompatibilityDate apijson.Field + BuildImageMajorVersion apijson.Field + CompatibilityDate apijson.Field + CompatibilityFlags apijson.Field + EnvVars apijson.Field + FailOpen apijson.Field + UsageModel apijson.Field + AIBindings apijson.Field + AnalyticsEngineDatasets apijson.Field + Browsers apijson.Field + D1Databases apijson.Field + DurableObjectNamespaces apijson.Field + HyperdriveBindings apijson.Field + KVNamespaces apijson.Field + Limits apijson.Field + MTLSCertificates apijson.Field + Placement apijson.Field + QueueProducers apijson.Field + R2Buckets apijson.Field + Services apijson.Field + VectorizeBindings apijson.Field + WranglerConfigHash apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProduction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionJSON) RawJSON() string { + return r.raw +} + +// A plaintext environment variable. +type ProjectGetResponseDeploymentConfigsProductionEnvVar struct { + Type ProjectGetResponseDeploymentConfigsProductionEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectGetResponseDeploymentConfigsProductionEnvVarJSON `json:"-"` + union ProjectGetResponseDeploymentConfigsProductionEnvVarsUnion +} + +// projectGetResponseDeploymentConfigsProductionEnvVarJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsProductionEnvVar] +type projectGetResponseDeploymentConfigsProductionEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectGetResponseDeploymentConfigsProductionEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectGetResponseDeploymentConfigsProductionEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectGetResponseDeploymentConfigsProductionEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectGetResponseDeploymentConfigsProductionEnvVarsUnion] +// interface which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar], +// [ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. +func (r ProjectGetResponseDeploymentConfigsProductionEnvVar) AsUnion() ProjectGetResponseDeploymentConfigsProductionEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] or +// [ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar]. +type ProjectGetResponseDeploymentConfigsProductionEnvVarsUnion interface { + implementsProjectGetResponseDeploymentConfigsProductionEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectGetResponseDeploymentConfigsProductionEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar struct { + Type ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar] +type projectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) implementsProjectGetResponseDeploymentConfigsProductionEnvVar() { +} + +type ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar struct { + Type ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON +// contains the JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar] +type projectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) implementsProjectGetResponseDeploymentConfigsProductionEnvVar() { +} + +type ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectGetResponseDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectGetResponseDeploymentConfigsProductionEnvVarsType string + +const ( + ProjectGetResponseDeploymentConfigsProductionEnvVarsTypePlainText ProjectGetResponseDeploymentConfigsProductionEnvVarsType = "plain_text" + ProjectGetResponseDeploymentConfigsProductionEnvVarsTypeSecretText ProjectGetResponseDeploymentConfigsProductionEnvVarsType = "secret_text" +) + +func (r ProjectGetResponseDeploymentConfigsProductionEnvVarsType) IsKnown() bool { + switch r { + case ProjectGetResponseDeploymentConfigsProductionEnvVarsTypePlainText, ProjectGetResponseDeploymentConfigsProductionEnvVarsTypeSecretText: + return true + } + return false +} + +// The usage model for Pages Functions. +type ProjectGetResponseDeploymentConfigsProductionUsageModel string + +const ( + ProjectGetResponseDeploymentConfigsProductionUsageModelStandard ProjectGetResponseDeploymentConfigsProductionUsageModel = "standard" + ProjectGetResponseDeploymentConfigsProductionUsageModelBundled ProjectGetResponseDeploymentConfigsProductionUsageModel = "bundled" + ProjectGetResponseDeploymentConfigsProductionUsageModelUnbound ProjectGetResponseDeploymentConfigsProductionUsageModel = "unbound" +) + +func (r ProjectGetResponseDeploymentConfigsProductionUsageModel) IsKnown() bool { + switch r { + case ProjectGetResponseDeploymentConfigsProductionUsageModelStandard, ProjectGetResponseDeploymentConfigsProductionUsageModelBundled, ProjectGetResponseDeploymentConfigsProductionUsageModelUnbound: + return true + } + return false +} + +// AI binding. +type ProjectGetResponseDeploymentConfigsProductionAIBinding struct { + ProjectID string `json:"project_id,required"` + JSON projectGetResponseDeploymentConfigsProductionAIBindingJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionAIBindingJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsProductionAIBinding] +type projectGetResponseDeploymentConfigsProductionAIBindingJSON struct { + ProjectID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionAIBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionAIBindingJSON) RawJSON() string { + return r.raw +} + +// Analytics Engine binding. +type ProjectGetResponseDeploymentConfigsProductionAnalyticsEngineDataset struct { + // Name of the dataset. + Dataset string `json:"dataset,required"` + JSON projectGetResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON contains +// the JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionAnalyticsEngineDataset] +type projectGetResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON struct { + Dataset apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionAnalyticsEngineDataset) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionAnalyticsEngineDatasetJSON) RawJSON() string { + return r.raw +} + +// Browser binding. +type ProjectGetResponseDeploymentConfigsProductionBrowser struct { + JSON projectGetResponseDeploymentConfigsProductionBrowserJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionBrowserJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsProductionBrowser] +type projectGetResponseDeploymentConfigsProductionBrowserJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionBrowser) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionBrowserJSON) RawJSON() string { + return r.raw +} + +// D1 binding. +type ProjectGetResponseDeploymentConfigsProductionD1Database struct { + // UUID of the D1 database. + ID string `json:"id,required"` + JSON projectGetResponseDeploymentConfigsProductionD1DatabaseJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionD1DatabaseJSON contains the JSON +// metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionD1Database] +type projectGetResponseDeploymentConfigsProductionD1DatabaseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionD1Database) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionD1DatabaseJSON) RawJSON() string { + return r.raw +} + +// Durable Object binding. +type ProjectGetResponseDeploymentConfigsProductionDurableObjectNamespace struct { + // ID of the Durable Object namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectGetResponseDeploymentConfigsProductionDurableObjectNamespaceJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionDurableObjectNamespaceJSON contains +// the JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionDurableObjectNamespace] +type projectGetResponseDeploymentConfigsProductionDurableObjectNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionDurableObjectNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionDurableObjectNamespaceJSON) RawJSON() string { + return r.raw +} + +// Hyperdrive binding. +type ProjectGetResponseDeploymentConfigsProductionHyperdriveBinding struct { + ID string `json:"id,required"` + JSON projectGetResponseDeploymentConfigsProductionHyperdriveBindingJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionHyperdriveBindingJSON contains the +// JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionHyperdriveBinding] +type projectGetResponseDeploymentConfigsProductionHyperdriveBindingJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionHyperdriveBindingJSON) RawJSON() string { + return r.raw +} + +// KV namespace binding. +type ProjectGetResponseDeploymentConfigsProductionKVNamespace struct { + // ID of the KV namespace. + NamespaceID string `json:"namespace_id,required"` + JSON projectGetResponseDeploymentConfigsProductionKVNamespaceJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionKVNamespaceJSON contains the JSON +// metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionKVNamespace] +type projectGetResponseDeploymentConfigsProductionKVNamespaceJSON struct { + NamespaceID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionKVNamespace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionKVNamespaceJSON) RawJSON() string { + return r.raw +} + +// Limits for Pages Functions. +type ProjectGetResponseDeploymentConfigsProductionLimits struct { + // CPU time limit in milliseconds. + CPUMs int64 `json:"cpu_ms,required"` + JSON projectGetResponseDeploymentConfigsProductionLimitsJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionLimitsJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsProductionLimits] +type projectGetResponseDeploymentConfigsProductionLimitsJSON struct { + CPUMs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionLimits) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionLimitsJSON) RawJSON() string { + return r.raw +} + +// mTLS binding. +type ProjectGetResponseDeploymentConfigsProductionMTLSCertificate struct { + CertificateID string `json:"certificate_id,required"` + JSON projectGetResponseDeploymentConfigsProductionMTLSCertificateJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionMTLSCertificateJSON contains the +// JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionMTLSCertificate] +type projectGetResponseDeploymentConfigsProductionMTLSCertificateJSON struct { + CertificateID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionMTLSCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionMTLSCertificateJSON) RawJSON() string { + return r.raw +} + +// Placement setting used for Pages Functions. +type ProjectGetResponseDeploymentConfigsProductionPlacement struct { + // Placement mode. + Mode string `json:"mode,required"` + JSON projectGetResponseDeploymentConfigsProductionPlacementJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionPlacementJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsProductionPlacement] +type projectGetResponseDeploymentConfigsProductionPlacementJSON struct { + Mode apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionPlacement) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionPlacementJSON) RawJSON() string { + return r.raw +} + +// Queue Producer binding. +type ProjectGetResponseDeploymentConfigsProductionQueueProducer struct { + // Name of the Queue. + Name string `json:"name,required"` + JSON projectGetResponseDeploymentConfigsProductionQueueProducerJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionQueueProducerJSON contains the JSON +// metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionQueueProducer] +type projectGetResponseDeploymentConfigsProductionQueueProducerJSON struct { + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionQueueProducer) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionQueueProducerJSON) RawJSON() string { + return r.raw +} + +// R2 binding. +type ProjectGetResponseDeploymentConfigsProductionR2Bucket struct { + // Name of the R2 bucket. + Name string `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction string `json:"jurisdiction,nullable"` + JSON projectGetResponseDeploymentConfigsProductionR2BucketJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionR2BucketJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsProductionR2Bucket] +type projectGetResponseDeploymentConfigsProductionR2BucketJSON struct { + Name apijson.Field + Jurisdiction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionR2Bucket) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionR2BucketJSON) RawJSON() string { + return r.raw +} + +// Service binding. +type ProjectGetResponseDeploymentConfigsProductionService struct { + // The Service environment. + Environment string `json:"environment,required"` + // The Service name. + Service string `json:"service,required"` + // The entrypoint to bind to. + Entrypoint string `json:"entrypoint,nullable"` + JSON projectGetResponseDeploymentConfigsProductionServiceJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionServiceJSON contains the JSON +// metadata for the struct [ProjectGetResponseDeploymentConfigsProductionService] +type projectGetResponseDeploymentConfigsProductionServiceJSON struct { + Environment apijson.Field + Service apijson.Field + Entrypoint apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionService) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionServiceJSON) RawJSON() string { + return r.raw +} + +// Vectorize binding. +type ProjectGetResponseDeploymentConfigsProductionVectorizeBinding struct { + IndexName string `json:"index_name,required"` + JSON projectGetResponseDeploymentConfigsProductionVectorizeBindingJSON `json:"-"` +} + +// projectGetResponseDeploymentConfigsProductionVectorizeBindingJSON contains the +// JSON metadata for the struct +// [ProjectGetResponseDeploymentConfigsProductionVectorizeBinding] +type projectGetResponseDeploymentConfigsProductionVectorizeBindingJSON struct { + IndexName apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseDeploymentConfigsProductionVectorizeBinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseDeploymentConfigsProductionVectorizeBindingJSON) RawJSON() string { + return r.raw +} + +// Most recent deployment of the project. +type ProjectGetResponseLatestDeployment struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectGetResponseLatestDeploymentBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectGetResponseLatestDeploymentDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectGetResponseLatestDeploymentEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectGetResponseLatestDeploymentEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectGetResponseLatestDeploymentSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectGetResponseLatestDeploymentJSON `json:"-"` +} + +// projectGetResponseLatestDeploymentJSON contains the JSON metadata for the struct +// [ProjectGetResponseLatestDeployment] +type projectGetResponseLatestDeploymentJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseLatestDeployment) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseLatestDeploymentJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectGetResponseLatestDeploymentBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectGetResponseLatestDeploymentBuildConfigJSON `json:"-"` +} + +// projectGetResponseLatestDeploymentBuildConfigJSON contains the JSON metadata for +// the struct [ProjectGetResponseLatestDeploymentBuildConfig] +type projectGetResponseLatestDeploymentBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseLatestDeploymentBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseLatestDeploymentBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectGetResponseLatestDeploymentDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectGetResponseLatestDeploymentDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectGetResponseLatestDeploymentDeploymentTriggerType `json:"type,required"` + JSON projectGetResponseLatestDeploymentDeploymentTriggerJSON `json:"-"` +} + +// projectGetResponseLatestDeploymentDeploymentTriggerJSON contains the JSON +// metadata for the struct [ProjectGetResponseLatestDeploymentDeploymentTrigger] +type projectGetResponseLatestDeploymentDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseLatestDeploymentDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseLatestDeploymentDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectGetResponseLatestDeploymentDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectGetResponseLatestDeploymentDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectGetResponseLatestDeploymentDeploymentTriggerMetadataJSON contains the +// JSON metadata for the struct +// [ProjectGetResponseLatestDeploymentDeploymentTriggerMetadata] +type projectGetResponseLatestDeploymentDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseLatestDeploymentDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseLatestDeploymentDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectGetResponseLatestDeploymentDeploymentTriggerType string + +const ( + ProjectGetResponseLatestDeploymentDeploymentTriggerTypeGitHubPush ProjectGetResponseLatestDeploymentDeploymentTriggerType = "github:push" + ProjectGetResponseLatestDeploymentDeploymentTriggerTypeADHoc ProjectGetResponseLatestDeploymentDeploymentTriggerType = "ad_hoc" + ProjectGetResponseLatestDeploymentDeploymentTriggerTypeDeployHook ProjectGetResponseLatestDeploymentDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectGetResponseLatestDeploymentDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectGetResponseLatestDeploymentDeploymentTriggerTypeGitHubPush, ProjectGetResponseLatestDeploymentDeploymentTriggerTypeADHoc, ProjectGetResponseLatestDeploymentDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectGetResponseLatestDeploymentEnvVar struct { + Type ProjectGetResponseLatestDeploymentEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectGetResponseLatestDeploymentEnvVarJSON `json:"-"` + union ProjectGetResponseLatestDeploymentEnvVarsUnion +} + +// projectGetResponseLatestDeploymentEnvVarJSON contains the JSON metadata for the +// struct [ProjectGetResponseLatestDeploymentEnvVar] +type projectGetResponseLatestDeploymentEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectGetResponseLatestDeploymentEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectGetResponseLatestDeploymentEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectGetResponseLatestDeploymentEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectGetResponseLatestDeploymentEnvVarsUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar], +// [ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar]. +func (r ProjectGetResponseLatestDeploymentEnvVar) AsUnion() ProjectGetResponseLatestDeploymentEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar] or +// [ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar]. +type ProjectGetResponseLatestDeploymentEnvVarsUnion interface { + implementsProjectGetResponseLatestDeploymentEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectGetResponseLatestDeploymentEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar struct { + Type ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar] +type projectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVar) implementsProjectGetResponseLatestDeploymentEnvVar() { +} + +type ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectGetResponseLatestDeploymentEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar struct { + Type ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar] +type projectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVar) implementsProjectGetResponseLatestDeploymentEnvVar() { +} + +type ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectGetResponseLatestDeploymentEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectGetResponseLatestDeploymentEnvVarsType string + +const ( + ProjectGetResponseLatestDeploymentEnvVarsTypePlainText ProjectGetResponseLatestDeploymentEnvVarsType = "plain_text" + ProjectGetResponseLatestDeploymentEnvVarsTypeSecretText ProjectGetResponseLatestDeploymentEnvVarsType = "secret_text" +) + +func (r ProjectGetResponseLatestDeploymentEnvVarsType) IsKnown() bool { + switch r { + case ProjectGetResponseLatestDeploymentEnvVarsTypePlainText, ProjectGetResponseLatestDeploymentEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectGetResponseLatestDeploymentEnvironment string + +const ( + ProjectGetResponseLatestDeploymentEnvironmentPreview ProjectGetResponseLatestDeploymentEnvironment = "preview" + ProjectGetResponseLatestDeploymentEnvironmentProduction ProjectGetResponseLatestDeploymentEnvironment = "production" +) + +func (r ProjectGetResponseLatestDeploymentEnvironment) IsKnown() bool { + switch r { + case ProjectGetResponseLatestDeploymentEnvironmentPreview, ProjectGetResponseLatestDeploymentEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectGetResponseLatestDeploymentSource struct { + Config ProjectGetResponseLatestDeploymentSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectGetResponseLatestDeploymentSourceType `json:"type,required"` + JSON projectGetResponseLatestDeploymentSourceJSON `json:"-"` +} + +// projectGetResponseLatestDeploymentSourceJSON contains the JSON metadata for the +// struct [ProjectGetResponseLatestDeploymentSource] +type projectGetResponseLatestDeploymentSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseLatestDeploymentSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseLatestDeploymentSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectGetResponseLatestDeploymentSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectGetResponseLatestDeploymentSourceConfigJSON `json:"-"` +} + +// projectGetResponseLatestDeploymentSourceConfigJSON contains the JSON metadata +// for the struct [ProjectGetResponseLatestDeploymentSourceConfig] +type projectGetResponseLatestDeploymentSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseLatestDeploymentSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseLatestDeploymentSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSetting string + +const ( + ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSettingAll ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "all" + ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSettingNone ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "none" + ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSettingCustom ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSettingAll, ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSettingNone, ProjectGetResponseLatestDeploymentSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectGetResponseLatestDeploymentSourceType string + +const ( + ProjectGetResponseLatestDeploymentSourceTypeGitHub ProjectGetResponseLatestDeploymentSourceType = "github" + ProjectGetResponseLatestDeploymentSourceTypeGitlab ProjectGetResponseLatestDeploymentSourceType = "gitlab" +) + +func (r ProjectGetResponseLatestDeploymentSourceType) IsKnown() bool { + switch r { + case ProjectGetResponseLatestDeploymentSourceTypeGitHub, ProjectGetResponseLatestDeploymentSourceTypeGitlab: + return true + } + return false +} + +// Configs for the project build process. +type ProjectGetResponseBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectGetResponseBuildConfigJSON `json:"-"` +} + +// projectGetResponseBuildConfigJSON contains the JSON metadata for the struct +// [ProjectGetResponseBuildConfig] +type projectGetResponseBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Configs for the project source control. +type ProjectGetResponseSource struct { + Config ProjectGetResponseSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectGetResponseSourceType `json:"type,required"` + JSON projectGetResponseSourceJSON `json:"-"` +} + +// projectGetResponseSourceJSON contains the JSON metadata for the struct +// [ProjectGetResponseSource] +type projectGetResponseSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectGetResponseSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectGetResponseSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectGetResponseSourceConfigJSON `json:"-"` +} + +// projectGetResponseSourceConfigJSON contains the JSON metadata for the struct +// [ProjectGetResponseSourceConfig] +type projectGetResponseSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectGetResponseSourceConfigPreviewDeploymentSetting string + +const ( + ProjectGetResponseSourceConfigPreviewDeploymentSettingAll ProjectGetResponseSourceConfigPreviewDeploymentSetting = "all" + ProjectGetResponseSourceConfigPreviewDeploymentSettingNone ProjectGetResponseSourceConfigPreviewDeploymentSetting = "none" + ProjectGetResponseSourceConfigPreviewDeploymentSettingCustom ProjectGetResponseSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectGetResponseSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectGetResponseSourceConfigPreviewDeploymentSettingAll, ProjectGetResponseSourceConfigPreviewDeploymentSettingNone, ProjectGetResponseSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectGetResponseSourceType string + +const ( + ProjectGetResponseSourceTypeGitHub ProjectGetResponseSourceType = "github" + ProjectGetResponseSourceTypeGitlab ProjectGetResponseSourceType = "gitlab" +) + +func (r ProjectGetResponseSourceType) IsKnown() bool { + switch r { + case ProjectGetResponseSourceTypeGitHub, ProjectGetResponseSourceTypeGitlab: + return true + } + return false +} + +type ProjectPurgeBuildCacheResponse = interface{} + +type ProjectNewParams struct { + // Identifier. + AccountID param.Field[string] `path:"account_id,required"` + // Name of the project. + Name param.Field[string] `json:"name,required"` + // Production branch of the project. Used to identify production deployments. + ProductionBranch param.Field[string] `json:"production_branch,required"` + // Configs for the project build process. + BuildConfig param.Field[ProjectNewParamsBuildConfig] `json:"build_config"` + // Configs for deployments in a project. + DeploymentConfigs param.Field[ProjectNewParamsDeploymentConfigs] `json:"deployment_configs"` + // Configs for the project source control. + Source param.Field[ProjectNewParamsSource] `json:"source"` +} + +func (r ProjectNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Configs for the project build process. +type ProjectNewParamsBuildConfig struct { + // Enable build caching for the project. + BuildCaching param.Field[bool] `json:"build_caching"` + // Command used to build project. + BuildCommand param.Field[string] `json:"build_command"` + // Output directory of the build. + DestinationDir param.Field[string] `json:"destination_dir"` + // Directory to run the command. + RootDir param.Field[string] `json:"root_dir"` + // The classifying tag for analytics. + WebAnalyticsTag param.Field[string] `json:"web_analytics_tag"` + // The auth token for analytics. + WebAnalyticsToken param.Field[string] `json:"web_analytics_token"` +} + +func (r ProjectNewParamsBuildConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Configs for deployments in a project. +type ProjectNewParamsDeploymentConfigs struct { + // Configs for preview deploys. + Preview param.Field[ProjectNewParamsDeploymentConfigsPreview] `json:"preview"` + // Configs for production deploys. + Production param.Field[ProjectNewParamsDeploymentConfigsProduction] `json:"production"` +} + +func (r ProjectNewParamsDeploymentConfigs) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Configs for preview deploys. +type ProjectNewParamsDeploymentConfigsPreview struct { + // Constellation bindings used for Pages Functions. + AIBindings param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewAIBindings] `json:"ai_bindings"` + // Whether to always use the latest compatibility date for Pages Functions. + AlwaysUseLatestCompatibilityDate param.Field[bool] `json:"always_use_latest_compatibility_date"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewAnalyticsEngineDatasets] `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewBrowsers] `json:"browsers"` + // The major version of the build image to use for Pages Functions. + BuildImageMajorVersion param.Field[int64] `json:"build_image_major_version"` + // Compatibility date used for Pages Functions. + CompatibilityDate param.Field[string] `json:"compatibility_date"` + // Compatibility flags used for Pages Functions. + CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"` + // D1 databases used for Pages Functions. + D1Databases param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewD1Databases] `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewDurableObjectNamespaces] `json:"durable_object_namespaces"` + // Environment variables used for builds and Pages Functions. + EnvVars param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewEnvVarsUnion] `json:"env_vars"` + // Whether to fail open when the deployment config cannot be applied. + FailOpen param.Field[bool] `json:"fail_open"` + // Hyperdrive bindings used for Pages Functions. + HyperdriveBindings param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewHyperdriveBindings] `json:"hyperdrive_bindings"` + // KV namespaces used for Pages Functions. + KVNamespaces param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewKVNamespaces] `json:"kv_namespaces"` + // Limits for Pages Functions. + Limits param.Field[ProjectNewParamsDeploymentConfigsPreviewLimits] `json:"limits"` + // mTLS bindings used for Pages Functions. + MTLSCertificates param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewMTLSCertificates] `json:"mtls_certificates"` + // Placement setting used for Pages Functions. + Placement param.Field[ProjectNewParamsDeploymentConfigsPreviewPlacement] `json:"placement"` + // Queue Producer bindings used for Pages Functions. + QueueProducers param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewQueueProducers] `json:"queue_producers"` + // R2 buckets used for Pages Functions. + R2Buckets param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewR2Buckets] `json:"r2_buckets"` + // Services used for Pages Functions. + Services param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewServices] `json:"services"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel param.Field[ProjectNewParamsDeploymentConfigsPreviewUsageModel] `json:"usage_model"` + // Vectorize bindings used for Pages Functions. + VectorizeBindings param.Field[map[string]ProjectNewParamsDeploymentConfigsPreviewVectorizeBindings] `json:"vectorize_bindings"` + // Hash of the Wrangler configuration used for the deployment. + WranglerConfigHash param.Field[string] `json:"wrangler_config_hash"` +} + +func (r ProjectNewParamsDeploymentConfigsPreview) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// AI binding. +type ProjectNewParamsDeploymentConfigsPreviewAIBindings struct { + ProjectID param.Field[string] `json:"project_id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewAIBindings) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Analytics Engine binding. +type ProjectNewParamsDeploymentConfigsPreviewAnalyticsEngineDatasets struct { + // Name of the dataset. + Dataset param.Field[string] `json:"dataset,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewAnalyticsEngineDatasets) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Browser binding. +type ProjectNewParamsDeploymentConfigsPreviewBrowsers struct { +} + +func (r ProjectNewParamsDeploymentConfigsPreviewBrowsers) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// D1 binding. +type ProjectNewParamsDeploymentConfigsPreviewD1Databases struct { + // UUID of the D1 database. + ID param.Field[string] `json:"id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewD1Databases) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Durable Object binding. +type ProjectNewParamsDeploymentConfigsPreviewDurableObjectNamespaces struct { + // ID of the Durable Object namespace. + NamespaceID param.Field[string] `json:"namespace_id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewDurableObjectNamespaces) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// A plaintext environment variable. +type ProjectNewParamsDeploymentConfigsPreviewEnvVars struct { + Type param.Field[ProjectNewParamsDeploymentConfigsPreviewEnvVarsType] `json:"type,required"` + // Environment variable value. + Value param.Field[string] `json:"value,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewEnvVars) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r ProjectNewParamsDeploymentConfigsPreviewEnvVars) implementsProjectNewParamsDeploymentConfigsPreviewEnvVarsUnion() { +} + +// A plaintext environment variable. +// +// Satisfied by +// [pages.ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar], +// [pages.ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar], +// [ProjectNewParamsDeploymentConfigsPreviewEnvVars]. +type ProjectNewParamsDeploymentConfigsPreviewEnvVarsUnion interface { + implementsProjectNewParamsDeploymentConfigsPreviewEnvVarsUnion() +} + +// A plaintext environment variable. +type ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar struct { + Type param.Field[ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType] `json:"type,required"` + // Environment variable value. + Value param.Field[string] `json:"value,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) implementsProjectNewParamsDeploymentConfigsPreviewEnvVarsUnion() { +} + +type ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar struct { + Type param.Field[ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType] `json:"type,required"` + // Secret value. + Value param.Field[string] `json:"value,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) implementsProjectNewParamsDeploymentConfigsPreviewEnvVarsUnion() { +} + +type ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectNewParamsDeploymentConfigsPreviewEnvVarsType string + +const ( + ProjectNewParamsDeploymentConfigsPreviewEnvVarsTypePlainText ProjectNewParamsDeploymentConfigsPreviewEnvVarsType = "plain_text" + ProjectNewParamsDeploymentConfigsPreviewEnvVarsTypeSecretText ProjectNewParamsDeploymentConfigsPreviewEnvVarsType = "secret_text" +) + +func (r ProjectNewParamsDeploymentConfigsPreviewEnvVarsType) IsKnown() bool { + switch r { + case ProjectNewParamsDeploymentConfigsPreviewEnvVarsTypePlainText, ProjectNewParamsDeploymentConfigsPreviewEnvVarsTypeSecretText: + return true + } + return false +} + +// Hyperdrive binding. +type ProjectNewParamsDeploymentConfigsPreviewHyperdriveBindings struct { + ID param.Field[string] `json:"id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewHyperdriveBindings) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// KV namespace binding. +type ProjectNewParamsDeploymentConfigsPreviewKVNamespaces struct { + // ID of the KV namespace. + NamespaceID param.Field[string] `json:"namespace_id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewKVNamespaces) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Limits for Pages Functions. +type ProjectNewParamsDeploymentConfigsPreviewLimits struct { + // CPU time limit in milliseconds. + CPUMs param.Field[int64] `json:"cpu_ms,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewLimits) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// mTLS binding. +type ProjectNewParamsDeploymentConfigsPreviewMTLSCertificates struct { + CertificateID param.Field[string] `json:"certificate_id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewMTLSCertificates) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Placement setting used for Pages Functions. +type ProjectNewParamsDeploymentConfigsPreviewPlacement struct { + // Placement mode. + Mode param.Field[string] `json:"mode,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewPlacement) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Queue Producer binding. +type ProjectNewParamsDeploymentConfigsPreviewQueueProducers struct { + // Name of the Queue. + Name param.Field[string] `json:"name,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewQueueProducers) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// R2 binding. +type ProjectNewParamsDeploymentConfigsPreviewR2Buckets struct { + // Name of the R2 bucket. + Name param.Field[string] `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction param.Field[string] `json:"jurisdiction"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewR2Buckets) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Service binding. +type ProjectNewParamsDeploymentConfigsPreviewServices struct { + // The Service name. + Service param.Field[string] `json:"service,required"` + // The entrypoint to bind to. + Entrypoint param.Field[string] `json:"entrypoint"` + // The Service environment. + Environment param.Field[string] `json:"environment"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewServices) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The usage model for Pages Functions. +type ProjectNewParamsDeploymentConfigsPreviewUsageModel string + +const ( + ProjectNewParamsDeploymentConfigsPreviewUsageModelStandard ProjectNewParamsDeploymentConfigsPreviewUsageModel = "standard" + ProjectNewParamsDeploymentConfigsPreviewUsageModelBundled ProjectNewParamsDeploymentConfigsPreviewUsageModel = "bundled" + ProjectNewParamsDeploymentConfigsPreviewUsageModelUnbound ProjectNewParamsDeploymentConfigsPreviewUsageModel = "unbound" +) + +func (r ProjectNewParamsDeploymentConfigsPreviewUsageModel) IsKnown() bool { + switch r { + case ProjectNewParamsDeploymentConfigsPreviewUsageModelStandard, ProjectNewParamsDeploymentConfigsPreviewUsageModelBundled, ProjectNewParamsDeploymentConfigsPreviewUsageModelUnbound: + return true + } + return false +} + +// Vectorize binding. +type ProjectNewParamsDeploymentConfigsPreviewVectorizeBindings struct { + IndexName param.Field[string] `json:"index_name,required"` +} + +func (r ProjectNewParamsDeploymentConfigsPreviewVectorizeBindings) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Configs for production deploys. +type ProjectNewParamsDeploymentConfigsProduction struct { + // Constellation bindings used for Pages Functions. + AIBindings param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionAIBindings] `json:"ai_bindings"` + // Whether to always use the latest compatibility date for Pages Functions. + AlwaysUseLatestCompatibilityDate param.Field[bool] `json:"always_use_latest_compatibility_date"` + // Analytics Engine bindings used for Pages Functions. + AnalyticsEngineDatasets param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionAnalyticsEngineDatasets] `json:"analytics_engine_datasets"` + // Browser bindings used for Pages Functions. + Browsers param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionBrowsers] `json:"browsers"` + // The major version of the build image to use for Pages Functions. + BuildImageMajorVersion param.Field[int64] `json:"build_image_major_version"` + // Compatibility date used for Pages Functions. + CompatibilityDate param.Field[string] `json:"compatibility_date"` + // Compatibility flags used for Pages Functions. + CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"` + // D1 databases used for Pages Functions. + D1Databases param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionD1Databases] `json:"d1_databases"` + // Durable Object namespaces used for Pages Functions. + DurableObjectNamespaces param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionDurableObjectNamespaces] `json:"durable_object_namespaces"` + // Environment variables used for builds and Pages Functions. + EnvVars param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionEnvVarsUnion] `json:"env_vars"` + // Whether to fail open when the deployment config cannot be applied. + FailOpen param.Field[bool] `json:"fail_open"` + // Hyperdrive bindings used for Pages Functions. + HyperdriveBindings param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionHyperdriveBindings] `json:"hyperdrive_bindings"` + // KV namespaces used for Pages Functions. + KVNamespaces param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionKVNamespaces] `json:"kv_namespaces"` + // Limits for Pages Functions. + Limits param.Field[ProjectNewParamsDeploymentConfigsProductionLimits] `json:"limits"` + // mTLS bindings used for Pages Functions. + MTLSCertificates param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionMTLSCertificates] `json:"mtls_certificates"` + // Placement setting used for Pages Functions. + Placement param.Field[ProjectNewParamsDeploymentConfigsProductionPlacement] `json:"placement"` + // Queue Producer bindings used for Pages Functions. + QueueProducers param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionQueueProducers] `json:"queue_producers"` + // R2 buckets used for Pages Functions. + R2Buckets param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionR2Buckets] `json:"r2_buckets"` + // Services used for Pages Functions. + Services param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionServices] `json:"services"` + // The usage model for Pages Functions. + // + // Deprecated: All new projects now use the Standard usage model. + UsageModel param.Field[ProjectNewParamsDeploymentConfigsProductionUsageModel] `json:"usage_model"` + // Vectorize bindings used for Pages Functions. + VectorizeBindings param.Field[map[string]ProjectNewParamsDeploymentConfigsProductionVectorizeBindings] `json:"vectorize_bindings"` + // Hash of the Wrangler configuration used for the deployment. + WranglerConfigHash param.Field[string] `json:"wrangler_config_hash"` +} + +func (r ProjectNewParamsDeploymentConfigsProduction) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// AI binding. +type ProjectNewParamsDeploymentConfigsProductionAIBindings struct { + ProjectID param.Field[string] `json:"project_id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionAIBindings) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Analytics Engine binding. +type ProjectNewParamsDeploymentConfigsProductionAnalyticsEngineDatasets struct { + // Name of the dataset. + Dataset param.Field[string] `json:"dataset,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionAnalyticsEngineDatasets) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Browser binding. +type ProjectNewParamsDeploymentConfigsProductionBrowsers struct { +} + +func (r ProjectNewParamsDeploymentConfigsProductionBrowsers) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// D1 binding. +type ProjectNewParamsDeploymentConfigsProductionD1Databases struct { + // UUID of the D1 database. + ID param.Field[string] `json:"id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionD1Databases) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Durable Object binding. +type ProjectNewParamsDeploymentConfigsProductionDurableObjectNamespaces struct { + // ID of the Durable Object namespace. + NamespaceID param.Field[string] `json:"namespace_id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionDurableObjectNamespaces) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// A plaintext environment variable. +type ProjectNewParamsDeploymentConfigsProductionEnvVars struct { + Type param.Field[ProjectNewParamsDeploymentConfigsProductionEnvVarsType] `json:"type,required"` + // Environment variable value. + Value param.Field[string] `json:"value,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionEnvVars) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r ProjectNewParamsDeploymentConfigsProductionEnvVars) implementsProjectNewParamsDeploymentConfigsProductionEnvVarsUnion() { +} + +// A plaintext environment variable. +// +// Satisfied by +// [pages.ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar], +// [pages.ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar], +// [ProjectNewParamsDeploymentConfigsProductionEnvVars]. +type ProjectNewParamsDeploymentConfigsProductionEnvVarsUnion interface { + implementsProjectNewParamsDeploymentConfigsProductionEnvVarsUnion() +} + +// A plaintext environment variable. +type ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar struct { + Type param.Field[ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType] `json:"type,required"` + // Environment variable value. + Value param.Field[string] `json:"value,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) implementsProjectNewParamsDeploymentConfigsProductionEnvVarsUnion() { +} + +type ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar struct { + Type param.Field[ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType] `json:"type,required"` + // Secret value. + Value param.Field[string] `json:"value,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) implementsProjectNewParamsDeploymentConfigsProductionEnvVarsUnion() { +} + +type ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectNewParamsDeploymentConfigsProductionEnvVarsType string + +const ( + ProjectNewParamsDeploymentConfigsProductionEnvVarsTypePlainText ProjectNewParamsDeploymentConfigsProductionEnvVarsType = "plain_text" + ProjectNewParamsDeploymentConfigsProductionEnvVarsTypeSecretText ProjectNewParamsDeploymentConfigsProductionEnvVarsType = "secret_text" +) + +func (r ProjectNewParamsDeploymentConfigsProductionEnvVarsType) IsKnown() bool { + switch r { + case ProjectNewParamsDeploymentConfigsProductionEnvVarsTypePlainText, ProjectNewParamsDeploymentConfigsProductionEnvVarsTypeSecretText: + return true + } + return false +} + +// Hyperdrive binding. +type ProjectNewParamsDeploymentConfigsProductionHyperdriveBindings struct { + ID param.Field[string] `json:"id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionHyperdriveBindings) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// KV namespace binding. +type ProjectNewParamsDeploymentConfigsProductionKVNamespaces struct { + // ID of the KV namespace. + NamespaceID param.Field[string] `json:"namespace_id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionKVNamespaces) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Limits for Pages Functions. +type ProjectNewParamsDeploymentConfigsProductionLimits struct { + // CPU time limit in milliseconds. + CPUMs param.Field[int64] `json:"cpu_ms,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionLimits) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// mTLS binding. +type ProjectNewParamsDeploymentConfigsProductionMTLSCertificates struct { + CertificateID param.Field[string] `json:"certificate_id,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionMTLSCertificates) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Placement setting used for Pages Functions. +type ProjectNewParamsDeploymentConfigsProductionPlacement struct { + // Placement mode. + Mode param.Field[string] `json:"mode,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionPlacement) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Queue Producer binding. +type ProjectNewParamsDeploymentConfigsProductionQueueProducers struct { + // Name of the Queue. + Name param.Field[string] `json:"name,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionQueueProducers) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// R2 binding. +type ProjectNewParamsDeploymentConfigsProductionR2Buckets struct { + // Name of the R2 bucket. + Name param.Field[string] `json:"name,required"` + // Jurisdiction of the R2 bucket. + Jurisdiction param.Field[string] `json:"jurisdiction"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionR2Buckets) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Service binding. +type ProjectNewParamsDeploymentConfigsProductionServices struct { + // The Service name. + Service param.Field[string] `json:"service,required"` + // The entrypoint to bind to. + Entrypoint param.Field[string] `json:"entrypoint"` + // The Service environment. + Environment param.Field[string] `json:"environment"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionServices) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// The usage model for Pages Functions. +type ProjectNewParamsDeploymentConfigsProductionUsageModel string + +const ( + ProjectNewParamsDeploymentConfigsProductionUsageModelStandard ProjectNewParamsDeploymentConfigsProductionUsageModel = "standard" + ProjectNewParamsDeploymentConfigsProductionUsageModelBundled ProjectNewParamsDeploymentConfigsProductionUsageModel = "bundled" + ProjectNewParamsDeploymentConfigsProductionUsageModelUnbound ProjectNewParamsDeploymentConfigsProductionUsageModel = "unbound" +) + +func (r ProjectNewParamsDeploymentConfigsProductionUsageModel) IsKnown() bool { + switch r { + case ProjectNewParamsDeploymentConfigsProductionUsageModelStandard, ProjectNewParamsDeploymentConfigsProductionUsageModelBundled, ProjectNewParamsDeploymentConfigsProductionUsageModelUnbound: + return true + } + return false +} + +// Vectorize binding. +type ProjectNewParamsDeploymentConfigsProductionVectorizeBindings struct { + IndexName param.Field[string] `json:"index_name,required"` +} + +func (r ProjectNewParamsDeploymentConfigsProductionVectorizeBindings) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Configs for the project source control. +type ProjectNewParamsSource struct { + Config param.Field[ProjectNewParamsSourceConfig] `json:"config,required"` + // The source control management provider. + Type param.Field[ProjectNewParamsSourceType] `json:"type,required"` +} + +func (r ProjectNewParamsSource) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type ProjectNewParamsSourceConfig struct { + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled param.Field[bool] `json:"deployments_enabled"` + // The owner of the repository. + Owner param.Field[string] `json:"owner"` + // The owner ID of the repository. + OwnerID param.Field[string] `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes param.Field[[]string] `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes param.Field[[]string] `json:"path_includes"` + // Whether to enable PR comments. + PrCommentsEnabled param.Field[bool] `json:"pr_comments_enabled"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes param.Field[[]string] `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes param.Field[[]string] `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting param.Field[ProjectNewParamsSourceConfigPreviewDeploymentSetting] `json:"preview_deployment_setting"` + // The production branch of the repository. + ProductionBranch param.Field[string] `json:"production_branch"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled param.Field[bool] `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID param.Field[string] `json:"repo_id"` + // The name of the repository. + RepoName param.Field[string] `json:"repo_name"` +} + +func (r ProjectNewParamsSourceConfig) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) } -type ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType string +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectNewParamsSourceConfigPreviewDeploymentSetting string const ( - ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType = "secret_text" + ProjectNewParamsSourceConfigPreviewDeploymentSettingAll ProjectNewParamsSourceConfigPreviewDeploymentSetting = "all" + ProjectNewParamsSourceConfigPreviewDeploymentSettingNone ProjectNewParamsSourceConfigPreviewDeploymentSetting = "none" + ProjectNewParamsSourceConfigPreviewDeploymentSettingCustom ProjectNewParamsSourceConfigPreviewDeploymentSetting = "custom" ) -func (r ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { +func (r ProjectNewParamsSourceConfigPreviewDeploymentSetting) IsKnown() bool { switch r { - case ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText: + case ProjectNewParamsSourceConfigPreviewDeploymentSettingAll, ProjectNewParamsSourceConfigPreviewDeploymentSettingNone, ProjectNewParamsSourceConfigPreviewDeploymentSettingCustom: return true } return false } -type ProjectDeploymentConfigsProductionEnvVarsType string +// The source control management provider. +type ProjectNewParamsSourceType string const ( - ProjectDeploymentConfigsProductionEnvVarsTypePlainText ProjectDeploymentConfigsProductionEnvVarsType = "plain_text" - ProjectDeploymentConfigsProductionEnvVarsTypeSecretText ProjectDeploymentConfigsProductionEnvVarsType = "secret_text" + ProjectNewParamsSourceTypeGitHub ProjectNewParamsSourceType = "github" + ProjectNewParamsSourceTypeGitlab ProjectNewParamsSourceType = "gitlab" ) -func (r ProjectDeploymentConfigsProductionEnvVarsType) IsKnown() bool { +func (r ProjectNewParamsSourceType) IsKnown() bool { switch r { - case ProjectDeploymentConfigsProductionEnvVarsTypePlainText, ProjectDeploymentConfigsProductionEnvVarsTypeSecretText: + case ProjectNewParamsSourceTypeGitHub, ProjectNewParamsSourceTypeGitlab: return true } return false } -// Hyperdrive binding. -type ProjectDeploymentConfigsProductionHyperdriveBinding struct { - ID string `json:"id"` - JSON projectDeploymentConfigsProductionHyperdriveBindingJSON `json:"-"` +type ProjectNewResponseEnvelope struct { + Errors []ProjectNewResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectNewResponseEnvelopeMessages `json:"messages,required"` + Result ProjectNewResponse `json:"result,required"` + // Whether the API call was successful. + Success ProjectNewResponseEnvelopeSuccess `json:"success,required"` + JSON projectNewResponseEnvelopeJSON `json:"-"` } -// projectDeploymentConfigsProductionHyperdriveBindingJSON contains the JSON -// metadata for the struct [ProjectDeploymentConfigsProductionHyperdriveBinding] -type projectDeploymentConfigsProductionHyperdriveBindingJSON struct { - ID apijson.Field +// projectNewResponseEnvelopeJSON contains the JSON metadata for the struct +// [ProjectNewResponseEnvelope] +type projectNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionHyperdriveBinding) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionHyperdriveBindingJSON) RawJSON() string { +func (r projectNewResponseEnvelopeJSON) RawJSON() string { return r.raw } -// KV namespace binding. -type ProjectDeploymentConfigsProductionKVNamespace struct { - // ID of the KV namespace. - NamespaceID string `json:"namespace_id"` - JSON projectDeploymentConfigsProductionKVNamespaceJSON `json:"-"` +type ProjectNewResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectNewResponseEnvelopeErrorsSource `json:"source"` + JSON projectNewResponseEnvelopeErrorsJSON `json:"-"` } -// projectDeploymentConfigsProductionKVNamespaceJSON contains the JSON metadata for -// the struct [ProjectDeploymentConfigsProductionKVNamespace] -type projectDeploymentConfigsProductionKVNamespaceJSON struct { - NamespaceID apijson.Field - raw string - ExtraFields map[string]apijson.Field +// projectNewResponseEnvelopeErrorsJSON contains the JSON metadata for the struct +// [ProjectNewResponseEnvelopeErrors] +type projectNewResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionKVNamespace) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionKVNamespaceJSON) RawJSON() string { +func (r projectNewResponseEnvelopeErrorsJSON) RawJSON() string { return r.raw } -// Limits for Pages Functions. -type ProjectDeploymentConfigsProductionLimits struct { - // CPU time limit in milliseconds. - CPUMs int64 `json:"cpu_ms"` - JSON projectDeploymentConfigsProductionLimitsJSON `json:"-"` +type ProjectNewResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectNewResponseEnvelopeErrorsSourceJSON `json:"-"` } -// projectDeploymentConfigsProductionLimitsJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsProductionLimits] -type projectDeploymentConfigsProductionLimitsJSON struct { - CPUMs apijson.Field +// projectNewResponseEnvelopeErrorsSourceJSON contains the JSON metadata for the +// struct [ProjectNewResponseEnvelopeErrorsSource] +type projectNewResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionLimits) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionLimitsJSON) RawJSON() string { +func (r projectNewResponseEnvelopeErrorsSourceJSON) RawJSON() string { return r.raw } -// mTLS binding. -type ProjectDeploymentConfigsProductionMTLSCertificate struct { - CertificateID string `json:"certificate_id"` - JSON projectDeploymentConfigsProductionMTLSCertificateJSON `json:"-"` +type ProjectNewResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectNewResponseEnvelopeMessagesSource `json:"source"` + JSON projectNewResponseEnvelopeMessagesJSON `json:"-"` } -// projectDeploymentConfigsProductionMTLSCertificateJSON contains the JSON metadata -// for the struct [ProjectDeploymentConfigsProductionMTLSCertificate] -type projectDeploymentConfigsProductionMTLSCertificateJSON struct { - CertificateID apijson.Field - raw string - ExtraFields map[string]apijson.Field +// projectNewResponseEnvelopeMessagesJSON contains the JSON metadata for the struct +// [ProjectNewResponseEnvelopeMessages] +type projectNewResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionMTLSCertificate) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionMTLSCertificateJSON) RawJSON() string { +func (r projectNewResponseEnvelopeMessagesJSON) RawJSON() string { return r.raw } -// Placement setting used for Pages Functions. -type ProjectDeploymentConfigsProductionPlacement struct { - // Placement mode. - Mode string `json:"mode"` - JSON projectDeploymentConfigsProductionPlacementJSON `json:"-"` +type ProjectNewResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectNewResponseEnvelopeMessagesSourceJSON `json:"-"` } -// projectDeploymentConfigsProductionPlacementJSON contains the JSON metadata for -// the struct [ProjectDeploymentConfigsProductionPlacement] -type projectDeploymentConfigsProductionPlacementJSON struct { - Mode apijson.Field +// projectNewResponseEnvelopeMessagesSourceJSON contains the JSON metadata for the +// struct [ProjectNewResponseEnvelopeMessagesSource] +type projectNewResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionPlacement) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionPlacementJSON) RawJSON() string { +func (r projectNewResponseEnvelopeMessagesSourceJSON) RawJSON() string { return r.raw } -// Queue Producer binding. -type ProjectDeploymentConfigsProductionQueueProducer struct { - // Name of the Queue. - Name string `json:"name"` - JSON projectDeploymentConfigsProductionQueueProducerJSON `json:"-"` +// Whether the API call was successful. +type ProjectNewResponseEnvelopeSuccess bool + +const ( + ProjectNewResponseEnvelopeSuccessTrue ProjectNewResponseEnvelopeSuccess = true +) + +func (r ProjectNewResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case ProjectNewResponseEnvelopeSuccessTrue: + return true + } + return false } -// projectDeploymentConfigsProductionQueueProducerJSON contains the JSON metadata -// for the struct [ProjectDeploymentConfigsProductionQueueProducer] -type projectDeploymentConfigsProductionQueueProducerJSON struct { - Name apijson.Field - raw string - ExtraFields map[string]apijson.Field +type ProjectListParams struct { + // Identifier. + AccountID param.Field[string] `path:"account_id,required"` + // Which page of projects to fetch. + Page param.Field[int64] `query:"page"` + // How many projects to return per page. + PerPage param.Field[int64] `query:"per_page"` } -func (r *ProjectDeploymentConfigsProductionQueueProducer) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) +// URLQuery serializes [ProjectListParams]'s query parameters as `url.Values`. +func (r ProjectListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) } -func (r projectDeploymentConfigsProductionQueueProducerJSON) RawJSON() string { - return r.raw +type ProjectDeleteParams struct { + // Identifier. + AccountID param.Field[string] `path:"account_id,required"` } -// R2 binding. -type ProjectDeploymentConfigsProductionR2Bucket struct { - // Jurisdiction of the R2 bucket. - Jurisdiction string `json:"jurisdiction,nullable"` - // Name of the R2 bucket. - Name string `json:"name"` - JSON projectDeploymentConfigsProductionR2BucketJSON `json:"-"` +type ProjectDeleteResponseEnvelope struct { + Errors []ProjectDeleteResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDeleteResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDeleteResponse `json:"result,required,nullable"` + // Whether the API call was successful. + Success ProjectDeleteResponseEnvelopeSuccess `json:"success,required"` + JSON projectDeleteResponseEnvelopeJSON `json:"-"` } -// projectDeploymentConfigsProductionR2BucketJSON contains the JSON metadata for -// the struct [ProjectDeploymentConfigsProductionR2Bucket] -type projectDeploymentConfigsProductionR2BucketJSON struct { - Jurisdiction apijson.Field - Name apijson.Field - raw string - ExtraFields map[string]apijson.Field +// projectDeleteResponseEnvelopeJSON contains the JSON metadata for the struct +// [ProjectDeleteResponseEnvelope] +type projectDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionR2Bucket) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionR2BucketJSON) RawJSON() string { +func (r projectDeleteResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Service binding. -type ProjectDeploymentConfigsProductionService struct { - // The entrypoint to bind to. - Entrypoint string `json:"entrypoint,nullable"` - // The Service environment. - Environment string `json:"environment"` - // The Service name. - Service string `json:"service"` - JSON projectDeploymentConfigsProductionServiceJSON `json:"-"` +type ProjectDeleteResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeleteResponseEnvelopeErrorsSource `json:"source"` + JSON projectDeleteResponseEnvelopeErrorsJSON `json:"-"` } -// projectDeploymentConfigsProductionServiceJSON contains the JSON metadata for the -// struct [ProjectDeploymentConfigsProductionService] -type projectDeploymentConfigsProductionServiceJSON struct { - Entrypoint apijson.Field - Environment apijson.Field - Service apijson.Field - raw string - ExtraFields map[string]apijson.Field +// projectDeleteResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [ProjectDeleteResponseEnvelopeErrors] +type projectDeleteResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionService) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionServiceJSON) RawJSON() string { +func (r projectDeleteResponseEnvelopeErrorsJSON) RawJSON() string { return r.raw } -// The usage model for Pages Functions. -type ProjectDeploymentConfigsProductionUsageModel string - -const ( - ProjectDeploymentConfigsProductionUsageModelStandard ProjectDeploymentConfigsProductionUsageModel = "standard" - ProjectDeploymentConfigsProductionUsageModelBundled ProjectDeploymentConfigsProductionUsageModel = "bundled" - ProjectDeploymentConfigsProductionUsageModelUnbound ProjectDeploymentConfigsProductionUsageModel = "unbound" -) - -func (r ProjectDeploymentConfigsProductionUsageModel) IsKnown() bool { - switch r { - case ProjectDeploymentConfigsProductionUsageModelStandard, ProjectDeploymentConfigsProductionUsageModelBundled, ProjectDeploymentConfigsProductionUsageModelUnbound: - return true - } - return false -} - -// Vectorize binding. -type ProjectDeploymentConfigsProductionVectorizeBinding struct { - IndexName string `json:"index_name"` - JSON projectDeploymentConfigsProductionVectorizeBindingJSON `json:"-"` +type ProjectDeleteResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDeleteResponseEnvelopeErrorsSourceJSON `json:"-"` } -// projectDeploymentConfigsProductionVectorizeBindingJSON contains the JSON -// metadata for the struct [ProjectDeploymentConfigsProductionVectorizeBinding] -type projectDeploymentConfigsProductionVectorizeBindingJSON struct { - IndexName apijson.Field +// projectDeleteResponseEnvelopeErrorsSourceJSON contains the JSON metadata for the +// struct [ProjectDeleteResponseEnvelopeErrorsSource] +type projectDeleteResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeploymentConfigsProductionVectorizeBinding) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeploymentConfigsProductionVectorizeBindingJSON) RawJSON() string { +func (r projectDeleteResponseEnvelopeErrorsSourceJSON) RawJSON() string { return r.raw } -type ProjectSource struct { - Config ProjectSourceConfig `json:"config"` - // The source control management provider. - Type ProjectSourceType `json:"type"` - JSON projectSourceJSON `json:"-"` +type ProjectDeleteResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeleteResponseEnvelopeMessagesSource `json:"source"` + JSON projectDeleteResponseEnvelopeMessagesJSON `json:"-"` } -// projectSourceJSON contains the JSON metadata for the struct [ProjectSource] -type projectSourceJSON struct { - Config apijson.Field - Type apijson.Field - raw string - ExtraFields map[string]apijson.Field +// projectDeleteResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [ProjectDeleteResponseEnvelopeMessages] +type projectDeleteResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r *ProjectSource) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectSourceJSON) RawJSON() string { +func (r projectDeleteResponseEnvelopeMessagesJSON) RawJSON() string { return r.raw } -type ProjectSourceConfig struct { - // Whether to enable automatic deployments when pushing to the source repository. - // When disabled, no deployments (production or preview) will be triggered - // automatically. - // - // Deprecated: Use `production_deployments_enabled` and - // `preview_deployment_setting` for more granular control. - DeploymentsEnabled bool `json:"deployments_enabled"` - // The owner of the repository. - Owner string `json:"owner"` - // A list of paths that should be excluded from triggering a preview deployment. - // Wildcard syntax (`*`) is supported. - PathExcludes []string `json:"path_excludes"` - // A list of paths that should be watched to trigger a preview deployment. Wildcard - // syntax (`*`) is supported. - PathIncludes []string `json:"path_includes"` - // Whether to enable PR comments. - PrCommentsEnabled bool `json:"pr_comments_enabled"` - // A list of branches that should not trigger a preview deployment. Wildcard syntax - // (`*`) is supported. Must be used with `preview_deployment_setting` set to - // `custom`. - PreviewBranchExcludes []string `json:"preview_branch_excludes"` - // A list of branches that should trigger a preview deployment. Wildcard syntax - // (`*`) is supported. Must be used with `preview_deployment_setting` set to - // `custom`. - PreviewBranchIncludes []string `json:"preview_branch_includes"` - // Controls whether commits to preview branches trigger a preview deployment. - PreviewDeploymentSetting ProjectSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` - // The production branch of the repository. - ProductionBranch string `json:"production_branch"` - // Whether to trigger a production deployment on commits to the production branch. - ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` - // The name of the repository. - RepoName string `json:"repo_name"` - JSON projectSourceConfigJSON `json:"-"` +type ProjectDeleteResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDeleteResponseEnvelopeMessagesSourceJSON `json:"-"` } -// projectSourceConfigJSON contains the JSON metadata for the struct -// [ProjectSourceConfig] -type projectSourceConfigJSON struct { - DeploymentsEnabled apijson.Field - Owner apijson.Field - PathExcludes apijson.Field - PathIncludes apijson.Field - PrCommentsEnabled apijson.Field - PreviewBranchExcludes apijson.Field - PreviewBranchIncludes apijson.Field - PreviewDeploymentSetting apijson.Field - ProductionBranch apijson.Field - ProductionDeploymentsEnabled apijson.Field - RepoName apijson.Field - raw string - ExtraFields map[string]apijson.Field +// projectDeleteResponseEnvelopeMessagesSourceJSON contains the JSON metadata for +// the struct [ProjectDeleteResponseEnvelopeMessagesSource] +type projectDeleteResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field } -func (r *ProjectSourceConfig) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectSourceConfigJSON) RawJSON() string { +func (r projectDeleteResponseEnvelopeMessagesSourceJSON) RawJSON() string { return r.raw } -// Controls whether commits to preview branches trigger a preview deployment. -type ProjectSourceConfigPreviewDeploymentSetting string - -const ( - ProjectSourceConfigPreviewDeploymentSettingAll ProjectSourceConfigPreviewDeploymentSetting = "all" - ProjectSourceConfigPreviewDeploymentSettingNone ProjectSourceConfigPreviewDeploymentSetting = "none" - ProjectSourceConfigPreviewDeploymentSettingCustom ProjectSourceConfigPreviewDeploymentSetting = "custom" -) - -func (r ProjectSourceConfigPreviewDeploymentSetting) IsKnown() bool { - switch r { - case ProjectSourceConfigPreviewDeploymentSettingAll, ProjectSourceConfigPreviewDeploymentSettingNone, ProjectSourceConfigPreviewDeploymentSettingCustom: - return true - } - return false -} - -// The source control management provider. -type ProjectSourceType string +// Whether the API call was successful. +type ProjectDeleteResponseEnvelopeSuccess bool const ( - ProjectSourceTypeGitHub ProjectSourceType = "github" - ProjectSourceTypeGitlab ProjectSourceType = "gitlab" + ProjectDeleteResponseEnvelopeSuccessTrue ProjectDeleteResponseEnvelopeSuccess = true ) -func (r ProjectSourceType) IsKnown() bool { +func (r ProjectDeleteResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectSourceTypeGitHub, ProjectSourceTypeGitlab: + case ProjectDeleteResponseEnvelopeSuccessTrue: return true } return false } -type ProjectParam struct { - // Name of the project. - Name param.Field[string] `json:"name,required"` - // Production branch of the project. Used to identify production deployments. - ProductionBranch param.Field[string] `json:"production_branch,required"` +type ProjectEditParams struct { + // Identifier. + AccountID param.Field[string] `path:"account_id,required"` // Configs for the project build process. - BuildConfig param.Field[ProjectBuildConfigParam] `json:"build_config"` + BuildConfig param.Field[ProjectEditParamsBuildConfig] `json:"build_config"` // Configs for deployments in a project. - DeploymentConfigs param.Field[ProjectDeploymentConfigsParam] `json:"deployment_configs"` - Source param.Field[ProjectSourceParam] `json:"source"` + DeploymentConfigs param.Field[ProjectEditParamsDeploymentConfigs] `json:"deployment_configs"` + // Name of the project. + Name param.Field[string] `json:"name"` + // Production branch of the project. Used to identify production deployments. + ProductionBranch param.Field[string] `json:"production_branch"` + // Configs for the project source control. + Source param.Field[ProjectEditParamsSource] `json:"source"` } -func (r ProjectParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Configs for the project build process. -type ProjectBuildConfigParam struct { +type ProjectEditParamsBuildConfig struct { // Enable build caching for the project. BuildCaching param.Field[bool] `json:"build_caching"` // Command used to build project. @@ -2268,32 +11170,32 @@ type ProjectBuildConfigParam struct { WebAnalyticsToken param.Field[string] `json:"web_analytics_token"` } -func (r ProjectBuildConfigParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsBuildConfig) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Configs for deployments in a project. -type ProjectDeploymentConfigsParam struct { +type ProjectEditParamsDeploymentConfigs struct { // Configs for preview deploys. - Preview param.Field[ProjectDeploymentConfigsPreviewParam] `json:"preview"` + Preview param.Field[ProjectEditParamsDeploymentConfigsPreview] `json:"preview"` // Configs for production deploys. - Production param.Field[ProjectDeploymentConfigsProductionParam] `json:"production"` + Production param.Field[ProjectEditParamsDeploymentConfigsProduction] `json:"production"` } -func (r ProjectDeploymentConfigsParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigs) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Configs for preview deploys. -type ProjectDeploymentConfigsPreviewParam struct { +type ProjectEditParamsDeploymentConfigsPreview struct { // Constellation bindings used for Pages Functions. - AIBindings param.Field[map[string]ProjectDeploymentConfigsPreviewAIBindingParam] `json:"ai_bindings"` + AIBindings param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewAIBindings] `json:"ai_bindings"` // Whether to always use the latest compatibility date for Pages Functions. AlwaysUseLatestCompatibilityDate param.Field[bool] `json:"always_use_latest_compatibility_date"` // Analytics Engine bindings used for Pages Functions. - AnalyticsEngineDatasets param.Field[map[string]ProjectDeploymentConfigsPreviewAnalyticsEngineDatasetParam] `json:"analytics_engine_datasets"` + AnalyticsEngineDatasets param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewAnalyticsEngineDatasets] `json:"analytics_engine_datasets"` // Browser bindings used for Pages Functions. - Browsers param.Field[map[string]ProjectDeploymentConfigsPreviewBrowserParam] `json:"browsers"` + Browsers param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewBrowsers] `json:"browsers"` // The major version of the build image to use for Pages Functions. BuildImageMajorVersion param.Field[int64] `json:"build_image_major_version"` // Compatibility date used for Pages Functions. @@ -2301,245 +11203,305 @@ type ProjectDeploymentConfigsPreviewParam struct { // Compatibility flags used for Pages Functions. CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"` // D1 databases used for Pages Functions. - D1Databases param.Field[map[string]ProjectDeploymentConfigsPreviewD1DatabaseParam] `json:"d1_databases"` + D1Databases param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewD1Databases] `json:"d1_databases"` // Durable Object namespaces used for Pages Functions. - DurableObjectNamespaces param.Field[map[string]ProjectDeploymentConfigsPreviewDurableObjectNamespaceParam] `json:"durable_object_namespaces"` + DurableObjectNamespaces param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewDurableObjectNamespaces] `json:"durable_object_namespaces"` // Environment variables used for builds and Pages Functions. - EnvVars param.Field[map[string]ProjectDeploymentConfigsPreviewEnvVarsUnionParam] `json:"env_vars"` + EnvVars param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewEnvVarsUnion] `json:"env_vars"` // Whether to fail open when the deployment config cannot be applied. FailOpen param.Field[bool] `json:"fail_open"` // Hyperdrive bindings used for Pages Functions. - HyperdriveBindings param.Field[map[string]ProjectDeploymentConfigsPreviewHyperdriveBindingParam] `json:"hyperdrive_bindings"` + HyperdriveBindings param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewHyperdriveBindings] `json:"hyperdrive_bindings"` // KV namespaces used for Pages Functions. - KVNamespaces param.Field[map[string]ProjectDeploymentConfigsPreviewKVNamespaceParam] `json:"kv_namespaces"` + KVNamespaces param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewKVNamespaces] `json:"kv_namespaces"` // Limits for Pages Functions. - Limits param.Field[ProjectDeploymentConfigsPreviewLimitsParam] `json:"limits"` + Limits param.Field[ProjectEditParamsDeploymentConfigsPreviewLimits] `json:"limits"` // mTLS bindings used for Pages Functions. - MTLSCertificates param.Field[map[string]ProjectDeploymentConfigsPreviewMTLSCertificateParam] `json:"mtls_certificates"` + MTLSCertificates param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewMTLSCertificates] `json:"mtls_certificates"` // Placement setting used for Pages Functions. - Placement param.Field[ProjectDeploymentConfigsPreviewPlacementParam] `json:"placement"` + Placement param.Field[ProjectEditParamsDeploymentConfigsPreviewPlacement] `json:"placement"` // Queue Producer bindings used for Pages Functions. - QueueProducers param.Field[map[string]ProjectDeploymentConfigsPreviewQueueProducerParam] `json:"queue_producers"` + QueueProducers param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewQueueProducers] `json:"queue_producers"` // R2 buckets used for Pages Functions. - R2Buckets param.Field[map[string]ProjectDeploymentConfigsPreviewR2BucketParam] `json:"r2_buckets"` + R2Buckets param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewR2Buckets] `json:"r2_buckets"` // Services used for Pages Functions. - Services param.Field[map[string]ProjectDeploymentConfigsPreviewServiceParam] `json:"services"` + Services param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewServices] `json:"services"` // The usage model for Pages Functions. // // Deprecated: All new projects now use the Standard usage model. - UsageModel param.Field[ProjectDeploymentConfigsPreviewUsageModel] `json:"usage_model"` + UsageModel param.Field[ProjectEditParamsDeploymentConfigsPreviewUsageModel] `json:"usage_model"` // Vectorize bindings used for Pages Functions. - VectorizeBindings param.Field[map[string]ProjectDeploymentConfigsPreviewVectorizeBindingParam] `json:"vectorize_bindings"` + VectorizeBindings param.Field[map[string]ProjectEditParamsDeploymentConfigsPreviewVectorizeBindings] `json:"vectorize_bindings"` // Hash of the Wrangler configuration used for the deployment. WranglerConfigHash param.Field[string] `json:"wrangler_config_hash"` } -func (r ProjectDeploymentConfigsPreviewParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreview) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // AI binding. -type ProjectDeploymentConfigsPreviewAIBindingParam struct { - ProjectID param.Field[string] `json:"project_id"` +type ProjectEditParamsDeploymentConfigsPreviewAIBindings struct { + ProjectID param.Field[string] `json:"project_id,required"` } -func (r ProjectDeploymentConfigsPreviewAIBindingParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewAIBindings) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Analytics Engine binding. -type ProjectDeploymentConfigsPreviewAnalyticsEngineDatasetParam struct { +type ProjectEditParamsDeploymentConfigsPreviewAnalyticsEngineDatasets struct { // Name of the dataset. - Dataset param.Field[string] `json:"dataset"` + Dataset param.Field[string] `json:"dataset,required"` } -func (r ProjectDeploymentConfigsPreviewAnalyticsEngineDatasetParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewAnalyticsEngineDatasets) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Browser binding. -type ProjectDeploymentConfigsPreviewBrowserParam struct { +type ProjectEditParamsDeploymentConfigsPreviewBrowsers struct { } -func (r ProjectDeploymentConfigsPreviewBrowserParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewBrowsers) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // D1 binding. -type ProjectDeploymentConfigsPreviewD1DatabaseParam struct { +type ProjectEditParamsDeploymentConfigsPreviewD1Databases struct { // UUID of the D1 database. - ID param.Field[string] `json:"id"` + ID param.Field[string] `json:"id,required"` } -func (r ProjectDeploymentConfigsPreviewD1DatabaseParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewD1Databases) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Durable Object binding. -type ProjectDeploymentConfigsPreviewDurableObjectNamespaceParam struct { +type ProjectEditParamsDeploymentConfigsPreviewDurableObjectNamespaces struct { // ID of the Durable Object namespace. - NamespaceID param.Field[string] `json:"namespace_id"` + NamespaceID param.Field[string] `json:"namespace_id,required"` } -func (r ProjectDeploymentConfigsPreviewDurableObjectNamespaceParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewDurableObjectNamespaces) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // A plaintext environment variable. -type ProjectDeploymentConfigsPreviewEnvVarParam struct { - Type param.Field[ProjectDeploymentConfigsPreviewEnvVarsType] `json:"type,required"` +type ProjectEditParamsDeploymentConfigsPreviewEnvVars struct { + Type param.Field[ProjectEditParamsDeploymentConfigsPreviewEnvVarsType] `json:"type,required"` // Environment variable value. Value param.Field[string] `json:"value,required"` } -func (r ProjectDeploymentConfigsPreviewEnvVarParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewEnvVars) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r ProjectDeploymentConfigsPreviewEnvVarParam) implementsProjectDeploymentConfigsPreviewEnvVarsUnionParam() { +func (r ProjectEditParamsDeploymentConfigsPreviewEnvVars) implementsProjectEditParamsDeploymentConfigsPreviewEnvVarsUnion() { } // A plaintext environment variable. // // Satisfied by -// [pages.ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarParam], -// [pages.ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarParam], -// [ProjectDeploymentConfigsPreviewEnvVarParam]. -type ProjectDeploymentConfigsPreviewEnvVarsUnionParam interface { - implementsProjectDeploymentConfigsPreviewEnvVarsUnionParam() +// [pages.ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar], +// [pages.ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar], +// [ProjectEditParamsDeploymentConfigsPreviewEnvVars]. +type ProjectEditParamsDeploymentConfigsPreviewEnvVarsUnion interface { + implementsProjectEditParamsDeploymentConfigsPreviewEnvVarsUnion() } // A plaintext environment variable. -type ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarParam struct { - Type param.Field[ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType] `json:"type,required"` +type ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar struct { + Type param.Field[ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType] `json:"type,required"` // Environment variable value. Value param.Field[string] `json:"value,required"` } -func (r ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarParam) implementsProjectDeploymentConfigsPreviewEnvVarsUnionParam() { +func (r ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar) implementsProjectEditParamsDeploymentConfigsPreviewEnvVarsUnion() { +} + +type ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false } // An encrypted environment variable. -type ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarParam struct { - Type param.Field[ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType] `json:"type,required"` +type ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar struct { + Type param.Field[ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType] `json:"type,required"` // Secret value. Value param.Field[string] `json:"value,required"` } -func (r ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r ProjectDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarParam) implementsProjectDeploymentConfigsPreviewEnvVarsUnionParam() { +func (r ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVar) implementsProjectEditParamsDeploymentConfigsPreviewEnvVarsUnion() { +} + +type ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectEditParamsDeploymentConfigsPreviewEnvVarsType string + +const ( + ProjectEditParamsDeploymentConfigsPreviewEnvVarsTypePlainText ProjectEditParamsDeploymentConfigsPreviewEnvVarsType = "plain_text" + ProjectEditParamsDeploymentConfigsPreviewEnvVarsTypeSecretText ProjectEditParamsDeploymentConfigsPreviewEnvVarsType = "secret_text" +) + +func (r ProjectEditParamsDeploymentConfigsPreviewEnvVarsType) IsKnown() bool { + switch r { + case ProjectEditParamsDeploymentConfigsPreviewEnvVarsTypePlainText, ProjectEditParamsDeploymentConfigsPreviewEnvVarsTypeSecretText: + return true + } + return false } // Hyperdrive binding. -type ProjectDeploymentConfigsPreviewHyperdriveBindingParam struct { - ID param.Field[string] `json:"id"` +type ProjectEditParamsDeploymentConfigsPreviewHyperdriveBindings struct { + ID param.Field[string] `json:"id,required"` } -func (r ProjectDeploymentConfigsPreviewHyperdriveBindingParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewHyperdriveBindings) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // KV namespace binding. -type ProjectDeploymentConfigsPreviewKVNamespaceParam struct { +type ProjectEditParamsDeploymentConfigsPreviewKVNamespaces struct { // ID of the KV namespace. - NamespaceID param.Field[string] `json:"namespace_id"` + NamespaceID param.Field[string] `json:"namespace_id,required"` } -func (r ProjectDeploymentConfigsPreviewKVNamespaceParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewKVNamespaces) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Limits for Pages Functions. -type ProjectDeploymentConfigsPreviewLimitsParam struct { +type ProjectEditParamsDeploymentConfigsPreviewLimits struct { // CPU time limit in milliseconds. - CPUMs param.Field[int64] `json:"cpu_ms"` + CPUMs param.Field[int64] `json:"cpu_ms,required"` } -func (r ProjectDeploymentConfigsPreviewLimitsParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewLimits) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // mTLS binding. -type ProjectDeploymentConfigsPreviewMTLSCertificateParam struct { - CertificateID param.Field[string] `json:"certificate_id"` +type ProjectEditParamsDeploymentConfigsPreviewMTLSCertificates struct { + CertificateID param.Field[string] `json:"certificate_id,required"` } -func (r ProjectDeploymentConfigsPreviewMTLSCertificateParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewMTLSCertificates) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Placement setting used for Pages Functions. -type ProjectDeploymentConfigsPreviewPlacementParam struct { +type ProjectEditParamsDeploymentConfigsPreviewPlacement struct { // Placement mode. - Mode param.Field[string] `json:"mode"` + Mode param.Field[string] `json:"mode,required"` } -func (r ProjectDeploymentConfigsPreviewPlacementParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewPlacement) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Queue Producer binding. -type ProjectDeploymentConfigsPreviewQueueProducerParam struct { +type ProjectEditParamsDeploymentConfigsPreviewQueueProducers struct { // Name of the Queue. - Name param.Field[string] `json:"name"` + Name param.Field[string] `json:"name,required"` } -func (r ProjectDeploymentConfigsPreviewQueueProducerParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewQueueProducers) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // R2 binding. -type ProjectDeploymentConfigsPreviewR2BucketParam struct { +type ProjectEditParamsDeploymentConfigsPreviewR2Buckets struct { + // Name of the R2 bucket. + Name param.Field[string] `json:"name,required"` // Jurisdiction of the R2 bucket. Jurisdiction param.Field[string] `json:"jurisdiction"` - // Name of the R2 bucket. - Name param.Field[string] `json:"name"` } -func (r ProjectDeploymentConfigsPreviewR2BucketParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewR2Buckets) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Service binding. -type ProjectDeploymentConfigsPreviewServiceParam struct { +type ProjectEditParamsDeploymentConfigsPreviewServices struct { + // The Service name. + Service param.Field[string] `json:"service,required"` // The entrypoint to bind to. Entrypoint param.Field[string] `json:"entrypoint"` // The Service environment. Environment param.Field[string] `json:"environment"` - // The Service name. - Service param.Field[string] `json:"service"` } -func (r ProjectDeploymentConfigsPreviewServiceParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewServices) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +// The usage model for Pages Functions. +type ProjectEditParamsDeploymentConfigsPreviewUsageModel string + +const ( + ProjectEditParamsDeploymentConfigsPreviewUsageModelStandard ProjectEditParamsDeploymentConfigsPreviewUsageModel = "standard" + ProjectEditParamsDeploymentConfigsPreviewUsageModelBundled ProjectEditParamsDeploymentConfigsPreviewUsageModel = "bundled" + ProjectEditParamsDeploymentConfigsPreviewUsageModelUnbound ProjectEditParamsDeploymentConfigsPreviewUsageModel = "unbound" +) + +func (r ProjectEditParamsDeploymentConfigsPreviewUsageModel) IsKnown() bool { + switch r { + case ProjectEditParamsDeploymentConfigsPreviewUsageModelStandard, ProjectEditParamsDeploymentConfigsPreviewUsageModelBundled, ProjectEditParamsDeploymentConfigsPreviewUsageModelUnbound: + return true + } + return false +} + // Vectorize binding. -type ProjectDeploymentConfigsPreviewVectorizeBindingParam struct { - IndexName param.Field[string] `json:"index_name"` +type ProjectEditParamsDeploymentConfigsPreviewVectorizeBindings struct { + IndexName param.Field[string] `json:"index_name,required"` } -func (r ProjectDeploymentConfigsPreviewVectorizeBindingParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsPreviewVectorizeBindings) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Configs for production deploys. -type ProjectDeploymentConfigsProductionParam struct { +type ProjectEditParamsDeploymentConfigsProduction struct { // Constellation bindings used for Pages Functions. - AIBindings param.Field[map[string]ProjectDeploymentConfigsProductionAIBindingParam] `json:"ai_bindings"` + AIBindings param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionAIBindings] `json:"ai_bindings"` // Whether to always use the latest compatibility date for Pages Functions. AlwaysUseLatestCompatibilityDate param.Field[bool] `json:"always_use_latest_compatibility_date"` // Analytics Engine bindings used for Pages Functions. - AnalyticsEngineDatasets param.Field[map[string]ProjectDeploymentConfigsProductionAnalyticsEngineDatasetParam] `json:"analytics_engine_datasets"` + AnalyticsEngineDatasets param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionAnalyticsEngineDatasets] `json:"analytics_engine_datasets"` // Browser bindings used for Pages Functions. - Browsers param.Field[map[string]ProjectDeploymentConfigsProductionBrowserParam] `json:"browsers"` + Browsers param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionBrowsers] `json:"browsers"` // The major version of the build image to use for Pages Functions. BuildImageMajorVersion param.Field[int64] `json:"build_image_major_version"` // Compatibility date used for Pages Functions. @@ -2547,246 +11509,307 @@ type ProjectDeploymentConfigsProductionParam struct { // Compatibility flags used for Pages Functions. CompatibilityFlags param.Field[[]string] `json:"compatibility_flags"` // D1 databases used for Pages Functions. - D1Databases param.Field[map[string]ProjectDeploymentConfigsProductionD1DatabaseParam] `json:"d1_databases"` + D1Databases param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionD1Databases] `json:"d1_databases"` // Durable Object namespaces used for Pages Functions. - DurableObjectNamespaces param.Field[map[string]ProjectDeploymentConfigsProductionDurableObjectNamespaceParam] `json:"durable_object_namespaces"` + DurableObjectNamespaces param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionDurableObjectNamespaces] `json:"durable_object_namespaces"` // Environment variables used for builds and Pages Functions. - EnvVars param.Field[map[string]ProjectDeploymentConfigsProductionEnvVarsUnionParam] `json:"env_vars"` + EnvVars param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionEnvVarsUnion] `json:"env_vars"` // Whether to fail open when the deployment config cannot be applied. FailOpen param.Field[bool] `json:"fail_open"` // Hyperdrive bindings used for Pages Functions. - HyperdriveBindings param.Field[map[string]ProjectDeploymentConfigsProductionHyperdriveBindingParam] `json:"hyperdrive_bindings"` + HyperdriveBindings param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionHyperdriveBindings] `json:"hyperdrive_bindings"` // KV namespaces used for Pages Functions. - KVNamespaces param.Field[map[string]ProjectDeploymentConfigsProductionKVNamespaceParam] `json:"kv_namespaces"` + KVNamespaces param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionKVNamespaces] `json:"kv_namespaces"` // Limits for Pages Functions. - Limits param.Field[ProjectDeploymentConfigsProductionLimitsParam] `json:"limits"` + Limits param.Field[ProjectEditParamsDeploymentConfigsProductionLimits] `json:"limits"` // mTLS bindings used for Pages Functions. - MTLSCertificates param.Field[map[string]ProjectDeploymentConfigsProductionMTLSCertificateParam] `json:"mtls_certificates"` + MTLSCertificates param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionMTLSCertificates] `json:"mtls_certificates"` // Placement setting used for Pages Functions. - Placement param.Field[ProjectDeploymentConfigsProductionPlacementParam] `json:"placement"` + Placement param.Field[ProjectEditParamsDeploymentConfigsProductionPlacement] `json:"placement"` // Queue Producer bindings used for Pages Functions. - QueueProducers param.Field[map[string]ProjectDeploymentConfigsProductionQueueProducerParam] `json:"queue_producers"` + QueueProducers param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionQueueProducers] `json:"queue_producers"` // R2 buckets used for Pages Functions. - R2Buckets param.Field[map[string]ProjectDeploymentConfigsProductionR2BucketParam] `json:"r2_buckets"` + R2Buckets param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionR2Buckets] `json:"r2_buckets"` // Services used for Pages Functions. - Services param.Field[map[string]ProjectDeploymentConfigsProductionServiceParam] `json:"services"` + Services param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionServices] `json:"services"` // The usage model for Pages Functions. // // Deprecated: All new projects now use the Standard usage model. - UsageModel param.Field[ProjectDeploymentConfigsProductionUsageModel] `json:"usage_model"` + UsageModel param.Field[ProjectEditParamsDeploymentConfigsProductionUsageModel] `json:"usage_model"` // Vectorize bindings used for Pages Functions. - VectorizeBindings param.Field[map[string]ProjectDeploymentConfigsProductionVectorizeBindingParam] `json:"vectorize_bindings"` + VectorizeBindings param.Field[map[string]ProjectEditParamsDeploymentConfigsProductionVectorizeBindings] `json:"vectorize_bindings"` // Hash of the Wrangler configuration used for the deployment. WranglerConfigHash param.Field[string] `json:"wrangler_config_hash"` } -func (r ProjectDeploymentConfigsProductionParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProduction) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // AI binding. -type ProjectDeploymentConfigsProductionAIBindingParam struct { - ProjectID param.Field[string] `json:"project_id"` +type ProjectEditParamsDeploymentConfigsProductionAIBindings struct { + ProjectID param.Field[string] `json:"project_id,required"` } -func (r ProjectDeploymentConfigsProductionAIBindingParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionAIBindings) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Analytics Engine binding. -type ProjectDeploymentConfigsProductionAnalyticsEngineDatasetParam struct { +type ProjectEditParamsDeploymentConfigsProductionAnalyticsEngineDatasets struct { // Name of the dataset. - Dataset param.Field[string] `json:"dataset"` + Dataset param.Field[string] `json:"dataset,required"` } -func (r ProjectDeploymentConfigsProductionAnalyticsEngineDatasetParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionAnalyticsEngineDatasets) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Browser binding. -type ProjectDeploymentConfigsProductionBrowserParam struct { +type ProjectEditParamsDeploymentConfigsProductionBrowsers struct { } -func (r ProjectDeploymentConfigsProductionBrowserParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionBrowsers) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // D1 binding. -type ProjectDeploymentConfigsProductionD1DatabaseParam struct { +type ProjectEditParamsDeploymentConfigsProductionD1Databases struct { // UUID of the D1 database. - ID param.Field[string] `json:"id"` + ID param.Field[string] `json:"id,required"` } -func (r ProjectDeploymentConfigsProductionD1DatabaseParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionD1Databases) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Durable Object binding. -type ProjectDeploymentConfigsProductionDurableObjectNamespaceParam struct { +type ProjectEditParamsDeploymentConfigsProductionDurableObjectNamespaces struct { // ID of the Durable Object namespace. - NamespaceID param.Field[string] `json:"namespace_id"` + NamespaceID param.Field[string] `json:"namespace_id,required"` } -func (r ProjectDeploymentConfigsProductionDurableObjectNamespaceParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionDurableObjectNamespaces) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // A plaintext environment variable. -type ProjectDeploymentConfigsProductionEnvVarParam struct { - Type param.Field[ProjectDeploymentConfigsProductionEnvVarsType] `json:"type,required"` +type ProjectEditParamsDeploymentConfigsProductionEnvVars struct { + Type param.Field[ProjectEditParamsDeploymentConfigsProductionEnvVarsType] `json:"type,required"` // Environment variable value. Value param.Field[string] `json:"value,required"` } -func (r ProjectDeploymentConfigsProductionEnvVarParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionEnvVars) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r ProjectDeploymentConfigsProductionEnvVarParam) implementsProjectDeploymentConfigsProductionEnvVarsUnionParam() { +func (r ProjectEditParamsDeploymentConfigsProductionEnvVars) implementsProjectEditParamsDeploymentConfigsProductionEnvVarsUnion() { } // A plaintext environment variable. // // Satisfied by -// [pages.ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarParam], -// [pages.ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarParam], -// [ProjectDeploymentConfigsProductionEnvVarParam]. -type ProjectDeploymentConfigsProductionEnvVarsUnionParam interface { - implementsProjectDeploymentConfigsProductionEnvVarsUnionParam() +// [pages.ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar], +// [pages.ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar], +// [ProjectEditParamsDeploymentConfigsProductionEnvVars]. +type ProjectEditParamsDeploymentConfigsProductionEnvVarsUnion interface { + implementsProjectEditParamsDeploymentConfigsProductionEnvVarsUnion() } // A plaintext environment variable. -type ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarParam struct { - Type param.Field[ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType] `json:"type,required"` +type ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar struct { + Type param.Field[ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType] `json:"type,required"` // Environment variable value. Value param.Field[string] `json:"value,required"` } -func (r ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarParam) implementsProjectDeploymentConfigsProductionEnvVarsUnionParam() { +func (r ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar) implementsProjectEditParamsDeploymentConfigsProductionEnvVarsUnion() { +} + +type ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false } // An encrypted environment variable. -type ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarParam struct { - Type param.Field[ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType] `json:"type,required"` +type ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar struct { + Type param.Field[ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType] `json:"type,required"` // Secret value. Value param.Field[string] `json:"value,required"` } -func (r ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -func (r ProjectDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarParam) implementsProjectDeploymentConfigsProductionEnvVarsUnionParam() { +func (r ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVar) implementsProjectEditParamsDeploymentConfigsProductionEnvVarsUnion() { +} + +type ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectEditParamsDeploymentConfigsProductionEnvVarsType string + +const ( + ProjectEditParamsDeploymentConfigsProductionEnvVarsTypePlainText ProjectEditParamsDeploymentConfigsProductionEnvVarsType = "plain_text" + ProjectEditParamsDeploymentConfigsProductionEnvVarsTypeSecretText ProjectEditParamsDeploymentConfigsProductionEnvVarsType = "secret_text" +) + +func (r ProjectEditParamsDeploymentConfigsProductionEnvVarsType) IsKnown() bool { + switch r { + case ProjectEditParamsDeploymentConfigsProductionEnvVarsTypePlainText, ProjectEditParamsDeploymentConfigsProductionEnvVarsTypeSecretText: + return true + } + return false } // Hyperdrive binding. -type ProjectDeploymentConfigsProductionHyperdriveBindingParam struct { - ID param.Field[string] `json:"id"` +type ProjectEditParamsDeploymentConfigsProductionHyperdriveBindings struct { + ID param.Field[string] `json:"id,required"` } -func (r ProjectDeploymentConfigsProductionHyperdriveBindingParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionHyperdriveBindings) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // KV namespace binding. -type ProjectDeploymentConfigsProductionKVNamespaceParam struct { +type ProjectEditParamsDeploymentConfigsProductionKVNamespaces struct { // ID of the KV namespace. - NamespaceID param.Field[string] `json:"namespace_id"` + NamespaceID param.Field[string] `json:"namespace_id,required"` } -func (r ProjectDeploymentConfigsProductionKVNamespaceParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionKVNamespaces) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Limits for Pages Functions. -type ProjectDeploymentConfigsProductionLimitsParam struct { +type ProjectEditParamsDeploymentConfigsProductionLimits struct { // CPU time limit in milliseconds. - CPUMs param.Field[int64] `json:"cpu_ms"` + CPUMs param.Field[int64] `json:"cpu_ms,required"` } -func (r ProjectDeploymentConfigsProductionLimitsParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionLimits) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // mTLS binding. -type ProjectDeploymentConfigsProductionMTLSCertificateParam struct { - CertificateID param.Field[string] `json:"certificate_id"` +type ProjectEditParamsDeploymentConfigsProductionMTLSCertificates struct { + CertificateID param.Field[string] `json:"certificate_id,required"` } -func (r ProjectDeploymentConfigsProductionMTLSCertificateParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionMTLSCertificates) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Placement setting used for Pages Functions. -type ProjectDeploymentConfigsProductionPlacementParam struct { +type ProjectEditParamsDeploymentConfigsProductionPlacement struct { // Placement mode. - Mode param.Field[string] `json:"mode"` + Mode param.Field[string] `json:"mode,required"` } -func (r ProjectDeploymentConfigsProductionPlacementParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionPlacement) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Queue Producer binding. -type ProjectDeploymentConfigsProductionQueueProducerParam struct { +type ProjectEditParamsDeploymentConfigsProductionQueueProducers struct { // Name of the Queue. - Name param.Field[string] `json:"name"` + Name param.Field[string] `json:"name,required"` } -func (r ProjectDeploymentConfigsProductionQueueProducerParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionQueueProducers) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // R2 binding. -type ProjectDeploymentConfigsProductionR2BucketParam struct { +type ProjectEditParamsDeploymentConfigsProductionR2Buckets struct { + // Name of the R2 bucket. + Name param.Field[string] `json:"name,required"` // Jurisdiction of the R2 bucket. Jurisdiction param.Field[string] `json:"jurisdiction"` - // Name of the R2 bucket. - Name param.Field[string] `json:"name"` } -func (r ProjectDeploymentConfigsProductionR2BucketParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionR2Buckets) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } // Service binding. -type ProjectDeploymentConfigsProductionServiceParam struct { +type ProjectEditParamsDeploymentConfigsProductionServices struct { + // The Service name. + Service param.Field[string] `json:"service,required"` // The entrypoint to bind to. Entrypoint param.Field[string] `json:"entrypoint"` // The Service environment. Environment param.Field[string] `json:"environment"` - // The Service name. - Service param.Field[string] `json:"service"` } -func (r ProjectDeploymentConfigsProductionServiceParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionServices) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +// The usage model for Pages Functions. +type ProjectEditParamsDeploymentConfigsProductionUsageModel string + +const ( + ProjectEditParamsDeploymentConfigsProductionUsageModelStandard ProjectEditParamsDeploymentConfigsProductionUsageModel = "standard" + ProjectEditParamsDeploymentConfigsProductionUsageModelBundled ProjectEditParamsDeploymentConfigsProductionUsageModel = "bundled" + ProjectEditParamsDeploymentConfigsProductionUsageModelUnbound ProjectEditParamsDeploymentConfigsProductionUsageModel = "unbound" +) + +func (r ProjectEditParamsDeploymentConfigsProductionUsageModel) IsKnown() bool { + switch r { + case ProjectEditParamsDeploymentConfigsProductionUsageModelStandard, ProjectEditParamsDeploymentConfigsProductionUsageModelBundled, ProjectEditParamsDeploymentConfigsProductionUsageModelUnbound: + return true + } + return false +} + // Vectorize binding. -type ProjectDeploymentConfigsProductionVectorizeBindingParam struct { - IndexName param.Field[string] `json:"index_name"` +type ProjectEditParamsDeploymentConfigsProductionVectorizeBindings struct { + IndexName param.Field[string] `json:"index_name,required"` } -func (r ProjectDeploymentConfigsProductionVectorizeBindingParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsDeploymentConfigsProductionVectorizeBindings) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -type ProjectSourceParam struct { - Config param.Field[ProjectSourceConfigParam] `json:"config"` +// Configs for the project source control. +type ProjectEditParamsSource struct { + Config param.Field[ProjectEditParamsSourceConfig] `json:"config,required"` // The source control management provider. - Type param.Field[ProjectSourceType] `json:"type"` + Type param.Field[ProjectEditParamsSourceType] `json:"type,required"` } -func (r ProjectSourceParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsSource) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -type ProjectSourceConfigParam struct { +type ProjectEditParamsSourceConfig struct { // Whether to enable automatic deployments when pushing to the source repository. // When disabled, no deployments (production or preview) will be triggered // automatically. @@ -2796,6 +11819,8 @@ type ProjectSourceConfigParam struct { DeploymentsEnabled param.Field[bool] `json:"deployments_enabled"` // The owner of the repository. Owner param.Field[string] `json:"owner"` + // The owner ID of the repository. + OwnerID param.Field[string] `json:"owner_id"` // A list of paths that should be excluded from triggering a preview deployment. // Wildcard syntax (`*`) is supported. PathExcludes param.Field[[]string] `json:"path_excludes"` @@ -2813,124 +11838,66 @@ type ProjectSourceConfigParam struct { // `custom`. PreviewBranchIncludes param.Field[[]string] `json:"preview_branch_includes"` // Controls whether commits to preview branches trigger a preview deployment. - PreviewDeploymentSetting param.Field[ProjectSourceConfigPreviewDeploymentSetting] `json:"preview_deployment_setting"` + PreviewDeploymentSetting param.Field[ProjectEditParamsSourceConfigPreviewDeploymentSetting] `json:"preview_deployment_setting"` // The production branch of the repository. ProductionBranch param.Field[string] `json:"production_branch"` // Whether to trigger a production deployment on commits to the production branch. ProductionDeploymentsEnabled param.Field[bool] `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID param.Field[string] `json:"repo_id"` // The name of the repository. RepoName param.Field[string] `json:"repo_name"` } -func (r ProjectSourceConfigParam) MarshalJSON() (data []byte, err error) { +func (r ProjectEditParamsSourceConfig) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } -// The status of the deployment. -type Stage struct { - // When the stage ended. - EndedOn time.Time `json:"ended_on,nullable" format:"date-time"` - // The current build stage. - Name StageName `json:"name"` - // When the stage started. - StartedOn time.Time `json:"started_on,nullable" format:"date-time"` - // State of the current stage. - Status StageStatus `json:"status"` - JSON stageJSON `json:"-"` -} - -// stageJSON contains the JSON metadata for the struct [Stage] -type stageJSON struct { - EndedOn apijson.Field - Name apijson.Field - StartedOn apijson.Field - Status apijson.Field - raw string - ExtraFields map[string]apijson.Field -} - -func (r *Stage) UnmarshalJSON(data []byte) (err error) { - return apijson.UnmarshalRoot(data, r) -} - -func (r stageJSON) RawJSON() string { - return r.raw -} - -// The current build stage. -type StageName string +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectEditParamsSourceConfigPreviewDeploymentSetting string const ( - StageNameQueued StageName = "queued" - StageNameInitialize StageName = "initialize" - StageNameCloneRepo StageName = "clone_repo" - StageNameBuild StageName = "build" - StageNameDeploy StageName = "deploy" + ProjectEditParamsSourceConfigPreviewDeploymentSettingAll ProjectEditParamsSourceConfigPreviewDeploymentSetting = "all" + ProjectEditParamsSourceConfigPreviewDeploymentSettingNone ProjectEditParamsSourceConfigPreviewDeploymentSetting = "none" + ProjectEditParamsSourceConfigPreviewDeploymentSettingCustom ProjectEditParamsSourceConfigPreviewDeploymentSetting = "custom" ) -func (r StageName) IsKnown() bool { +func (r ProjectEditParamsSourceConfigPreviewDeploymentSetting) IsKnown() bool { switch r { - case StageNameQueued, StageNameInitialize, StageNameCloneRepo, StageNameBuild, StageNameDeploy: + case ProjectEditParamsSourceConfigPreviewDeploymentSettingAll, ProjectEditParamsSourceConfigPreviewDeploymentSettingNone, ProjectEditParamsSourceConfigPreviewDeploymentSettingCustom: return true } return false } -// State of the current stage. -type StageStatus string +// The source control management provider. +type ProjectEditParamsSourceType string const ( - StageStatusSuccess StageStatus = "success" - StageStatusIdle StageStatus = "idle" - StageStatusActive StageStatus = "active" - StageStatusFailure StageStatus = "failure" - StageStatusCanceled StageStatus = "canceled" + ProjectEditParamsSourceTypeGitHub ProjectEditParamsSourceType = "github" + ProjectEditParamsSourceTypeGitlab ProjectEditParamsSourceType = "gitlab" ) -func (r StageStatus) IsKnown() bool { +func (r ProjectEditParamsSourceType) IsKnown() bool { switch r { - case StageStatusSuccess, StageStatusIdle, StageStatusActive, StageStatusFailure, StageStatusCanceled: + case ProjectEditParamsSourceTypeGitHub, ProjectEditParamsSourceTypeGitlab: return true } return false } -// The status of the deployment. -type StageParam struct { - // The current build stage. - Name param.Field[StageName] `json:"name"` -} - -func (r StageParam) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - -type ProjectDeleteResponse = interface{} - -type ProjectPurgeBuildCacheResponse = interface{} - -type ProjectNewParams struct { - // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Project ProjectParam `json:"project,required"` -} - -func (r ProjectNewParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Project) -} - -type ProjectNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result Project `json:"result,required"` - // Whether the API call was successful - Success ProjectNewResponseEnvelopeSuccess `json:"success,required"` - JSON projectNewResponseEnvelopeJSON `json:"-"` +type ProjectEditResponseEnvelope struct { + Errors []ProjectEditResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectEditResponseEnvelopeMessages `json:"messages,required"` + Result ProjectEditResponse `json:"result,required"` + // Whether the API call was successful. + Success ProjectEditResponseEnvelopeSuccess `json:"success,required"` + JSON projectEditResponseEnvelopeJSON `json:"-"` } -// projectNewResponseEnvelopeJSON contains the JSON metadata for the struct -// [ProjectNewResponseEnvelope] -type projectNewResponseEnvelopeJSON struct { +// projectEditResponseEnvelopeJSON contains the JSON metadata for the struct +// [ProjectEditResponseEnvelope] +type projectEditResponseEnvelopeJSON struct { Errors apijson.Field Messages apijson.Field Result apijson.Field @@ -2939,160 +11906,135 @@ type projectNewResponseEnvelopeJSON struct { ExtraFields map[string]apijson.Field } -func (r *ProjectNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectNewResponseEnvelopeJSON) RawJSON() string { +func (r projectEditResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful -type ProjectNewResponseEnvelopeSuccess bool - -const ( - ProjectNewResponseEnvelopeSuccessFalse ProjectNewResponseEnvelopeSuccess = false - ProjectNewResponseEnvelopeSuccessTrue ProjectNewResponseEnvelopeSuccess = true -) - -func (r ProjectNewResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case ProjectNewResponseEnvelopeSuccessFalse, ProjectNewResponseEnvelopeSuccessTrue: - return true - } - return false +type ProjectEditResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectEditResponseEnvelopeErrorsSource `json:"source"` + JSON projectEditResponseEnvelopeErrorsJSON `json:"-"` } -type ProjectListParams struct { - // Identifier - AccountID param.Field[string] `path:"account_id,required"` - // Which page of projects to fetch. - Page param.Field[int64] `query:"page"` - // How many project to return per page. - PerPage param.Field[int64] `query:"per_page"` +// projectEditResponseEnvelopeErrorsJSON contains the JSON metadata for the struct +// [ProjectEditResponseEnvelopeErrors] +type projectEditResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field } -// URLQuery serializes [ProjectListParams]'s query parameters as `url.Values`. -func (r ProjectListParams) URLQuery() (v url.Values) { - return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ - ArrayFormat: apiquery.ArrayQueryFormatRepeat, - NestedFormat: apiquery.NestedQueryFormatDots, - }) +func (r *ProjectEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -type ProjectDeleteParams struct { - // Identifier - AccountID param.Field[string] `path:"account_id,required"` +func (r projectEditResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw } -type ProjectDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ProjectDeleteResponse `json:"result,required,nullable"` - // Whether the API call was successful - Success ProjectDeleteResponseEnvelopeSuccess `json:"success,required"` - JSON projectDeleteResponseEnvelopeJSON `json:"-"` +type ProjectEditResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectEditResponseEnvelopeErrorsSourceJSON `json:"-"` } -// projectDeleteResponseEnvelopeJSON contains the JSON metadata for the struct -// [ProjectDeleteResponseEnvelope] -type projectDeleteResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field +// projectEditResponseEnvelopeErrorsSourceJSON contains the JSON metadata for the +// struct [ProjectEditResponseEnvelopeErrorsSource] +type projectEditResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectEditResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectDeleteResponseEnvelopeJSON) RawJSON() string { +func (r projectEditResponseEnvelopeErrorsSourceJSON) RawJSON() string { return r.raw } -// Whether the API call was successful -type ProjectDeleteResponseEnvelopeSuccess bool - -const ( - ProjectDeleteResponseEnvelopeSuccessFalse ProjectDeleteResponseEnvelopeSuccess = false - ProjectDeleteResponseEnvelopeSuccessTrue ProjectDeleteResponseEnvelopeSuccess = true -) +type ProjectEditResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectEditResponseEnvelopeMessagesSource `json:"source"` + JSON projectEditResponseEnvelopeMessagesJSON `json:"-"` +} -func (r ProjectDeleteResponseEnvelopeSuccess) IsKnown() bool { - switch r { - case ProjectDeleteResponseEnvelopeSuccessFalse, ProjectDeleteResponseEnvelopeSuccessTrue: - return true - } - return false +// projectEditResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [ProjectEditResponseEnvelopeMessages] +type projectEditResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field } -type ProjectEditParams struct { - // Identifier - AccountID param.Field[string] `path:"account_id,required"` - Project ProjectParam `json:"project,required"` +func (r *ProjectEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -func (r ProjectEditParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Project) +func (r projectEditResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw } -type ProjectEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result Project `json:"result,required"` - // Whether the API call was successful - Success ProjectEditResponseEnvelopeSuccess `json:"success,required"` - JSON projectEditResponseEnvelopeJSON `json:"-"` +type ProjectEditResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectEditResponseEnvelopeMessagesSourceJSON `json:"-"` } -// projectEditResponseEnvelopeJSON contains the JSON metadata for the struct -// [ProjectEditResponseEnvelope] -type projectEditResponseEnvelopeJSON struct { - Errors apijson.Field - Messages apijson.Field - Result apijson.Field - Success apijson.Field +// projectEditResponseEnvelopeMessagesSourceJSON contains the JSON metadata for the +// struct [ProjectEditResponseEnvelopeMessagesSource] +type projectEditResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *ProjectEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { +func (r *ProjectEditResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r projectEditResponseEnvelopeJSON) RawJSON() string { +func (r projectEditResponseEnvelopeMessagesSourceJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +// Whether the API call was successful. type ProjectEditResponseEnvelopeSuccess bool const ( - ProjectEditResponseEnvelopeSuccessFalse ProjectEditResponseEnvelopeSuccess = false - ProjectEditResponseEnvelopeSuccessTrue ProjectEditResponseEnvelopeSuccess = true + ProjectEditResponseEnvelopeSuccessTrue ProjectEditResponseEnvelopeSuccess = true ) func (r ProjectEditResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectEditResponseEnvelopeSuccessFalse, ProjectEditResponseEnvelopeSuccessTrue: + case ProjectEditResponseEnvelopeSuccessTrue: return true } return false } type ProjectGetParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` } type ProjectGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result Project `json:"result,required"` - // Whether the API call was successful + Errors []ProjectGetResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectGetResponseEnvelopeMessages `json:"messages,required"` + Result ProjectGetResponse `json:"result,required"` + // Whether the API call was successful. Success ProjectGetResponseEnvelopeSuccess `json:"success,required"` JSON projectGetResponseEnvelopeJSON `json:"-"` } @@ -3116,32 +12058,127 @@ func (r projectGetResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectGetResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectGetResponseEnvelopeErrorsSource `json:"source"` + JSON projectGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectGetResponseEnvelopeErrorsJSON contains the JSON metadata for the struct +// [ProjectGetResponseEnvelopeErrors] +type projectGetResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectGetResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectGetResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectGetResponseEnvelopeErrorsSourceJSON contains the JSON metadata for the +// struct [ProjectGetResponseEnvelopeErrorsSource] +type projectGetResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectGetResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectGetResponseEnvelopeMessagesSource `json:"source"` + JSON projectGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectGetResponseEnvelopeMessagesJSON contains the JSON metadata for the struct +// [ProjectGetResponseEnvelopeMessages] +type projectGetResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectGetResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectGetResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectGetResponseEnvelopeMessagesSourceJSON contains the JSON metadata for the +// struct [ProjectGetResponseEnvelopeMessagesSource] +type projectGetResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectGetResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectGetResponseEnvelopeSuccess bool const ( - ProjectGetResponseEnvelopeSuccessFalse ProjectGetResponseEnvelopeSuccess = false - ProjectGetResponseEnvelopeSuccessTrue ProjectGetResponseEnvelopeSuccess = true + ProjectGetResponseEnvelopeSuccessTrue ProjectGetResponseEnvelopeSuccess = true ) func (r ProjectGetResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectGetResponseEnvelopeSuccessFalse, ProjectGetResponseEnvelopeSuccessTrue: + case ProjectGetResponseEnvelopeSuccessTrue: return true } return false } type ProjectPurgeBuildCacheParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` } type ProjectPurgeBuildCacheResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ProjectPurgeBuildCacheResponse `json:"result,required,nullable"` - // Whether the API call was successful + Errors []ProjectPurgeBuildCacheResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectPurgeBuildCacheResponseEnvelopeMessages `json:"messages,required"` + Result ProjectPurgeBuildCacheResponse `json:"result,required,nullable"` + // Whether the API call was successful. Success ProjectPurgeBuildCacheResponseEnvelopeSuccess `json:"success,required"` JSON projectPurgeBuildCacheResponseEnvelopeJSON `json:"-"` } @@ -3165,17 +12202,112 @@ func (r projectPurgeBuildCacheResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectPurgeBuildCacheResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectPurgeBuildCacheResponseEnvelopeErrorsSource `json:"source"` + JSON projectPurgeBuildCacheResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectPurgeBuildCacheResponseEnvelopeErrorsJSON contains the JSON metadata for +// the struct [ProjectPurgeBuildCacheResponseEnvelopeErrors] +type projectPurgeBuildCacheResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectPurgeBuildCacheResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectPurgeBuildCacheResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectPurgeBuildCacheResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectPurgeBuildCacheResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectPurgeBuildCacheResponseEnvelopeErrorsSourceJSON contains the JSON +// metadata for the struct [ProjectPurgeBuildCacheResponseEnvelopeErrorsSource] +type projectPurgeBuildCacheResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectPurgeBuildCacheResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectPurgeBuildCacheResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectPurgeBuildCacheResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectPurgeBuildCacheResponseEnvelopeMessagesSource `json:"source"` + JSON projectPurgeBuildCacheResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectPurgeBuildCacheResponseEnvelopeMessagesJSON contains the JSON metadata +// for the struct [ProjectPurgeBuildCacheResponseEnvelopeMessages] +type projectPurgeBuildCacheResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectPurgeBuildCacheResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectPurgeBuildCacheResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectPurgeBuildCacheResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectPurgeBuildCacheResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectPurgeBuildCacheResponseEnvelopeMessagesSourceJSON contains the JSON +// metadata for the struct [ProjectPurgeBuildCacheResponseEnvelopeMessagesSource] +type projectPurgeBuildCacheResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectPurgeBuildCacheResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectPurgeBuildCacheResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectPurgeBuildCacheResponseEnvelopeSuccess bool const ( - ProjectPurgeBuildCacheResponseEnvelopeSuccessFalse ProjectPurgeBuildCacheResponseEnvelopeSuccess = false - ProjectPurgeBuildCacheResponseEnvelopeSuccessTrue ProjectPurgeBuildCacheResponseEnvelopeSuccess = true + ProjectPurgeBuildCacheResponseEnvelopeSuccessTrue ProjectPurgeBuildCacheResponseEnvelopeSuccess = true ) func (r ProjectPurgeBuildCacheResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectPurgeBuildCacheResponseEnvelopeSuccessFalse, ProjectPurgeBuildCacheResponseEnvelopeSuccessTrue: + case ProjectPurgeBuildCacheResponseEnvelopeSuccessTrue: return true } return false diff --git a/pages/project_test.go b/pages/project_test.go index a623d9a5e25..4c36d2330c9 100644 --- a/pages/project_test.go +++ b/pages/project_test.go @@ -28,11 +28,286 @@ func TestProjectNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Pages.Projects.New(context.TODO(), pages.ProjectNewParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Name: cloudflare.F("my-pages-app"), + ProductionBranch: cloudflare.F("main"), + BuildConfig: cloudflare.F(pages.ProjectNewParamsBuildConfig{ + BuildCaching: cloudflare.F(true), + BuildCommand: cloudflare.F("npm run build"), + DestinationDir: cloudflare.F("build"), + RootDir: cloudflare.F("/"), + WebAnalyticsTag: cloudflare.F("cee1c73f6e4743d0b5e6bb1a0bcaabcc"), + WebAnalyticsToken: cloudflare.F("021e1057c18547eca7b79f2516f06o7x"), + }), + DeploymentConfigs: cloudflare.F(pages.ProjectNewParamsDeploymentConfigs{ + Preview: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsPreview{ + AIBindings: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewAIBindings{ + "AI_BINDING": { + ProjectID: cloudflare.F("some-project-id"), + }, + }), + AlwaysUseLatestCompatibilityDate: cloudflare.F(false), + AnalyticsEngineDatasets: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewAnalyticsEngineDatasets{ + "ANALYTICS_ENGINE_BINDING": { + Dataset: cloudflare.F("api_analytics"), + }, + }), + Browsers: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewBrowsers{ + "BROWSER": {}, + }), + BuildImageMajorVersion: cloudflare.F(int64(3)), + CompatibilityDate: cloudflare.F("2025-01-01"), + CompatibilityFlags: cloudflare.F([]string{"url_standard"}), + D1Databases: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewD1Databases{ + "D1_BINDING": { + ID: cloudflare.F("445e2955-951a-43f8-a35b-a4d0c8138f63"), + }, + }), + DurableObjectNamespaces: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewDurableObjectNamespaces{ + "DO_BINDING": { + NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), + }, + }), + EnvVars: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewEnvVarsUnion{ + "foo": pages.ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar{ + Type: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText), + Value: cloudflare.F("hello world"), + }, + }), + FailOpen: cloudflare.F(true), + HyperdriveBindings: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewHyperdriveBindings{ + "HYPERDRIVE": { + ID: cloudflare.F("a76a99bc342644deb02c38d66082262a"), + }, + }), + KVNamespaces: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewKVNamespaces{ + "KV_BINDING": { + NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), + }, + }), + Limits: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsPreviewLimits{ + CPUMs: cloudflare.F(int64(100)), + }), + MTLSCertificates: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewMTLSCertificates{ + "MTLS": { + CertificateID: cloudflare.F("d7cdd17c-916f-4cb7-aabe-585eb382ec4e"), + }, + }), + Placement: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsPreviewPlacement{ + Mode: cloudflare.F("smart"), + }), + QueueProducers: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewQueueProducers{ + "QUEUE_PRODUCER_BINDING": { + Name: cloudflare.F("some-queue"), + }, + }), + R2Buckets: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewR2Buckets{ + "R2_BINDING": { + Name: cloudflare.F("some-bucket"), + Jurisdiction: cloudflare.F("eu"), + }, + }), + Services: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewServices{ + "SERVICE_BINDING": { + Service: cloudflare.F("example-worker"), + Entrypoint: cloudflare.F("MyHandler"), + Environment: cloudflare.F("production"), + }, + }), + UsageModel: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsPreviewUsageModelStandard), + VectorizeBindings: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsPreviewVectorizeBindings{ + "VECTORIZE": { + IndexName: cloudflare.F("my_index"), + }, + }), + WranglerConfigHash: cloudflare.F("abc123def456"), + }), + Production: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsProduction{ + AIBindings: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionAIBindings{ + "AI_BINDING": { + ProjectID: cloudflare.F("some-project-id"), + }, + }), + AlwaysUseLatestCompatibilityDate: cloudflare.F(false), + AnalyticsEngineDatasets: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionAnalyticsEngineDatasets{ + "ANALYTICS_ENGINE_BINDING": { + Dataset: cloudflare.F("api_analytics"), + }, + }), + Browsers: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionBrowsers{ + "BROWSER": {}, + }), + BuildImageMajorVersion: cloudflare.F(int64(3)), + CompatibilityDate: cloudflare.F("2025-01-01"), + CompatibilityFlags: cloudflare.F([]string{"url_standard"}), + D1Databases: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionD1Databases{ + "D1_BINDING": { + ID: cloudflare.F("445e2955-951a-43f8-a35b-a4d0c8138f63"), + }, + }), + DurableObjectNamespaces: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionDurableObjectNamespaces{ + "DO_BINDING": { + NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), + }, + }), + EnvVars: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionEnvVarsUnion{ + "foo": pages.ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar{ + Type: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText), + Value: cloudflare.F("hello world"), + }, + }), + FailOpen: cloudflare.F(true), + HyperdriveBindings: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionHyperdriveBindings{ + "HYPERDRIVE": { + ID: cloudflare.F("a76a99bc342644deb02c38d66082262a"), + }, + }), + KVNamespaces: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionKVNamespaces{ + "KV_BINDING": { + NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), + }, + }), + Limits: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsProductionLimits{ + CPUMs: cloudflare.F(int64(100)), + }), + MTLSCertificates: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionMTLSCertificates{ + "MTLS": { + CertificateID: cloudflare.F("d7cdd17c-916f-4cb7-aabe-585eb382ec4e"), + }, + }), + Placement: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsProductionPlacement{ + Mode: cloudflare.F("smart"), + }), + QueueProducers: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionQueueProducers{ + "QUEUE_PRODUCER_BINDING": { + Name: cloudflare.F("some-queue"), + }, + }), + R2Buckets: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionR2Buckets{ + "R2_BINDING": { + Name: cloudflare.F("some-bucket"), + Jurisdiction: cloudflare.F("eu"), + }, + }), + Services: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionServices{ + "SERVICE_BINDING": { + Service: cloudflare.F("example-worker"), + Entrypoint: cloudflare.F("MyHandler"), + Environment: cloudflare.F("production"), + }, + }), + UsageModel: cloudflare.F(pages.ProjectNewParamsDeploymentConfigsProductionUsageModelStandard), + VectorizeBindings: cloudflare.F(map[string]pages.ProjectNewParamsDeploymentConfigsProductionVectorizeBindings{ + "VECTORIZE": { + IndexName: cloudflare.F("my_index"), + }, + }), + WranglerConfigHash: cloudflare.F("abc123def456"), + }), + }), + Source: cloudflare.F(pages.ProjectNewParamsSource{ + Config: cloudflare.F(pages.ProjectNewParamsSourceConfig{ + DeploymentsEnabled: cloudflare.F(true), + Owner: cloudflare.F("my-org"), + OwnerID: cloudflare.F("12345678"), + PathExcludes: cloudflare.F([]string{"string"}), + PathIncludes: cloudflare.F([]string{"string"}), + PrCommentsEnabled: cloudflare.F(true), + PreviewBranchExcludes: cloudflare.F([]string{"string"}), + PreviewBranchIncludes: cloudflare.F([]string{"string"}), + PreviewDeploymentSetting: cloudflare.F(pages.ProjectNewParamsSourceConfigPreviewDeploymentSettingAll), + ProductionBranch: cloudflare.F("main"), + ProductionDeploymentsEnabled: cloudflare.F(true), + RepoID: cloudflare.F("12345678"), + RepoName: cloudflare.F("my-repo"), + }), + Type: cloudflare.F(pages.ProjectNewParamsSourceTypeGitHub), + }), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestProjectListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Pages.Projects.List(context.TODO(), pages.ProjectListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Project: pages.ProjectParam{ - Name: cloudflare.F("my-pages-app"), - ProductionBranch: cloudflare.F("main"), - BuildConfig: cloudflare.F(pages.ProjectBuildConfigParam{ + Page: cloudflare.F(int64(1)), + PerPage: cloudflare.F(int64(10)), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestProjectDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Pages.Projects.Delete( + context.TODO(), + "this-is-my-project-01", + pages.ProjectDeleteParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestProjectEditWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.Pages.Projects.Edit( + context.TODO(), + "this-is-my-project-01", + pages.ProjectEditParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + BuildConfig: cloudflare.F(pages.ProjectEditParamsBuildConfig{ BuildCaching: cloudflare.F(true), BuildCommand: cloudflare.F("npm run build"), DestinationDir: cloudflare.F("build"), @@ -40,165 +315,165 @@ func TestProjectNewWithOptionalParams(t *testing.T) { WebAnalyticsTag: cloudflare.F("cee1c73f6e4743d0b5e6bb1a0bcaabcc"), WebAnalyticsToken: cloudflare.F("021e1057c18547eca7b79f2516f06o7x"), }), - DeploymentConfigs: cloudflare.F(pages.ProjectDeploymentConfigsParam{ - Preview: cloudflare.F(pages.ProjectDeploymentConfigsPreviewParam{ - AIBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewAIBindingParam{ + DeploymentConfigs: cloudflare.F(pages.ProjectEditParamsDeploymentConfigs{ + Preview: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsPreview{ + AIBindings: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewAIBindings{ "AI_BINDING": { ProjectID: cloudflare.F("some-project-id"), }, }), AlwaysUseLatestCompatibilityDate: cloudflare.F(false), - AnalyticsEngineDatasets: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewAnalyticsEngineDatasetParam{ + AnalyticsEngineDatasets: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewAnalyticsEngineDatasets{ "ANALYTICS_ENGINE_BINDING": { Dataset: cloudflare.F("api_analytics"), }, }), - Browsers: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewBrowserParam{ + Browsers: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewBrowsers{ "BROWSER": {}, }), BuildImageMajorVersion: cloudflare.F(int64(3)), CompatibilityDate: cloudflare.F("2025-01-01"), CompatibilityFlags: cloudflare.F([]string{"url_standard"}), - D1Databases: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewD1DatabaseParam{ + D1Databases: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewD1Databases{ "D1_BINDING": { ID: cloudflare.F("445e2955-951a-43f8-a35b-a4d0c8138f63"), }, }), - DurableObjectNamespaces: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewDurableObjectNamespaceParam{ + DurableObjectNamespaces: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewDurableObjectNamespaces{ "DO_BINDING": { NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), }, }), - EnvVars: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewEnvVarsUnionParam{ - "foo": pages.ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarParam{ - Type: cloudflare.F(pages.ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText), + EnvVars: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewEnvVarsUnion{ + "foo": pages.ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVar{ + Type: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText), Value: cloudflare.F("hello world"), }, }), FailOpen: cloudflare.F(true), - HyperdriveBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewHyperdriveBindingParam{ + HyperdriveBindings: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewHyperdriveBindings{ "HYPERDRIVE": { ID: cloudflare.F("a76a99bc342644deb02c38d66082262a"), }, }), - KVNamespaces: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewKVNamespaceParam{ + KVNamespaces: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewKVNamespaces{ "KV_BINDING": { NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), }, }), - Limits: cloudflare.F(pages.ProjectDeploymentConfigsPreviewLimitsParam{ + Limits: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsPreviewLimits{ CPUMs: cloudflare.F(int64(100)), }), - MTLSCertificates: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewMTLSCertificateParam{ + MTLSCertificates: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewMTLSCertificates{ "MTLS": { CertificateID: cloudflare.F("d7cdd17c-916f-4cb7-aabe-585eb382ec4e"), }, }), - Placement: cloudflare.F(pages.ProjectDeploymentConfigsPreviewPlacementParam{ + Placement: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsPreviewPlacement{ Mode: cloudflare.F("smart"), }), - QueueProducers: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewQueueProducerParam{ + QueueProducers: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewQueueProducers{ "QUEUE_PRODUCER_BINDING": { Name: cloudflare.F("some-queue"), }, }), - R2Buckets: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewR2BucketParam{ + R2Buckets: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewR2Buckets{ "R2_BINDING": { - Jurisdiction: cloudflare.F("eu"), Name: cloudflare.F("some-bucket"), + Jurisdiction: cloudflare.F("eu"), }, }), - Services: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewServiceParam{ + Services: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewServices{ "SERVICE_BINDING": { + Service: cloudflare.F("example-worker"), Entrypoint: cloudflare.F("MyHandler"), Environment: cloudflare.F("production"), - Service: cloudflare.F("example-worker"), }, }), - UsageModel: cloudflare.F(pages.ProjectDeploymentConfigsPreviewUsageModelStandard), - VectorizeBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewVectorizeBindingParam{ + UsageModel: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsPreviewUsageModelStandard), + VectorizeBindings: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsPreviewVectorizeBindings{ "VECTORIZE": { IndexName: cloudflare.F("my_index"), }, }), WranglerConfigHash: cloudflare.F("abc123def456"), }), - Production: cloudflare.F(pages.ProjectDeploymentConfigsProductionParam{ - AIBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionAIBindingParam{ + Production: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsProduction{ + AIBindings: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionAIBindings{ "AI_BINDING": { ProjectID: cloudflare.F("some-project-id"), }, }), AlwaysUseLatestCompatibilityDate: cloudflare.F(false), - AnalyticsEngineDatasets: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionAnalyticsEngineDatasetParam{ + AnalyticsEngineDatasets: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionAnalyticsEngineDatasets{ "ANALYTICS_ENGINE_BINDING": { Dataset: cloudflare.F("api_analytics"), }, }), - Browsers: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionBrowserParam{ + Browsers: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionBrowsers{ "BROWSER": {}, }), BuildImageMajorVersion: cloudflare.F(int64(3)), CompatibilityDate: cloudflare.F("2025-01-01"), CompatibilityFlags: cloudflare.F([]string{"url_standard"}), - D1Databases: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionD1DatabaseParam{ + D1Databases: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionD1Databases{ "D1_BINDING": { ID: cloudflare.F("445e2955-951a-43f8-a35b-a4d0c8138f63"), }, }), - DurableObjectNamespaces: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionDurableObjectNamespaceParam{ + DurableObjectNamespaces: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionDurableObjectNamespaces{ "DO_BINDING": { NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), }, }), - EnvVars: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionEnvVarsUnionParam{ - "foo": pages.ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarParam{ - Type: cloudflare.F(pages.ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText), + EnvVars: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionEnvVarsUnion{ + "foo": pages.ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVar{ + Type: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText), Value: cloudflare.F("hello world"), }, }), FailOpen: cloudflare.F(true), - HyperdriveBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionHyperdriveBindingParam{ + HyperdriveBindings: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionHyperdriveBindings{ "HYPERDRIVE": { ID: cloudflare.F("a76a99bc342644deb02c38d66082262a"), }, }), - KVNamespaces: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionKVNamespaceParam{ + KVNamespaces: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionKVNamespaces{ "KV_BINDING": { NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), }, }), - Limits: cloudflare.F(pages.ProjectDeploymentConfigsProductionLimitsParam{ + Limits: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsProductionLimits{ CPUMs: cloudflare.F(int64(100)), }), - MTLSCertificates: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionMTLSCertificateParam{ + MTLSCertificates: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionMTLSCertificates{ "MTLS": { CertificateID: cloudflare.F("d7cdd17c-916f-4cb7-aabe-585eb382ec4e"), }, }), - Placement: cloudflare.F(pages.ProjectDeploymentConfigsProductionPlacementParam{ + Placement: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsProductionPlacement{ Mode: cloudflare.F("smart"), }), - QueueProducers: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionQueueProducerParam{ + QueueProducers: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionQueueProducers{ "QUEUE_PRODUCER_BINDING": { Name: cloudflare.F("some-queue"), }, }), - R2Buckets: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionR2BucketParam{ + R2Buckets: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionR2Buckets{ "R2_BINDING": { - Jurisdiction: cloudflare.F("eu"), Name: cloudflare.F("some-bucket"), + Jurisdiction: cloudflare.F("eu"), }, }), - Services: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionServiceParam{ + Services: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionServices{ "SERVICE_BINDING": { + Service: cloudflare.F("example-worker"), Entrypoint: cloudflare.F("MyHandler"), Environment: cloudflare.F("production"), - Service: cloudflare.F("example-worker"), }, }), - UsageModel: cloudflare.F(pages.ProjectDeploymentConfigsProductionUsageModelStandard), - VectorizeBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionVectorizeBindingParam{ + UsageModel: cloudflare.F(pages.ProjectEditParamsDeploymentConfigsProductionUsageModelStandard), + VectorizeBindings: cloudflare.F(map[string]pages.ProjectEditParamsDeploymentConfigsProductionVectorizeBindings{ "VECTORIZE": { IndexName: cloudflare.F("my_index"), }, @@ -206,302 +481,27 @@ func TestProjectNewWithOptionalParams(t *testing.T) { WranglerConfigHash: cloudflare.F("abc123def456"), }), }), - Source: cloudflare.F(pages.ProjectSourceParam{ - Config: cloudflare.F(pages.ProjectSourceConfigParam{ + Name: cloudflare.F("my-pages-app"), + ProductionBranch: cloudflare.F("main"), + Source: cloudflare.F(pages.ProjectEditParamsSource{ + Config: cloudflare.F(pages.ProjectEditParamsSourceConfig{ DeploymentsEnabled: cloudflare.F(true), Owner: cloudflare.F("my-org"), + OwnerID: cloudflare.F("12345678"), PathExcludes: cloudflare.F([]string{"string"}), PathIncludes: cloudflare.F([]string{"string"}), PrCommentsEnabled: cloudflare.F(true), PreviewBranchExcludes: cloudflare.F([]string{"string"}), PreviewBranchIncludes: cloudflare.F([]string{"string"}), - PreviewDeploymentSetting: cloudflare.F(pages.ProjectSourceConfigPreviewDeploymentSettingAll), + PreviewDeploymentSetting: cloudflare.F(pages.ProjectEditParamsSourceConfigPreviewDeploymentSettingAll), ProductionBranch: cloudflare.F("main"), ProductionDeploymentsEnabled: cloudflare.F(true), + RepoID: cloudflare.F("12345678"), RepoName: cloudflare.F("my-repo"), }), - Type: cloudflare.F(pages.ProjectSourceTypeGitHub), + Type: cloudflare.F(pages.ProjectEditParamsSourceTypeGitHub), }), }, - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestProjectListWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Pages.Projects.List(context.TODO(), pages.ProjectListParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Page: cloudflare.F(int64(1)), - PerPage: cloudflare.F(int64(10)), - }) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestProjectDelete(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Pages.Projects.Delete( - context.TODO(), - "this-is-my-project-01", - pages.ProjectDeleteParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - }, - ) - if err != nil { - var apierr *cloudflare.Error - if errors.As(err, &apierr) { - t.Log(string(apierr.DumpRequest(true))) - } - t.Fatalf("err should be nil: %s", err.Error()) - } -} - -func TestProjectEditWithOptionalParams(t *testing.T) { - baseURL := "http://localhost:4010" - if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { - baseURL = envURL - } - if !testutil.CheckTestServer(t, baseURL) { - return - } - client := cloudflare.NewClient( - option.WithBaseURL(baseURL), - option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), - option.WithAPIEmail("user@example.com"), - ) - _, err := client.Pages.Projects.Edit( - context.TODO(), - "this-is-my-project-01", - pages.ProjectEditParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Project: pages.ProjectParam{ - Name: cloudflare.F("my-pages-app"), - ProductionBranch: cloudflare.F("main"), - BuildConfig: cloudflare.F(pages.ProjectBuildConfigParam{ - BuildCaching: cloudflare.F(true), - BuildCommand: cloudflare.F("npm run build"), - DestinationDir: cloudflare.F("build"), - RootDir: cloudflare.F("/"), - WebAnalyticsTag: cloudflare.F("cee1c73f6e4743d0b5e6bb1a0bcaabcc"), - WebAnalyticsToken: cloudflare.F("021e1057c18547eca7b79f2516f06o7x"), - }), - DeploymentConfigs: cloudflare.F(pages.ProjectDeploymentConfigsParam{ - Preview: cloudflare.F(pages.ProjectDeploymentConfigsPreviewParam{ - AIBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewAIBindingParam{ - "AI_BINDING": { - ProjectID: cloudflare.F("some-project-id"), - }, - }), - AlwaysUseLatestCompatibilityDate: cloudflare.F(false), - AnalyticsEngineDatasets: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewAnalyticsEngineDatasetParam{ - "ANALYTICS_ENGINE_BINDING": { - Dataset: cloudflare.F("api_analytics"), - }, - }), - Browsers: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewBrowserParam{ - "BROWSER": {}, - }), - BuildImageMajorVersion: cloudflare.F(int64(3)), - CompatibilityDate: cloudflare.F("2025-01-01"), - CompatibilityFlags: cloudflare.F([]string{"url_standard"}), - D1Databases: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewD1DatabaseParam{ - "D1_BINDING": { - ID: cloudflare.F("445e2955-951a-43f8-a35b-a4d0c8138f63"), - }, - }), - DurableObjectNamespaces: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewDurableObjectNamespaceParam{ - "DO_BINDING": { - NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), - }, - }), - EnvVars: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewEnvVarsUnionParam{ - "foo": pages.ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarParam{ - Type: cloudflare.F(pages.ProjectDeploymentConfigsPreviewEnvVarsPagesPlainTextEnvVarTypePlainText), - Value: cloudflare.F("hello world"), - }, - }), - FailOpen: cloudflare.F(true), - HyperdriveBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewHyperdriveBindingParam{ - "HYPERDRIVE": { - ID: cloudflare.F("a76a99bc342644deb02c38d66082262a"), - }, - }), - KVNamespaces: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewKVNamespaceParam{ - "KV_BINDING": { - NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), - }, - }), - Limits: cloudflare.F(pages.ProjectDeploymentConfigsPreviewLimitsParam{ - CPUMs: cloudflare.F(int64(100)), - }), - MTLSCertificates: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewMTLSCertificateParam{ - "MTLS": { - CertificateID: cloudflare.F("d7cdd17c-916f-4cb7-aabe-585eb382ec4e"), - }, - }), - Placement: cloudflare.F(pages.ProjectDeploymentConfigsPreviewPlacementParam{ - Mode: cloudflare.F("smart"), - }), - QueueProducers: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewQueueProducerParam{ - "QUEUE_PRODUCER_BINDING": { - Name: cloudflare.F("some-queue"), - }, - }), - R2Buckets: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewR2BucketParam{ - "R2_BINDING": { - Jurisdiction: cloudflare.F("eu"), - Name: cloudflare.F("some-bucket"), - }, - }), - Services: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewServiceParam{ - "SERVICE_BINDING": { - Entrypoint: cloudflare.F("MyHandler"), - Environment: cloudflare.F("production"), - Service: cloudflare.F("example-worker"), - }, - }), - UsageModel: cloudflare.F(pages.ProjectDeploymentConfigsPreviewUsageModelStandard), - VectorizeBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsPreviewVectorizeBindingParam{ - "VECTORIZE": { - IndexName: cloudflare.F("my_index"), - }, - }), - WranglerConfigHash: cloudflare.F("abc123def456"), - }), - Production: cloudflare.F(pages.ProjectDeploymentConfigsProductionParam{ - AIBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionAIBindingParam{ - "AI_BINDING": { - ProjectID: cloudflare.F("some-project-id"), - }, - }), - AlwaysUseLatestCompatibilityDate: cloudflare.F(false), - AnalyticsEngineDatasets: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionAnalyticsEngineDatasetParam{ - "ANALYTICS_ENGINE_BINDING": { - Dataset: cloudflare.F("api_analytics"), - }, - }), - Browsers: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionBrowserParam{ - "BROWSER": {}, - }), - BuildImageMajorVersion: cloudflare.F(int64(3)), - CompatibilityDate: cloudflare.F("2025-01-01"), - CompatibilityFlags: cloudflare.F([]string{"url_standard"}), - D1Databases: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionD1DatabaseParam{ - "D1_BINDING": { - ID: cloudflare.F("445e2955-951a-43f8-a35b-a4d0c8138f63"), - }, - }), - DurableObjectNamespaces: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionDurableObjectNamespaceParam{ - "DO_BINDING": { - NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), - }, - }), - EnvVars: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionEnvVarsUnionParam{ - "foo": pages.ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarParam{ - Type: cloudflare.F(pages.ProjectDeploymentConfigsProductionEnvVarsPagesPlainTextEnvVarTypePlainText), - Value: cloudflare.F("hello world"), - }, - }), - FailOpen: cloudflare.F(true), - HyperdriveBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionHyperdriveBindingParam{ - "HYPERDRIVE": { - ID: cloudflare.F("a76a99bc342644deb02c38d66082262a"), - }, - }), - KVNamespaces: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionKVNamespaceParam{ - "KV_BINDING": { - NamespaceID: cloudflare.F("5eb63bbbe01eeed093cb22bb8f5acdc3"), - }, - }), - Limits: cloudflare.F(pages.ProjectDeploymentConfigsProductionLimitsParam{ - CPUMs: cloudflare.F(int64(100)), - }), - MTLSCertificates: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionMTLSCertificateParam{ - "MTLS": { - CertificateID: cloudflare.F("d7cdd17c-916f-4cb7-aabe-585eb382ec4e"), - }, - }), - Placement: cloudflare.F(pages.ProjectDeploymentConfigsProductionPlacementParam{ - Mode: cloudflare.F("smart"), - }), - QueueProducers: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionQueueProducerParam{ - "QUEUE_PRODUCER_BINDING": { - Name: cloudflare.F("some-queue"), - }, - }), - R2Buckets: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionR2BucketParam{ - "R2_BINDING": { - Jurisdiction: cloudflare.F("eu"), - Name: cloudflare.F("some-bucket"), - }, - }), - Services: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionServiceParam{ - "SERVICE_BINDING": { - Entrypoint: cloudflare.F("MyHandler"), - Environment: cloudflare.F("production"), - Service: cloudflare.F("example-worker"), - }, - }), - UsageModel: cloudflare.F(pages.ProjectDeploymentConfigsProductionUsageModelStandard), - VectorizeBindings: cloudflare.F(map[string]pages.ProjectDeploymentConfigsProductionVectorizeBindingParam{ - "VECTORIZE": { - IndexName: cloudflare.F("my_index"), - }, - }), - WranglerConfigHash: cloudflare.F("abc123def456"), - }), - }), - Source: cloudflare.F(pages.ProjectSourceParam{ - Config: cloudflare.F(pages.ProjectSourceConfigParam{ - DeploymentsEnabled: cloudflare.F(true), - Owner: cloudflare.F("my-org"), - PathExcludes: cloudflare.F([]string{"string"}), - PathIncludes: cloudflare.F([]string{"string"}), - PrCommentsEnabled: cloudflare.F(true), - PreviewBranchExcludes: cloudflare.F([]string{"string"}), - PreviewBranchIncludes: cloudflare.F([]string{"string"}), - PreviewDeploymentSetting: cloudflare.F(pages.ProjectSourceConfigPreviewDeploymentSettingAll), - ProductionBranch: cloudflare.F("main"), - ProductionDeploymentsEnabled: cloudflare.F(true), - RepoName: cloudflare.F("my-repo"), - }), - Type: cloudflare.F(pages.ProjectSourceTypeGitHub), - }), - }, - }, ) if err != nil { var apierr *cloudflare.Error diff --git a/pages/projectdeployment.go b/pages/projectdeployment.go index 9c4850fe5d1..37f55b7ed1e 100644 --- a/pages/projectdeployment.go +++ b/pages/projectdeployment.go @@ -11,7 +11,9 @@ import ( "mime/multipart" "net/http" "net/url" + "reflect" "slices" + "time" "github.com/cloudflare/cloudflare-go/v6/internal/apiform" "github.com/cloudflare/cloudflare-go/v6/internal/apijson" @@ -20,7 +22,7 @@ import ( "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" "github.com/cloudflare/cloudflare-go/v6/packages/pagination" - "github.com/cloudflare/cloudflare-go/v6/shared" + "github.com/tidwall/gjson" ) // ProjectDeploymentService contains methods and other services that help with @@ -46,7 +48,7 @@ func NewProjectDeploymentService(opts ...option.RequestOption) (r *ProjectDeploy // Start a new deployment from production. The repository and account must have // already been authorized on the Cloudflare Pages dashboard. -func (r *ProjectDeploymentService) New(ctx context.Context, projectName string, params ProjectDeploymentNewParams, opts ...option.RequestOption) (res *Deployment, err error) { +func (r *ProjectDeploymentService) New(ctx context.Context, projectName string, params ProjectDeploymentNewParams, opts ...option.RequestOption) (res *ProjectDeploymentNewResponse, err error) { var env ProjectDeploymentNewResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { @@ -67,7 +69,7 @@ func (r *ProjectDeploymentService) New(ctx context.Context, projectName string, } // Fetch a list of project deployments. -func (r *ProjectDeploymentService) List(ctx context.Context, projectName string, params ProjectDeploymentListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Deployment], err error) { +func (r *ProjectDeploymentService) List(ctx context.Context, projectName string, params ProjectDeploymentListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[ProjectDeploymentListResponse], err error) { var raw *http.Response opts = slices.Concat(r.Options, opts) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) @@ -93,7 +95,7 @@ func (r *ProjectDeploymentService) List(ctx context.Context, projectName string, } // Fetch a list of project deployments. -func (r *ProjectDeploymentService) ListAutoPaging(ctx context.Context, projectName string, params ProjectDeploymentListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Deployment] { +func (r *ProjectDeploymentService) ListAutoPaging(ctx context.Context, projectName string, params ProjectDeploymentListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[ProjectDeploymentListResponse] { return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, projectName, params, opts...)) } @@ -123,7 +125,7 @@ func (r *ProjectDeploymentService) Delete(ctx context.Context, projectName strin } // Fetch information about a deployment. -func (r *ProjectDeploymentService) Get(ctx context.Context, projectName string, deploymentID string, query ProjectDeploymentGetParams, opts ...option.RequestOption) (res *Deployment, err error) { +func (r *ProjectDeploymentService) Get(ctx context.Context, projectName string, deploymentID string, query ProjectDeploymentGetParams, opts ...option.RequestOption) (res *ProjectDeploymentGetResponse, err error) { var env ProjectDeploymentGetResponseEnvelope opts = slices.Concat(r.Options, opts) if query.AccountID.Value == "" { @@ -148,10 +150,10 @@ func (r *ProjectDeploymentService) Get(ctx context.Context, projectName string, } // Retry a previous deployment. -func (r *ProjectDeploymentService) Retry(ctx context.Context, projectName string, deploymentID string, params ProjectDeploymentRetryParams, opts ...option.RequestOption) (res *Deployment, err error) { +func (r *ProjectDeploymentService) Retry(ctx context.Context, projectName string, deploymentID string, body ProjectDeploymentRetryParams, opts ...option.RequestOption) (res *ProjectDeploymentRetryResponse, err error) { var env ProjectDeploymentRetryResponseEnvelope opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { + if body.AccountID.Value == "" { err = errors.New("missing required account_id parameter") return } @@ -163,8 +165,34 @@ func (r *ProjectDeploymentService) Retry(ctx context.Context, projectName string err = errors.New("missing required deployment_id parameter") return } - path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s/retry", params.AccountID, projectName, deploymentID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s/retry", body.AccountID, projectName, deploymentID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Rollback the production deployment to a previous deployment. You can only +// rollback to succesful builds on production. +func (r *ProjectDeploymentService) Rollback(ctx context.Context, projectName string, deploymentID string, body ProjectDeploymentRollbackParams, opts ...option.RequestOption) (res *ProjectDeploymentRollbackResponse, err error) { + var env ProjectDeploymentRollbackResponseEnvelope + opts = slices.Concat(r.Options, opts) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if projectName == "" { + err = errors.New("missing required project_name parameter") + return + } + if deploymentID == "" { + err = errors.New("missing required deployment_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s/rollback", body.AccountID, projectName, deploymentID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) if err != nil { return } @@ -172,36 +200,2478 @@ func (r *ProjectDeploymentService) Retry(ctx context.Context, projectName string return } -// Rollback the production deployment to a previous deployment. You can only -// rollback to succesful builds on production. -func (r *ProjectDeploymentService) Rollback(ctx context.Context, projectName string, deploymentID string, params ProjectDeploymentRollbackParams, opts ...option.RequestOption) (res *Deployment, err error) { - var env ProjectDeploymentRollbackResponseEnvelope - opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { - err = errors.New("missing required account_id parameter") - return - } - if projectName == "" { - err = errors.New("missing required project_name parameter") - return - } - if deploymentID == "" { - err = errors.New("missing required deployment_id parameter") - return - } - path := fmt.Sprintf("accounts/%s/pages/projects/%s/deployments/%s/rollback", params.AccountID, projectName, deploymentID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) - if err != nil { - return +type ProjectDeploymentNewResponse struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectDeploymentNewResponseBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectDeploymentNewResponseDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectDeploymentNewResponseEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectDeploymentNewResponseEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectDeploymentNewResponseSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectDeploymentNewResponseJSON `json:"-"` +} + +// projectDeploymentNewResponseJSON contains the JSON metadata for the struct +// [ProjectDeploymentNewResponse] +type projectDeploymentNewResponseJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectDeploymentNewResponseBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectDeploymentNewResponseBuildConfigJSON `json:"-"` +} + +// projectDeploymentNewResponseBuildConfigJSON contains the JSON metadata for the +// struct [ProjectDeploymentNewResponseBuildConfig] +type projectDeploymentNewResponseBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectDeploymentNewResponseDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectDeploymentNewResponseDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectDeploymentNewResponseDeploymentTriggerType `json:"type,required"` + JSON projectDeploymentNewResponseDeploymentTriggerJSON `json:"-"` +} + +// projectDeploymentNewResponseDeploymentTriggerJSON contains the JSON metadata for +// the struct [ProjectDeploymentNewResponseDeploymentTrigger] +type projectDeploymentNewResponseDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectDeploymentNewResponseDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectDeploymentNewResponseDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectDeploymentNewResponseDeploymentTriggerMetadataJSON contains the JSON +// metadata for the struct [ProjectDeploymentNewResponseDeploymentTriggerMetadata] +type projectDeploymentNewResponseDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectDeploymentNewResponseDeploymentTriggerType string + +const ( + ProjectDeploymentNewResponseDeploymentTriggerTypeGitHubPush ProjectDeploymentNewResponseDeploymentTriggerType = "github:push" + ProjectDeploymentNewResponseDeploymentTriggerTypeADHoc ProjectDeploymentNewResponseDeploymentTriggerType = "ad_hoc" + ProjectDeploymentNewResponseDeploymentTriggerTypeDeployHook ProjectDeploymentNewResponseDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectDeploymentNewResponseDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectDeploymentNewResponseDeploymentTriggerTypeGitHubPush, ProjectDeploymentNewResponseDeploymentTriggerTypeADHoc, ProjectDeploymentNewResponseDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectDeploymentNewResponseEnvVar struct { + Type ProjectDeploymentNewResponseEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentNewResponseEnvVarJSON `json:"-"` + union ProjectDeploymentNewResponseEnvVarsUnion +} + +// projectDeploymentNewResponseEnvVarJSON contains the JSON metadata for the struct +// [ProjectDeploymentNewResponseEnvVar] +type projectDeploymentNewResponseEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectDeploymentNewResponseEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectDeploymentNewResponseEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectDeploymentNewResponseEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectDeploymentNewResponseEnvVarsUnion] interface which you +// can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVar], +// [ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVar]. +func (r ProjectDeploymentNewResponseEnvVar) AsUnion() ProjectDeploymentNewResponseEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by [ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVar] or +// [ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVar]. +type ProjectDeploymentNewResponseEnvVarsUnion interface { + implementsProjectDeploymentNewResponseEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectDeploymentNewResponseEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVar struct { + Type ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVar] +type projectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVar) implementsProjectDeploymentNewResponseEnvVar() { +} + +type ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarTypePlainText ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentNewResponseEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVar struct { + Type ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVar] +type projectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVar) implementsProjectDeploymentNewResponseEnvVar() { +} + +type ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentNewResponseEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectDeploymentNewResponseEnvVarsType string + +const ( + ProjectDeploymentNewResponseEnvVarsTypePlainText ProjectDeploymentNewResponseEnvVarsType = "plain_text" + ProjectDeploymentNewResponseEnvVarsTypeSecretText ProjectDeploymentNewResponseEnvVarsType = "secret_text" +) + +func (r ProjectDeploymentNewResponseEnvVarsType) IsKnown() bool { + switch r { + case ProjectDeploymentNewResponseEnvVarsTypePlainText, ProjectDeploymentNewResponseEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectDeploymentNewResponseEnvironment string + +const ( + ProjectDeploymentNewResponseEnvironmentPreview ProjectDeploymentNewResponseEnvironment = "preview" + ProjectDeploymentNewResponseEnvironmentProduction ProjectDeploymentNewResponseEnvironment = "production" +) + +func (r ProjectDeploymentNewResponseEnvironment) IsKnown() bool { + switch r { + case ProjectDeploymentNewResponseEnvironmentPreview, ProjectDeploymentNewResponseEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectDeploymentNewResponseSource struct { + Config ProjectDeploymentNewResponseSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectDeploymentNewResponseSourceType `json:"type,required"` + JSON projectDeploymentNewResponseSourceJSON `json:"-"` +} + +// projectDeploymentNewResponseSourceJSON contains the JSON metadata for the struct +// [ProjectDeploymentNewResponseSource] +type projectDeploymentNewResponseSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentNewResponseSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectDeploymentNewResponseSourceConfigJSON `json:"-"` +} + +// projectDeploymentNewResponseSourceConfigJSON contains the JSON metadata for the +// struct [ProjectDeploymentNewResponseSourceConfig] +type projectDeploymentNewResponseSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSetting string + +const ( + ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSettingAll ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSetting = "all" + ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSettingNone ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSetting = "none" + ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSettingCustom ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSettingAll, ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSettingNone, ProjectDeploymentNewResponseSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectDeploymentNewResponseSourceType string + +const ( + ProjectDeploymentNewResponseSourceTypeGitHub ProjectDeploymentNewResponseSourceType = "github" + ProjectDeploymentNewResponseSourceTypeGitlab ProjectDeploymentNewResponseSourceType = "gitlab" +) + +func (r ProjectDeploymentNewResponseSourceType) IsKnown() bool { + switch r { + case ProjectDeploymentNewResponseSourceTypeGitHub, ProjectDeploymentNewResponseSourceTypeGitlab: + return true + } + return false +} + +type ProjectDeploymentListResponse struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectDeploymentListResponseBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectDeploymentListResponseDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectDeploymentListResponseEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectDeploymentListResponseEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectDeploymentListResponseSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectDeploymentListResponseJSON `json:"-"` +} + +// projectDeploymentListResponseJSON contains the JSON metadata for the struct +// [ProjectDeploymentListResponse] +type projectDeploymentListResponseJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentListResponseJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectDeploymentListResponseBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectDeploymentListResponseBuildConfigJSON `json:"-"` +} + +// projectDeploymentListResponseBuildConfigJSON contains the JSON metadata for the +// struct [ProjectDeploymentListResponseBuildConfig] +type projectDeploymentListResponseBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentListResponseBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentListResponseBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectDeploymentListResponseDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectDeploymentListResponseDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectDeploymentListResponseDeploymentTriggerType `json:"type,required"` + JSON projectDeploymentListResponseDeploymentTriggerJSON `json:"-"` +} + +// projectDeploymentListResponseDeploymentTriggerJSON contains the JSON metadata +// for the struct [ProjectDeploymentListResponseDeploymentTrigger] +type projectDeploymentListResponseDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentListResponseDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentListResponseDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectDeploymentListResponseDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectDeploymentListResponseDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectDeploymentListResponseDeploymentTriggerMetadataJSON contains the JSON +// metadata for the struct [ProjectDeploymentListResponseDeploymentTriggerMetadata] +type projectDeploymentListResponseDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentListResponseDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentListResponseDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectDeploymentListResponseDeploymentTriggerType string + +const ( + ProjectDeploymentListResponseDeploymentTriggerTypeGitHubPush ProjectDeploymentListResponseDeploymentTriggerType = "github:push" + ProjectDeploymentListResponseDeploymentTriggerTypeADHoc ProjectDeploymentListResponseDeploymentTriggerType = "ad_hoc" + ProjectDeploymentListResponseDeploymentTriggerTypeDeployHook ProjectDeploymentListResponseDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectDeploymentListResponseDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectDeploymentListResponseDeploymentTriggerTypeGitHubPush, ProjectDeploymentListResponseDeploymentTriggerTypeADHoc, ProjectDeploymentListResponseDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectDeploymentListResponseEnvVar struct { + Type ProjectDeploymentListResponseEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentListResponseEnvVarJSON `json:"-"` + union ProjectDeploymentListResponseEnvVarsUnion +} + +// projectDeploymentListResponseEnvVarJSON contains the JSON metadata for the +// struct [ProjectDeploymentListResponseEnvVar] +type projectDeploymentListResponseEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectDeploymentListResponseEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectDeploymentListResponseEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectDeploymentListResponseEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectDeploymentListResponseEnvVarsUnion] interface which +// you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVar], +// [ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVar]. +func (r ProjectDeploymentListResponseEnvVar) AsUnion() ProjectDeploymentListResponseEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by [ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVar] or +// [ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVar]. +type ProjectDeploymentListResponseEnvVarsUnion interface { + implementsProjectDeploymentListResponseEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectDeploymentListResponseEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVar struct { + Type ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentListResponseEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectDeploymentListResponseEnvVarsPagesPlainTextEnvVarJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVar] +type projectDeploymentListResponseEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentListResponseEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVar) implementsProjectDeploymentListResponseEnvVar() { +} + +type ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVarTypePlainText ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentListResponseEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVar struct { + Type ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectDeploymentListResponseEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectDeploymentListResponseEnvVarsPagesSecretTextEnvVarJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVar] +type projectDeploymentListResponseEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentListResponseEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVar) implementsProjectDeploymentListResponseEnvVar() { +} + +type ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentListResponseEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectDeploymentListResponseEnvVarsType string + +const ( + ProjectDeploymentListResponseEnvVarsTypePlainText ProjectDeploymentListResponseEnvVarsType = "plain_text" + ProjectDeploymentListResponseEnvVarsTypeSecretText ProjectDeploymentListResponseEnvVarsType = "secret_text" +) + +func (r ProjectDeploymentListResponseEnvVarsType) IsKnown() bool { + switch r { + case ProjectDeploymentListResponseEnvVarsTypePlainText, ProjectDeploymentListResponseEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectDeploymentListResponseEnvironment string + +const ( + ProjectDeploymentListResponseEnvironmentPreview ProjectDeploymentListResponseEnvironment = "preview" + ProjectDeploymentListResponseEnvironmentProduction ProjectDeploymentListResponseEnvironment = "production" +) + +func (r ProjectDeploymentListResponseEnvironment) IsKnown() bool { + switch r { + case ProjectDeploymentListResponseEnvironmentPreview, ProjectDeploymentListResponseEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectDeploymentListResponseSource struct { + Config ProjectDeploymentListResponseSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectDeploymentListResponseSourceType `json:"type,required"` + JSON projectDeploymentListResponseSourceJSON `json:"-"` +} + +// projectDeploymentListResponseSourceJSON contains the JSON metadata for the +// struct [ProjectDeploymentListResponseSource] +type projectDeploymentListResponseSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentListResponseSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentListResponseSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentListResponseSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectDeploymentListResponseSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectDeploymentListResponseSourceConfigJSON `json:"-"` +} + +// projectDeploymentListResponseSourceConfigJSON contains the JSON metadata for the +// struct [ProjectDeploymentListResponseSourceConfig] +type projectDeploymentListResponseSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentListResponseSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentListResponseSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectDeploymentListResponseSourceConfigPreviewDeploymentSetting string + +const ( + ProjectDeploymentListResponseSourceConfigPreviewDeploymentSettingAll ProjectDeploymentListResponseSourceConfigPreviewDeploymentSetting = "all" + ProjectDeploymentListResponseSourceConfigPreviewDeploymentSettingNone ProjectDeploymentListResponseSourceConfigPreviewDeploymentSetting = "none" + ProjectDeploymentListResponseSourceConfigPreviewDeploymentSettingCustom ProjectDeploymentListResponseSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectDeploymentListResponseSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectDeploymentListResponseSourceConfigPreviewDeploymentSettingAll, ProjectDeploymentListResponseSourceConfigPreviewDeploymentSettingNone, ProjectDeploymentListResponseSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectDeploymentListResponseSourceType string + +const ( + ProjectDeploymentListResponseSourceTypeGitHub ProjectDeploymentListResponseSourceType = "github" + ProjectDeploymentListResponseSourceTypeGitlab ProjectDeploymentListResponseSourceType = "gitlab" +) + +func (r ProjectDeploymentListResponseSourceType) IsKnown() bool { + switch r { + case ProjectDeploymentListResponseSourceTypeGitHub, ProjectDeploymentListResponseSourceTypeGitlab: + return true + } + return false +} + +type ProjectDeploymentDeleteResponse = interface{} + +type ProjectDeploymentGetResponse struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectDeploymentGetResponseBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectDeploymentGetResponseDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectDeploymentGetResponseEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectDeploymentGetResponseEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectDeploymentGetResponseSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectDeploymentGetResponseJSON `json:"-"` +} + +// projectDeploymentGetResponseJSON contains the JSON metadata for the struct +// [ProjectDeploymentGetResponse] +type projectDeploymentGetResponseJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectDeploymentGetResponseBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectDeploymentGetResponseBuildConfigJSON `json:"-"` +} + +// projectDeploymentGetResponseBuildConfigJSON contains the JSON metadata for the +// struct [ProjectDeploymentGetResponseBuildConfig] +type projectDeploymentGetResponseBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectDeploymentGetResponseDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectDeploymentGetResponseDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectDeploymentGetResponseDeploymentTriggerType `json:"type,required"` + JSON projectDeploymentGetResponseDeploymentTriggerJSON `json:"-"` +} + +// projectDeploymentGetResponseDeploymentTriggerJSON contains the JSON metadata for +// the struct [ProjectDeploymentGetResponseDeploymentTrigger] +type projectDeploymentGetResponseDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectDeploymentGetResponseDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectDeploymentGetResponseDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectDeploymentGetResponseDeploymentTriggerMetadataJSON contains the JSON +// metadata for the struct [ProjectDeploymentGetResponseDeploymentTriggerMetadata] +type projectDeploymentGetResponseDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectDeploymentGetResponseDeploymentTriggerType string + +const ( + ProjectDeploymentGetResponseDeploymentTriggerTypeGitHubPush ProjectDeploymentGetResponseDeploymentTriggerType = "github:push" + ProjectDeploymentGetResponseDeploymentTriggerTypeADHoc ProjectDeploymentGetResponseDeploymentTriggerType = "ad_hoc" + ProjectDeploymentGetResponseDeploymentTriggerTypeDeployHook ProjectDeploymentGetResponseDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectDeploymentGetResponseDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectDeploymentGetResponseDeploymentTriggerTypeGitHubPush, ProjectDeploymentGetResponseDeploymentTriggerTypeADHoc, ProjectDeploymentGetResponseDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectDeploymentGetResponseEnvVar struct { + Type ProjectDeploymentGetResponseEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentGetResponseEnvVarJSON `json:"-"` + union ProjectDeploymentGetResponseEnvVarsUnion +} + +// projectDeploymentGetResponseEnvVarJSON contains the JSON metadata for the struct +// [ProjectDeploymentGetResponseEnvVar] +type projectDeploymentGetResponseEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectDeploymentGetResponseEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectDeploymentGetResponseEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectDeploymentGetResponseEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectDeploymentGetResponseEnvVarsUnion] interface which you +// can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVar], +// [ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVar]. +func (r ProjectDeploymentGetResponseEnvVar) AsUnion() ProjectDeploymentGetResponseEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by [ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVar] or +// [ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVar]. +type ProjectDeploymentGetResponseEnvVarsUnion interface { + implementsProjectDeploymentGetResponseEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectDeploymentGetResponseEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVar struct { + Type ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVar] +type projectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVar) implementsProjectDeploymentGetResponseEnvVar() { +} + +type ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarTypePlainText ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentGetResponseEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVar struct { + Type ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVar] +type projectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVar) implementsProjectDeploymentGetResponseEnvVar() { +} + +type ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentGetResponseEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectDeploymentGetResponseEnvVarsType string + +const ( + ProjectDeploymentGetResponseEnvVarsTypePlainText ProjectDeploymentGetResponseEnvVarsType = "plain_text" + ProjectDeploymentGetResponseEnvVarsTypeSecretText ProjectDeploymentGetResponseEnvVarsType = "secret_text" +) + +func (r ProjectDeploymentGetResponseEnvVarsType) IsKnown() bool { + switch r { + case ProjectDeploymentGetResponseEnvVarsTypePlainText, ProjectDeploymentGetResponseEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectDeploymentGetResponseEnvironment string + +const ( + ProjectDeploymentGetResponseEnvironmentPreview ProjectDeploymentGetResponseEnvironment = "preview" + ProjectDeploymentGetResponseEnvironmentProduction ProjectDeploymentGetResponseEnvironment = "production" +) + +func (r ProjectDeploymentGetResponseEnvironment) IsKnown() bool { + switch r { + case ProjectDeploymentGetResponseEnvironmentPreview, ProjectDeploymentGetResponseEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectDeploymentGetResponseSource struct { + Config ProjectDeploymentGetResponseSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectDeploymentGetResponseSourceType `json:"type,required"` + JSON projectDeploymentGetResponseSourceJSON `json:"-"` +} + +// projectDeploymentGetResponseSourceJSON contains the JSON metadata for the struct +// [ProjectDeploymentGetResponseSource] +type projectDeploymentGetResponseSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentGetResponseSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectDeploymentGetResponseSourceConfigJSON `json:"-"` +} + +// projectDeploymentGetResponseSourceConfigJSON contains the JSON metadata for the +// struct [ProjectDeploymentGetResponseSourceConfig] +type projectDeploymentGetResponseSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSetting string + +const ( + ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSettingAll ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSetting = "all" + ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSettingNone ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSetting = "none" + ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSettingCustom ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSettingAll, ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSettingNone, ProjectDeploymentGetResponseSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectDeploymentGetResponseSourceType string + +const ( + ProjectDeploymentGetResponseSourceTypeGitHub ProjectDeploymentGetResponseSourceType = "github" + ProjectDeploymentGetResponseSourceTypeGitlab ProjectDeploymentGetResponseSourceType = "gitlab" +) + +func (r ProjectDeploymentGetResponseSourceType) IsKnown() bool { + switch r { + case ProjectDeploymentGetResponseSourceTypeGitHub, ProjectDeploymentGetResponseSourceTypeGitlab: + return true + } + return false +} + +type ProjectDeploymentRetryResponse struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectDeploymentRetryResponseBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectDeploymentRetryResponseDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectDeploymentRetryResponseEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectDeploymentRetryResponseEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectDeploymentRetryResponseSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectDeploymentRetryResponseJSON `json:"-"` +} + +// projectDeploymentRetryResponseJSON contains the JSON metadata for the struct +// [ProjectDeploymentRetryResponse] +type projectDeploymentRetryResponseJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectDeploymentRetryResponseBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectDeploymentRetryResponseBuildConfigJSON `json:"-"` +} + +// projectDeploymentRetryResponseBuildConfigJSON contains the JSON metadata for the +// struct [ProjectDeploymentRetryResponseBuildConfig] +type projectDeploymentRetryResponseBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectDeploymentRetryResponseDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectDeploymentRetryResponseDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectDeploymentRetryResponseDeploymentTriggerType `json:"type,required"` + JSON projectDeploymentRetryResponseDeploymentTriggerJSON `json:"-"` +} + +// projectDeploymentRetryResponseDeploymentTriggerJSON contains the JSON metadata +// for the struct [ProjectDeploymentRetryResponseDeploymentTrigger] +type projectDeploymentRetryResponseDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectDeploymentRetryResponseDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectDeploymentRetryResponseDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectDeploymentRetryResponseDeploymentTriggerMetadataJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentRetryResponseDeploymentTriggerMetadata] +type projectDeploymentRetryResponseDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectDeploymentRetryResponseDeploymentTriggerType string + +const ( + ProjectDeploymentRetryResponseDeploymentTriggerTypeGitHubPush ProjectDeploymentRetryResponseDeploymentTriggerType = "github:push" + ProjectDeploymentRetryResponseDeploymentTriggerTypeADHoc ProjectDeploymentRetryResponseDeploymentTriggerType = "ad_hoc" + ProjectDeploymentRetryResponseDeploymentTriggerTypeDeployHook ProjectDeploymentRetryResponseDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectDeploymentRetryResponseDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectDeploymentRetryResponseDeploymentTriggerTypeGitHubPush, ProjectDeploymentRetryResponseDeploymentTriggerTypeADHoc, ProjectDeploymentRetryResponseDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectDeploymentRetryResponseEnvVar struct { + Type ProjectDeploymentRetryResponseEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentRetryResponseEnvVarJSON `json:"-"` + union ProjectDeploymentRetryResponseEnvVarsUnion +} + +// projectDeploymentRetryResponseEnvVarJSON contains the JSON metadata for the +// struct [ProjectDeploymentRetryResponseEnvVar] +type projectDeploymentRetryResponseEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectDeploymentRetryResponseEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectDeploymentRetryResponseEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectDeploymentRetryResponseEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectDeploymentRetryResponseEnvVarsUnion] interface which +// you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVar], +// [ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVar]. +func (r ProjectDeploymentRetryResponseEnvVar) AsUnion() ProjectDeploymentRetryResponseEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by [ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVar] +// or [ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVar]. +type ProjectDeploymentRetryResponseEnvVarsUnion interface { + implementsProjectDeploymentRetryResponseEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectDeploymentRetryResponseEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVar struct { + Type ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVar] +type projectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVar) implementsProjectDeploymentRetryResponseEnvVar() { +} + +type ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarTypePlainText ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentRetryResponseEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVar struct { + Type ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVar] +type projectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVar) implementsProjectDeploymentRetryResponseEnvVar() { +} + +type ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentRetryResponseEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectDeploymentRetryResponseEnvVarsType string + +const ( + ProjectDeploymentRetryResponseEnvVarsTypePlainText ProjectDeploymentRetryResponseEnvVarsType = "plain_text" + ProjectDeploymentRetryResponseEnvVarsTypeSecretText ProjectDeploymentRetryResponseEnvVarsType = "secret_text" +) + +func (r ProjectDeploymentRetryResponseEnvVarsType) IsKnown() bool { + switch r { + case ProjectDeploymentRetryResponseEnvVarsTypePlainText, ProjectDeploymentRetryResponseEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectDeploymentRetryResponseEnvironment string + +const ( + ProjectDeploymentRetryResponseEnvironmentPreview ProjectDeploymentRetryResponseEnvironment = "preview" + ProjectDeploymentRetryResponseEnvironmentProduction ProjectDeploymentRetryResponseEnvironment = "production" +) + +func (r ProjectDeploymentRetryResponseEnvironment) IsKnown() bool { + switch r { + case ProjectDeploymentRetryResponseEnvironmentPreview, ProjectDeploymentRetryResponseEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectDeploymentRetryResponseSource struct { + Config ProjectDeploymentRetryResponseSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectDeploymentRetryResponseSourceType `json:"type,required"` + JSON projectDeploymentRetryResponseSourceJSON `json:"-"` +} + +// projectDeploymentRetryResponseSourceJSON contains the JSON metadata for the +// struct [ProjectDeploymentRetryResponseSource] +type projectDeploymentRetryResponseSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentRetryResponseSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectDeploymentRetryResponseSourceConfigJSON `json:"-"` +} + +// projectDeploymentRetryResponseSourceConfigJSON contains the JSON metadata for +// the struct [ProjectDeploymentRetryResponseSourceConfig] +type projectDeploymentRetryResponseSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSetting string + +const ( + ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSettingAll ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSetting = "all" + ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSettingNone ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSetting = "none" + ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSettingCustom ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSettingAll, ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSettingNone, ProjectDeploymentRetryResponseSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectDeploymentRetryResponseSourceType string + +const ( + ProjectDeploymentRetryResponseSourceTypeGitHub ProjectDeploymentRetryResponseSourceType = "github" + ProjectDeploymentRetryResponseSourceTypeGitlab ProjectDeploymentRetryResponseSourceType = "gitlab" +) + +func (r ProjectDeploymentRetryResponseSourceType) IsKnown() bool { + switch r { + case ProjectDeploymentRetryResponseSourceTypeGitHub, ProjectDeploymentRetryResponseSourceTypeGitlab: + return true + } + return false +} + +type ProjectDeploymentRollbackResponse struct { + // Id of the deployment. + ID string `json:"id,required"` + // A list of alias URLs pointing to this deployment. + Aliases []string `json:"aliases,required,nullable"` + // Configs for the project build process. + BuildConfig ProjectDeploymentRollbackResponseBuildConfig `json:"build_config,required"` + // When the deployment was created. + CreatedOn time.Time `json:"created_on,required" format:"date-time"` + // Info about what caused the deployment. + DeploymentTrigger ProjectDeploymentRollbackResponseDeploymentTrigger `json:"deployment_trigger,required"` + // Environment variables used for builds and Pages Functions. + EnvVars map[string]ProjectDeploymentRollbackResponseEnvVar `json:"env_vars,required,nullable"` + // Type of deploy. + Environment ProjectDeploymentRollbackResponseEnvironment `json:"environment,required"` + // If the deployment has been skipped. + IsSkipped bool `json:"is_skipped,required"` + // The status of the deployment. + LatestStage Stage `json:"latest_stage,required"` + // When the deployment was last modified. + ModifiedOn time.Time `json:"modified_on,required" format:"date-time"` + // Id of the project. + ProjectID string `json:"project_id,required"` + // Name of the project. + ProjectName string `json:"project_name,required"` + // Short Id (8 character) of the deployment. + ShortID string `json:"short_id,required"` + // Configs for the project source control. + Source ProjectDeploymentRollbackResponseSource `json:"source,required"` + // List of past stages. + Stages []Stage `json:"stages,required"` + // The live URL to view this deployment. + URL string `json:"url,required"` + // Whether the deployment uses functions. + UsesFunctions bool `json:"uses_functions,nullable"` + JSON projectDeploymentRollbackResponseJSON `json:"-"` +} + +// projectDeploymentRollbackResponseJSON contains the JSON metadata for the struct +// [ProjectDeploymentRollbackResponse] +type projectDeploymentRollbackResponseJSON struct { + ID apijson.Field + Aliases apijson.Field + BuildConfig apijson.Field + CreatedOn apijson.Field + DeploymentTrigger apijson.Field + EnvVars apijson.Field + Environment apijson.Field + IsSkipped apijson.Field + LatestStage apijson.Field + ModifiedOn apijson.Field + ProjectID apijson.Field + ProjectName apijson.Field + ShortID apijson.Field + Source apijson.Field + Stages apijson.Field + URL apijson.Field + UsesFunctions apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseJSON) RawJSON() string { + return r.raw +} + +// Configs for the project build process. +type ProjectDeploymentRollbackResponseBuildConfig struct { + // The classifying tag for analytics. + WebAnalyticsTag string `json:"web_analytics_tag,required,nullable"` + // The auth token for analytics. + WebAnalyticsToken string `json:"web_analytics_token,required,nullable"` + // Enable build caching for the project. + BuildCaching bool `json:"build_caching,nullable"` + // Command used to build project. + BuildCommand string `json:"build_command,nullable"` + // Assets output directory of the build. + DestinationDir string `json:"destination_dir,nullable"` + // Directory to run the command. + RootDir string `json:"root_dir,nullable"` + JSON projectDeploymentRollbackResponseBuildConfigJSON `json:"-"` +} + +// projectDeploymentRollbackResponseBuildConfigJSON contains the JSON metadata for +// the struct [ProjectDeploymentRollbackResponseBuildConfig] +type projectDeploymentRollbackResponseBuildConfigJSON struct { + WebAnalyticsTag apijson.Field + WebAnalyticsToken apijson.Field + BuildCaching apijson.Field + BuildCommand apijson.Field + DestinationDir apijson.Field + RootDir apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseBuildConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseBuildConfigJSON) RawJSON() string { + return r.raw +} + +// Info about what caused the deployment. +type ProjectDeploymentRollbackResponseDeploymentTrigger struct { + // Additional info about the trigger. + Metadata ProjectDeploymentRollbackResponseDeploymentTriggerMetadata `json:"metadata,required"` + // What caused the deployment. + Type ProjectDeploymentRollbackResponseDeploymentTriggerType `json:"type,required"` + JSON projectDeploymentRollbackResponseDeploymentTriggerJSON `json:"-"` +} + +// projectDeploymentRollbackResponseDeploymentTriggerJSON contains the JSON +// metadata for the struct [ProjectDeploymentRollbackResponseDeploymentTrigger] +type projectDeploymentRollbackResponseDeploymentTriggerJSON struct { + Metadata apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseDeploymentTrigger) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseDeploymentTriggerJSON) RawJSON() string { + return r.raw +} + +// Additional info about the trigger. +type ProjectDeploymentRollbackResponseDeploymentTriggerMetadata struct { + // Where the trigger happened. + Branch string `json:"branch,required"` + // Whether the deployment trigger commit was dirty. + CommitDirty bool `json:"commit_dirty,required"` + // Hash of the deployment trigger commit. + CommitHash string `json:"commit_hash,required"` + // Message of the deployment trigger commit. + CommitMessage string `json:"commit_message,required"` + JSON projectDeploymentRollbackResponseDeploymentTriggerMetadataJSON `json:"-"` +} + +// projectDeploymentRollbackResponseDeploymentTriggerMetadataJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentRollbackResponseDeploymentTriggerMetadata] +type projectDeploymentRollbackResponseDeploymentTriggerMetadataJSON struct { + Branch apijson.Field + CommitDirty apijson.Field + CommitHash apijson.Field + CommitMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseDeploymentTriggerMetadata) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseDeploymentTriggerMetadataJSON) RawJSON() string { + return r.raw +} + +// What caused the deployment. +type ProjectDeploymentRollbackResponseDeploymentTriggerType string + +const ( + ProjectDeploymentRollbackResponseDeploymentTriggerTypeGitHubPush ProjectDeploymentRollbackResponseDeploymentTriggerType = "github:push" + ProjectDeploymentRollbackResponseDeploymentTriggerTypeADHoc ProjectDeploymentRollbackResponseDeploymentTriggerType = "ad_hoc" + ProjectDeploymentRollbackResponseDeploymentTriggerTypeDeployHook ProjectDeploymentRollbackResponseDeploymentTriggerType = "deploy_hook" +) + +func (r ProjectDeploymentRollbackResponseDeploymentTriggerType) IsKnown() bool { + switch r { + case ProjectDeploymentRollbackResponseDeploymentTriggerTypeGitHubPush, ProjectDeploymentRollbackResponseDeploymentTriggerTypeADHoc, ProjectDeploymentRollbackResponseDeploymentTriggerTypeDeployHook: + return true + } + return false +} + +// A plaintext environment variable. +type ProjectDeploymentRollbackResponseEnvVar struct { + Type ProjectDeploymentRollbackResponseEnvVarsType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentRollbackResponseEnvVarJSON `json:"-"` + union ProjectDeploymentRollbackResponseEnvVarsUnion +} + +// projectDeploymentRollbackResponseEnvVarJSON contains the JSON metadata for the +// struct [ProjectDeploymentRollbackResponseEnvVar] +type projectDeploymentRollbackResponseEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r projectDeploymentRollbackResponseEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r *ProjectDeploymentRollbackResponseEnvVar) UnmarshalJSON(data []byte) (err error) { + *r = ProjectDeploymentRollbackResponseEnvVar{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [ProjectDeploymentRollbackResponseEnvVarsUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVar], +// [ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVar]. +func (r ProjectDeploymentRollbackResponseEnvVar) AsUnion() ProjectDeploymentRollbackResponseEnvVarsUnion { + return r.union +} + +// A plaintext environment variable. +// +// Union satisfied by +// [ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVar] or +// [ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVar]. +type ProjectDeploymentRollbackResponseEnvVarsUnion interface { + implementsProjectDeploymentRollbackResponseEnvVar() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*ProjectDeploymentRollbackResponseEnvVarsUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVar{}), + DiscriminatorValue: "plain_text", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVar{}), + DiscriminatorValue: "secret_text", + }, + ) +} + +// A plaintext environment variable. +type ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVar struct { + Type ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarType `json:"type,required"` + // Environment variable value. + Value string `json:"value,required"` + JSON projectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarJSON `json:"-"` +} + +// projectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVar] +type projectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVar) implementsProjectDeploymentRollbackResponseEnvVar() { +} + +type ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarType string + +const ( + ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarTypePlainText ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarType = "plain_text" +) + +func (r ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentRollbackResponseEnvVarsPagesPlainTextEnvVarTypePlainText: + return true + } + return false +} + +// An encrypted environment variable. +type ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVar struct { + Type ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarType `json:"type,required"` + // Secret value. + Value string `json:"value,required"` + JSON projectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarJSON `json:"-"` +} + +// projectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarJSON contains the +// JSON metadata for the struct +// [ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVar] +type projectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarJSON struct { + Type apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVar) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarJSON) RawJSON() string { + return r.raw +} + +func (r ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVar) implementsProjectDeploymentRollbackResponseEnvVar() { +} + +type ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarType string + +const ( + ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarTypeSecretText ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarType = "secret_text" +) + +func (r ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarType) IsKnown() bool { + switch r { + case ProjectDeploymentRollbackResponseEnvVarsPagesSecretTextEnvVarTypeSecretText: + return true + } + return false +} + +type ProjectDeploymentRollbackResponseEnvVarsType string + +const ( + ProjectDeploymentRollbackResponseEnvVarsTypePlainText ProjectDeploymentRollbackResponseEnvVarsType = "plain_text" + ProjectDeploymentRollbackResponseEnvVarsTypeSecretText ProjectDeploymentRollbackResponseEnvVarsType = "secret_text" +) + +func (r ProjectDeploymentRollbackResponseEnvVarsType) IsKnown() bool { + switch r { + case ProjectDeploymentRollbackResponseEnvVarsTypePlainText, ProjectDeploymentRollbackResponseEnvVarsTypeSecretText: + return true + } + return false +} + +// Type of deploy. +type ProjectDeploymentRollbackResponseEnvironment string + +const ( + ProjectDeploymentRollbackResponseEnvironmentPreview ProjectDeploymentRollbackResponseEnvironment = "preview" + ProjectDeploymentRollbackResponseEnvironmentProduction ProjectDeploymentRollbackResponseEnvironment = "production" +) + +func (r ProjectDeploymentRollbackResponseEnvironment) IsKnown() bool { + switch r { + case ProjectDeploymentRollbackResponseEnvironmentPreview, ProjectDeploymentRollbackResponseEnvironmentProduction: + return true + } + return false +} + +// Configs for the project source control. +type ProjectDeploymentRollbackResponseSource struct { + Config ProjectDeploymentRollbackResponseSourceConfig `json:"config,required"` + // The source control management provider. + Type ProjectDeploymentRollbackResponseSourceType `json:"type,required"` + JSON projectDeploymentRollbackResponseSourceJSON `json:"-"` +} + +// projectDeploymentRollbackResponseSourceJSON contains the JSON metadata for the +// struct [ProjectDeploymentRollbackResponseSource] +type projectDeploymentRollbackResponseSourceJSON struct { + Config apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentRollbackResponseSourceConfig struct { + // The owner of the repository. + Owner string `json:"owner,required"` + // Whether to enable PR comments. + PrCommentsEnabled bool `json:"pr_comments_enabled,required"` + // The production branch of the repository. + ProductionBranch string `json:"production_branch,required"` + // The name of the repository. + RepoName string `json:"repo_name,required"` + // Whether to enable automatic deployments when pushing to the source repository. + // When disabled, no deployments (production or preview) will be triggered + // automatically. + // + // Deprecated: Use `production_deployments_enabled` and + // `preview_deployment_setting` for more granular control. + DeploymentsEnabled bool `json:"deployments_enabled"` + // The owner ID of the repository. + OwnerID string `json:"owner_id"` + // A list of paths that should be excluded from triggering a preview deployment. + // Wildcard syntax (`*`) is supported. + PathExcludes []string `json:"path_excludes"` + // A list of paths that should be watched to trigger a preview deployment. Wildcard + // syntax (`*`) is supported. + PathIncludes []string `json:"path_includes"` + // A list of branches that should not trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchExcludes []string `json:"preview_branch_excludes"` + // A list of branches that should trigger a preview deployment. Wildcard syntax + // (`*`) is supported. Must be used with `preview_deployment_setting` set to + // `custom`. + PreviewBranchIncludes []string `json:"preview_branch_includes"` + // Controls whether commits to preview branches trigger a preview deployment. + PreviewDeploymentSetting ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSetting `json:"preview_deployment_setting"` + // Whether to trigger a production deployment on commits to the production branch. + ProductionDeploymentsEnabled bool `json:"production_deployments_enabled"` + // The ID of the repository. + RepoID string `json:"repo_id"` + JSON projectDeploymentRollbackResponseSourceConfigJSON `json:"-"` +} + +// projectDeploymentRollbackResponseSourceConfigJSON contains the JSON metadata for +// the struct [ProjectDeploymentRollbackResponseSourceConfig] +type projectDeploymentRollbackResponseSourceConfigJSON struct { + Owner apijson.Field + PrCommentsEnabled apijson.Field + ProductionBranch apijson.Field + RepoName apijson.Field + DeploymentsEnabled apijson.Field + OwnerID apijson.Field + PathExcludes apijson.Field + PathIncludes apijson.Field + PreviewBranchExcludes apijson.Field + PreviewBranchIncludes apijson.Field + PreviewDeploymentSetting apijson.Field + ProductionDeploymentsEnabled apijson.Field + RepoID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseSourceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseSourceConfigJSON) RawJSON() string { + return r.raw +} + +// Controls whether commits to preview branches trigger a preview deployment. +type ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSetting string + +const ( + ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSettingAll ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSetting = "all" + ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSettingNone ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSetting = "none" + ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSettingCustom ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSetting = "custom" +) + +func (r ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSetting) IsKnown() bool { + switch r { + case ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSettingAll, ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSettingNone, ProjectDeploymentRollbackResponseSourceConfigPreviewDeploymentSettingCustom: + return true + } + return false +} + +// The source control management provider. +type ProjectDeploymentRollbackResponseSourceType string + +const ( + ProjectDeploymentRollbackResponseSourceTypeGitHub ProjectDeploymentRollbackResponseSourceType = "github" + ProjectDeploymentRollbackResponseSourceTypeGitlab ProjectDeploymentRollbackResponseSourceType = "gitlab" +) + +func (r ProjectDeploymentRollbackResponseSourceType) IsKnown() bool { + switch r { + case ProjectDeploymentRollbackResponseSourceTypeGitHub, ProjectDeploymentRollbackResponseSourceTypeGitlab: + return true } - res = &env.Result - return + return false } -type ProjectDeploymentDeleteResponse = interface{} - type ProjectDeploymentNewParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` // Headers configuration file for the deployment. Headers param.Field[io.Reader] `json:"_headers" format:"binary"` @@ -268,10 +2738,10 @@ func (r ProjectDeploymentNewParamsCommitDirty) IsKnown() bool { } type ProjectDeploymentNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result Deployment `json:"result,required"` - // Whether the API call was successful + Errors []ProjectDeploymentNewResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDeploymentNewResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDeploymentNewResponse `json:"result,required"` + // Whether the API call was successful. Success ProjectDeploymentNewResponseEnvelopeSuccess `json:"success,required"` JSON projectDeploymentNewResponseEnvelopeJSON `json:"-"` } @@ -295,24 +2765,119 @@ func (r projectDeploymentNewResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDeploymentNewResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentNewResponseEnvelopeErrorsSource `json:"source"` + JSON projectDeploymentNewResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDeploymentNewResponseEnvelopeErrorsJSON contains the JSON metadata for +// the struct [ProjectDeploymentNewResponseEnvelopeErrors] +type projectDeploymentNewResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentNewResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentNewResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDeploymentNewResponseEnvelopeErrorsSourceJSON contains the JSON metadata +// for the struct [ProjectDeploymentNewResponseEnvelopeErrorsSource] +type projectDeploymentNewResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentNewResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentNewResponseEnvelopeMessagesSource `json:"source"` + JSON projectDeploymentNewResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDeploymentNewResponseEnvelopeMessagesJSON contains the JSON metadata for +// the struct [ProjectDeploymentNewResponseEnvelopeMessages] +type projectDeploymentNewResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentNewResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentNewResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDeploymentNewResponseEnvelopeMessagesSourceJSON contains the JSON +// metadata for the struct [ProjectDeploymentNewResponseEnvelopeMessagesSource] +type projectDeploymentNewResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentNewResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDeploymentNewResponseEnvelopeSuccess bool const ( - ProjectDeploymentNewResponseEnvelopeSuccessFalse ProjectDeploymentNewResponseEnvelopeSuccess = false - ProjectDeploymentNewResponseEnvelopeSuccessTrue ProjectDeploymentNewResponseEnvelopeSuccess = true + ProjectDeploymentNewResponseEnvelopeSuccessTrue ProjectDeploymentNewResponseEnvelopeSuccess = true ) func (r ProjectDeploymentNewResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDeploymentNewResponseEnvelopeSuccessFalse, ProjectDeploymentNewResponseEnvelopeSuccessTrue: + case ProjectDeploymentNewResponseEnvelopeSuccessTrue: return true } return false } type ProjectDeploymentListParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` // What type of deployments to fetch. Env param.Field[ProjectDeploymentListParamsEnv] `query:"env"` @@ -348,15 +2913,15 @@ func (r ProjectDeploymentListParamsEnv) IsKnown() bool { } type ProjectDeploymentDeleteParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` } type ProjectDeploymentDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ProjectDeploymentDeleteResponse `json:"result,required,nullable"` - // Whether the API call was successful + Errors []ProjectDeploymentDeleteResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDeploymentDeleteResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDeploymentDeleteResponse `json:"result,required,nullable"` + // Whether the API call was successful. Success ProjectDeploymentDeleteResponseEnvelopeSuccess `json:"success,required"` JSON projectDeploymentDeleteResponseEnvelopeJSON `json:"-"` } @@ -380,32 +2945,127 @@ func (r projectDeploymentDeleteResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDeploymentDeleteResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentDeleteResponseEnvelopeErrorsSource `json:"source"` + JSON projectDeploymentDeleteResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDeploymentDeleteResponseEnvelopeErrorsJSON contains the JSON metadata for +// the struct [ProjectDeploymentDeleteResponseEnvelopeErrors] +type projectDeploymentDeleteResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentDeleteResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentDeleteResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentDeleteResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDeploymentDeleteResponseEnvelopeErrorsSourceJSON contains the JSON +// metadata for the struct [ProjectDeploymentDeleteResponseEnvelopeErrorsSource] +type projectDeploymentDeleteResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentDeleteResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentDeleteResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentDeleteResponseEnvelopeMessagesSource `json:"source"` + JSON projectDeploymentDeleteResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDeploymentDeleteResponseEnvelopeMessagesJSON contains the JSON metadata +// for the struct [ProjectDeploymentDeleteResponseEnvelopeMessages] +type projectDeploymentDeleteResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentDeleteResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentDeleteResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentDeleteResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDeploymentDeleteResponseEnvelopeMessagesSourceJSON contains the JSON +// metadata for the struct [ProjectDeploymentDeleteResponseEnvelopeMessagesSource] +type projectDeploymentDeleteResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentDeleteResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDeploymentDeleteResponseEnvelopeSuccess bool const ( - ProjectDeploymentDeleteResponseEnvelopeSuccessFalse ProjectDeploymentDeleteResponseEnvelopeSuccess = false - ProjectDeploymentDeleteResponseEnvelopeSuccessTrue ProjectDeploymentDeleteResponseEnvelopeSuccess = true + ProjectDeploymentDeleteResponseEnvelopeSuccessTrue ProjectDeploymentDeleteResponseEnvelopeSuccess = true ) func (r ProjectDeploymentDeleteResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDeploymentDeleteResponseEnvelopeSuccessFalse, ProjectDeploymentDeleteResponseEnvelopeSuccessTrue: + case ProjectDeploymentDeleteResponseEnvelopeSuccessTrue: return true } return false } type ProjectDeploymentGetParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` } type ProjectDeploymentGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result Deployment `json:"result,required"` - // Whether the API call was successful + Errors []ProjectDeploymentGetResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDeploymentGetResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDeploymentGetResponse `json:"result,required"` + // Whether the API call was successful. Success ProjectDeploymentGetResponseEnvelopeSuccess `json:"success,required"` JSON projectDeploymentGetResponseEnvelopeJSON `json:"-"` } @@ -429,37 +3089,127 @@ func (r projectDeploymentGetResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDeploymentGetResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentGetResponseEnvelopeErrorsSource `json:"source"` + JSON projectDeploymentGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDeploymentGetResponseEnvelopeErrorsJSON contains the JSON metadata for +// the struct [ProjectDeploymentGetResponseEnvelopeErrors] +type projectDeploymentGetResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentGetResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentGetResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDeploymentGetResponseEnvelopeErrorsSourceJSON contains the JSON metadata +// for the struct [ProjectDeploymentGetResponseEnvelopeErrorsSource] +type projectDeploymentGetResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentGetResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentGetResponseEnvelopeMessagesSource `json:"source"` + JSON projectDeploymentGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDeploymentGetResponseEnvelopeMessagesJSON contains the JSON metadata for +// the struct [ProjectDeploymentGetResponseEnvelopeMessages] +type projectDeploymentGetResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentGetResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentGetResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDeploymentGetResponseEnvelopeMessagesSourceJSON contains the JSON +// metadata for the struct [ProjectDeploymentGetResponseEnvelopeMessagesSource] +type projectDeploymentGetResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentGetResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDeploymentGetResponseEnvelopeSuccess bool const ( - ProjectDeploymentGetResponseEnvelopeSuccessFalse ProjectDeploymentGetResponseEnvelopeSuccess = false - ProjectDeploymentGetResponseEnvelopeSuccessTrue ProjectDeploymentGetResponseEnvelopeSuccess = true + ProjectDeploymentGetResponseEnvelopeSuccessTrue ProjectDeploymentGetResponseEnvelopeSuccess = true ) func (r ProjectDeploymentGetResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDeploymentGetResponseEnvelopeSuccessFalse, ProjectDeploymentGetResponseEnvelopeSuccessTrue: + case ProjectDeploymentGetResponseEnvelopeSuccessTrue: return true } return false } type ProjectDeploymentRetryParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ProjectDeploymentRetryParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ProjectDeploymentRetryResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result Deployment `json:"result,required"` - // Whether the API call was successful + Errors []ProjectDeploymentRetryResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDeploymentRetryResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDeploymentRetryResponse `json:"result,required"` + // Whether the API call was successful. Success ProjectDeploymentRetryResponseEnvelopeSuccess `json:"success,required"` JSON projectDeploymentRetryResponseEnvelopeJSON `json:"-"` } @@ -483,37 +3233,127 @@ func (r projectDeploymentRetryResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDeploymentRetryResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentRetryResponseEnvelopeErrorsSource `json:"source"` + JSON projectDeploymentRetryResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDeploymentRetryResponseEnvelopeErrorsJSON contains the JSON metadata for +// the struct [ProjectDeploymentRetryResponseEnvelopeErrors] +type projectDeploymentRetryResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentRetryResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentRetryResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDeploymentRetryResponseEnvelopeErrorsSourceJSON contains the JSON +// metadata for the struct [ProjectDeploymentRetryResponseEnvelopeErrorsSource] +type projectDeploymentRetryResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentRetryResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentRetryResponseEnvelopeMessagesSource `json:"source"` + JSON projectDeploymentRetryResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDeploymentRetryResponseEnvelopeMessagesJSON contains the JSON metadata +// for the struct [ProjectDeploymentRetryResponseEnvelopeMessages] +type projectDeploymentRetryResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentRetryResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentRetryResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDeploymentRetryResponseEnvelopeMessagesSourceJSON contains the JSON +// metadata for the struct [ProjectDeploymentRetryResponseEnvelopeMessagesSource] +type projectDeploymentRetryResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRetryResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRetryResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDeploymentRetryResponseEnvelopeSuccess bool const ( - ProjectDeploymentRetryResponseEnvelopeSuccessFalse ProjectDeploymentRetryResponseEnvelopeSuccess = false - ProjectDeploymentRetryResponseEnvelopeSuccessTrue ProjectDeploymentRetryResponseEnvelopeSuccess = true + ProjectDeploymentRetryResponseEnvelopeSuccessTrue ProjectDeploymentRetryResponseEnvelopeSuccess = true ) func (r ProjectDeploymentRetryResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDeploymentRetryResponseEnvelopeSuccessFalse, ProjectDeploymentRetryResponseEnvelopeSuccessTrue: + case ProjectDeploymentRetryResponseEnvelopeSuccessTrue: return true } return false } type ProjectDeploymentRollbackParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ProjectDeploymentRollbackParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ProjectDeploymentRollbackResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result Deployment `json:"result,required"` - // Whether the API call was successful + Errors []ProjectDeploymentRollbackResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDeploymentRollbackResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDeploymentRollbackResponse `json:"result,required"` + // Whether the API call was successful. Success ProjectDeploymentRollbackResponseEnvelopeSuccess `json:"success,required"` JSON projectDeploymentRollbackResponseEnvelopeJSON `json:"-"` } @@ -537,17 +3377,113 @@ func (r projectDeploymentRollbackResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDeploymentRollbackResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentRollbackResponseEnvelopeErrorsSource `json:"source"` + JSON projectDeploymentRollbackResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDeploymentRollbackResponseEnvelopeErrorsJSON contains the JSON metadata +// for the struct [ProjectDeploymentRollbackResponseEnvelopeErrors] +type projectDeploymentRollbackResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentRollbackResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentRollbackResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDeploymentRollbackResponseEnvelopeErrorsSourceJSON contains the JSON +// metadata for the struct [ProjectDeploymentRollbackResponseEnvelopeErrorsSource] +type projectDeploymentRollbackResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentRollbackResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentRollbackResponseEnvelopeMessagesSource `json:"source"` + JSON projectDeploymentRollbackResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDeploymentRollbackResponseEnvelopeMessagesJSON contains the JSON metadata +// for the struct [ProjectDeploymentRollbackResponseEnvelopeMessages] +type projectDeploymentRollbackResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentRollbackResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentRollbackResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDeploymentRollbackResponseEnvelopeMessagesSourceJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentRollbackResponseEnvelopeMessagesSource] +type projectDeploymentRollbackResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentRollbackResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentRollbackResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDeploymentRollbackResponseEnvelopeSuccess bool const ( - ProjectDeploymentRollbackResponseEnvelopeSuccessFalse ProjectDeploymentRollbackResponseEnvelopeSuccess = false - ProjectDeploymentRollbackResponseEnvelopeSuccessTrue ProjectDeploymentRollbackResponseEnvelopeSuccess = true + ProjectDeploymentRollbackResponseEnvelopeSuccessTrue ProjectDeploymentRollbackResponseEnvelopeSuccess = true ) func (r ProjectDeploymentRollbackResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDeploymentRollbackResponseEnvelopeSuccessFalse, ProjectDeploymentRollbackResponseEnvelopeSuccessTrue: + case ProjectDeploymentRollbackResponseEnvelopeSuccessTrue: return true } return false diff --git a/pages/projectdeployment_test.go b/pages/projectdeployment_test.go index 4c77e1587c6..1b4a321beac 100644 --- a/pages/projectdeployment_test.go +++ b/pages/projectdeployment_test.go @@ -170,7 +170,6 @@ func TestProjectDeploymentRetry(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", pages.ProjectDeploymentRetryParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { @@ -201,7 +200,6 @@ func TestProjectDeploymentRollback(t *testing.T) { "023e105f4ecef8ad9ca31a8372d0c353", pages.ProjectDeploymentRollbackParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/pages/projectdeploymenthistorylog.go b/pages/projectdeploymenthistorylog.go index 6c05560851c..983c1dff40e 100644 --- a/pages/projectdeploymenthistorylog.go +++ b/pages/projectdeploymenthistorylog.go @@ -13,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v6/internal/param" "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // ProjectDeploymentHistoryLogService contains methods and other services that help @@ -61,9 +60,9 @@ func (r *ProjectDeploymentHistoryLogService) Get(ctx context.Context, projectNam } type ProjectDeploymentHistoryLogGetResponse struct { - Data []ProjectDeploymentHistoryLogGetResponseData `json:"data"` - IncludesContainerLogs bool `json:"includes_container_logs"` - Total int64 `json:"total"` + Data []ProjectDeploymentHistoryLogGetResponseData `json:"data,required"` + IncludesContainerLogs bool `json:"includes_container_logs,required"` + Total int64 `json:"total,required"` JSON projectDeploymentHistoryLogGetResponseJSON `json:"-"` } @@ -86,8 +85,8 @@ func (r projectDeploymentHistoryLogGetResponseJSON) RawJSON() string { } type ProjectDeploymentHistoryLogGetResponseData struct { - Line string `json:"line"` - Ts string `json:"ts"` + Line string `json:"line,required"` + Ts string `json:"ts,required"` JSON projectDeploymentHistoryLogGetResponseDataJSON `json:"-"` } @@ -109,15 +108,15 @@ func (r projectDeploymentHistoryLogGetResponseDataJSON) RawJSON() string { } type ProjectDeploymentHistoryLogGetParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` } type ProjectDeploymentHistoryLogGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ProjectDeploymentHistoryLogGetResponse `json:"result,required"` - // Whether the API call was successful + Errors []ProjectDeploymentHistoryLogGetResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDeploymentHistoryLogGetResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDeploymentHistoryLogGetResponse `json:"result,required"` + // Whether the API call was successful. Success ProjectDeploymentHistoryLogGetResponseEnvelopeSuccess `json:"success,required"` JSON projectDeploymentHistoryLogGetResponseEnvelopeJSON `json:"-"` } @@ -141,17 +140,114 @@ func (r projectDeploymentHistoryLogGetResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDeploymentHistoryLogGetResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentHistoryLogGetResponseEnvelopeErrorsSource `json:"source"` + JSON projectDeploymentHistoryLogGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDeploymentHistoryLogGetResponseEnvelopeErrorsJSON contains the JSON +// metadata for the struct [ProjectDeploymentHistoryLogGetResponseEnvelopeErrors] +type projectDeploymentHistoryLogGetResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentHistoryLogGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentHistoryLogGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentHistoryLogGetResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentHistoryLogGetResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDeploymentHistoryLogGetResponseEnvelopeErrorsSourceJSON contains the JSON +// metadata for the struct +// [ProjectDeploymentHistoryLogGetResponseEnvelopeErrorsSource] +type projectDeploymentHistoryLogGetResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentHistoryLogGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentHistoryLogGetResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentHistoryLogGetResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDeploymentHistoryLogGetResponseEnvelopeMessagesSource `json:"source"` + JSON projectDeploymentHistoryLogGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDeploymentHistoryLogGetResponseEnvelopeMessagesJSON contains the JSON +// metadata for the struct [ProjectDeploymentHistoryLogGetResponseEnvelopeMessages] +type projectDeploymentHistoryLogGetResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentHistoryLogGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentHistoryLogGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDeploymentHistoryLogGetResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDeploymentHistoryLogGetResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDeploymentHistoryLogGetResponseEnvelopeMessagesSourceJSON contains the +// JSON metadata for the struct +// [ProjectDeploymentHistoryLogGetResponseEnvelopeMessagesSource] +type projectDeploymentHistoryLogGetResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDeploymentHistoryLogGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDeploymentHistoryLogGetResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDeploymentHistoryLogGetResponseEnvelopeSuccess bool const ( - ProjectDeploymentHistoryLogGetResponseEnvelopeSuccessFalse ProjectDeploymentHistoryLogGetResponseEnvelopeSuccess = false - ProjectDeploymentHistoryLogGetResponseEnvelopeSuccessTrue ProjectDeploymentHistoryLogGetResponseEnvelopeSuccess = true + ProjectDeploymentHistoryLogGetResponseEnvelopeSuccessTrue ProjectDeploymentHistoryLogGetResponseEnvelopeSuccess = true ) func (r ProjectDeploymentHistoryLogGetResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDeploymentHistoryLogGetResponseEnvelopeSuccessFalse, ProjectDeploymentHistoryLogGetResponseEnvelopeSuccessTrue: + case ProjectDeploymentHistoryLogGetResponseEnvelopeSuccessTrue: return true } return false diff --git a/pages/projectdomain.go b/pages/projectdomain.go index 9d7d7143fc2..322b1fbe68a 100644 --- a/pages/projectdomain.go +++ b/pages/projectdomain.go @@ -14,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" "github.com/cloudflare/cloudflare-go/v6/packages/pagination" - "github.com/cloudflare/cloudflare-go/v6/shared" ) // ProjectDomainService contains methods and other services that help with @@ -114,10 +113,10 @@ func (r *ProjectDomainService) Delete(ctx context.Context, projectName string, d } // Retry the validation status of a single domain. -func (r *ProjectDomainService) Edit(ctx context.Context, projectName string, domainName string, params ProjectDomainEditParams, opts ...option.RequestOption) (res *ProjectDomainEditResponse, err error) { +func (r *ProjectDomainService) Edit(ctx context.Context, projectName string, domainName string, body ProjectDomainEditParams, opts ...option.RequestOption) (res *ProjectDomainEditResponse, err error) { var env ProjectDomainEditResponseEnvelope opts = slices.Concat(r.Options, opts) - if params.AccountID.Value == "" { + if body.AccountID.Value == "" { err = errors.New("missing required account_id parameter") return } @@ -129,8 +128,8 @@ func (r *ProjectDomainService) Edit(ctx context.Context, projectName string, dom err = errors.New("missing required domain_name parameter") return } - path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains/%s", params.AccountID, projectName, domainName) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) + path := fmt.Sprintf("accounts/%s/pages/projects/%s/domains/%s", body.AccountID, projectName, domainName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, nil, &env, opts...) if err != nil { return } @@ -164,16 +163,17 @@ func (r *ProjectDomainService) Get(ctx context.Context, projectName string, doma } type ProjectDomainNewResponse struct { - ID string `json:"id"` - CertificateAuthority ProjectDomainNewResponseCertificateAuthority `json:"certificate_authority"` - CreatedOn string `json:"created_on"` - DomainID string `json:"domain_id"` - Name string `json:"name"` - Status ProjectDomainNewResponseStatus `json:"status"` - ValidationData ProjectDomainNewResponseValidationData `json:"validation_data"` - VerificationData ProjectDomainNewResponseVerificationData `json:"verification_data"` - ZoneTag string `json:"zone_tag"` - JSON projectDomainNewResponseJSON `json:"-"` + ID string `json:"id,required"` + CertificateAuthority ProjectDomainNewResponseCertificateAuthority `json:"certificate_authority,required"` + CreatedOn string `json:"created_on,required"` + DomainID string `json:"domain_id,required"` + // The domain name. + Name string `json:"name,required"` + Status ProjectDomainNewResponseStatus `json:"status,required"` + ValidationData ProjectDomainNewResponseValidationData `json:"validation_data,required"` + VerificationData ProjectDomainNewResponseVerificationData `json:"verification_data,required"` + ZoneTag string `json:"zone_tag,required"` + JSON projectDomainNewResponseJSON `json:"-"` } // projectDomainNewResponseJSON contains the JSON metadata for the struct @@ -235,9 +235,9 @@ func (r ProjectDomainNewResponseStatus) IsKnown() bool { } type ProjectDomainNewResponseValidationData struct { + Method ProjectDomainNewResponseValidationDataMethod `json:"method,required"` + Status ProjectDomainNewResponseValidationDataStatus `json:"status,required"` ErrorMessage string `json:"error_message"` - Method ProjectDomainNewResponseValidationDataMethod `json:"method"` - Status ProjectDomainNewResponseValidationDataStatus `json:"status"` TXTName string `json:"txt_name"` TXTValue string `json:"txt_value"` JSON projectDomainNewResponseValidationDataJSON `json:"-"` @@ -246,9 +246,9 @@ type ProjectDomainNewResponseValidationData struct { // projectDomainNewResponseValidationDataJSON contains the JSON metadata for the // struct [ProjectDomainNewResponseValidationData] type projectDomainNewResponseValidationDataJSON struct { - ErrorMessage apijson.Field Method apijson.Field Status apijson.Field + ErrorMessage apijson.Field TXTName apijson.Field TXTValue apijson.Field raw string @@ -297,16 +297,16 @@ func (r ProjectDomainNewResponseValidationDataStatus) IsKnown() bool { } type ProjectDomainNewResponseVerificationData struct { + Status ProjectDomainNewResponseVerificationDataStatus `json:"status,required"` ErrorMessage string `json:"error_message"` - Status ProjectDomainNewResponseVerificationDataStatus `json:"status"` JSON projectDomainNewResponseVerificationDataJSON `json:"-"` } // projectDomainNewResponseVerificationDataJSON contains the JSON metadata for the // struct [ProjectDomainNewResponseVerificationData] type projectDomainNewResponseVerificationDataJSON struct { - ErrorMessage apijson.Field Status apijson.Field + ErrorMessage apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -338,16 +338,17 @@ func (r ProjectDomainNewResponseVerificationDataStatus) IsKnown() bool { } type ProjectDomainListResponse struct { - ID string `json:"id"` - CertificateAuthority ProjectDomainListResponseCertificateAuthority `json:"certificate_authority"` - CreatedOn string `json:"created_on"` - DomainID string `json:"domain_id"` - Name string `json:"name"` - Status ProjectDomainListResponseStatus `json:"status"` - ValidationData ProjectDomainListResponseValidationData `json:"validation_data"` - VerificationData ProjectDomainListResponseVerificationData `json:"verification_data"` - ZoneTag string `json:"zone_tag"` - JSON projectDomainListResponseJSON `json:"-"` + ID string `json:"id,required"` + CertificateAuthority ProjectDomainListResponseCertificateAuthority `json:"certificate_authority,required"` + CreatedOn string `json:"created_on,required"` + DomainID string `json:"domain_id,required"` + // The domain name. + Name string `json:"name,required"` + Status ProjectDomainListResponseStatus `json:"status,required"` + ValidationData ProjectDomainListResponseValidationData `json:"validation_data,required"` + VerificationData ProjectDomainListResponseVerificationData `json:"verification_data,required"` + ZoneTag string `json:"zone_tag,required"` + JSON projectDomainListResponseJSON `json:"-"` } // projectDomainListResponseJSON contains the JSON metadata for the struct @@ -409,9 +410,9 @@ func (r ProjectDomainListResponseStatus) IsKnown() bool { } type ProjectDomainListResponseValidationData struct { + Method ProjectDomainListResponseValidationDataMethod `json:"method,required"` + Status ProjectDomainListResponseValidationDataStatus `json:"status,required"` ErrorMessage string `json:"error_message"` - Method ProjectDomainListResponseValidationDataMethod `json:"method"` - Status ProjectDomainListResponseValidationDataStatus `json:"status"` TXTName string `json:"txt_name"` TXTValue string `json:"txt_value"` JSON projectDomainListResponseValidationDataJSON `json:"-"` @@ -420,9 +421,9 @@ type ProjectDomainListResponseValidationData struct { // projectDomainListResponseValidationDataJSON contains the JSON metadata for the // struct [ProjectDomainListResponseValidationData] type projectDomainListResponseValidationDataJSON struct { - ErrorMessage apijson.Field Method apijson.Field Status apijson.Field + ErrorMessage apijson.Field TXTName apijson.Field TXTValue apijson.Field raw string @@ -471,16 +472,16 @@ func (r ProjectDomainListResponseValidationDataStatus) IsKnown() bool { } type ProjectDomainListResponseVerificationData struct { + Status ProjectDomainListResponseVerificationDataStatus `json:"status,required"` ErrorMessage string `json:"error_message"` - Status ProjectDomainListResponseVerificationDataStatus `json:"status"` JSON projectDomainListResponseVerificationDataJSON `json:"-"` } // projectDomainListResponseVerificationDataJSON contains the JSON metadata for the // struct [ProjectDomainListResponseVerificationData] type projectDomainListResponseVerificationDataJSON struct { - ErrorMessage apijson.Field Status apijson.Field + ErrorMessage apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -514,16 +515,17 @@ func (r ProjectDomainListResponseVerificationDataStatus) IsKnown() bool { type ProjectDomainDeleteResponse = interface{} type ProjectDomainEditResponse struct { - ID string `json:"id"` - CertificateAuthority ProjectDomainEditResponseCertificateAuthority `json:"certificate_authority"` - CreatedOn string `json:"created_on"` - DomainID string `json:"domain_id"` - Name string `json:"name"` - Status ProjectDomainEditResponseStatus `json:"status"` - ValidationData ProjectDomainEditResponseValidationData `json:"validation_data"` - VerificationData ProjectDomainEditResponseVerificationData `json:"verification_data"` - ZoneTag string `json:"zone_tag"` - JSON projectDomainEditResponseJSON `json:"-"` + ID string `json:"id,required"` + CertificateAuthority ProjectDomainEditResponseCertificateAuthority `json:"certificate_authority,required"` + CreatedOn string `json:"created_on,required"` + DomainID string `json:"domain_id,required"` + // The domain name. + Name string `json:"name,required"` + Status ProjectDomainEditResponseStatus `json:"status,required"` + ValidationData ProjectDomainEditResponseValidationData `json:"validation_data,required"` + VerificationData ProjectDomainEditResponseVerificationData `json:"verification_data,required"` + ZoneTag string `json:"zone_tag,required"` + JSON projectDomainEditResponseJSON `json:"-"` } // projectDomainEditResponseJSON contains the JSON metadata for the struct @@ -585,9 +587,9 @@ func (r ProjectDomainEditResponseStatus) IsKnown() bool { } type ProjectDomainEditResponseValidationData struct { + Method ProjectDomainEditResponseValidationDataMethod `json:"method,required"` + Status ProjectDomainEditResponseValidationDataStatus `json:"status,required"` ErrorMessage string `json:"error_message"` - Method ProjectDomainEditResponseValidationDataMethod `json:"method"` - Status ProjectDomainEditResponseValidationDataStatus `json:"status"` TXTName string `json:"txt_name"` TXTValue string `json:"txt_value"` JSON projectDomainEditResponseValidationDataJSON `json:"-"` @@ -596,9 +598,9 @@ type ProjectDomainEditResponseValidationData struct { // projectDomainEditResponseValidationDataJSON contains the JSON metadata for the // struct [ProjectDomainEditResponseValidationData] type projectDomainEditResponseValidationDataJSON struct { - ErrorMessage apijson.Field Method apijson.Field Status apijson.Field + ErrorMessage apijson.Field TXTName apijson.Field TXTValue apijson.Field raw string @@ -647,16 +649,16 @@ func (r ProjectDomainEditResponseValidationDataStatus) IsKnown() bool { } type ProjectDomainEditResponseVerificationData struct { + Status ProjectDomainEditResponseVerificationDataStatus `json:"status,required"` ErrorMessage string `json:"error_message"` - Status ProjectDomainEditResponseVerificationDataStatus `json:"status"` JSON projectDomainEditResponseVerificationDataJSON `json:"-"` } // projectDomainEditResponseVerificationDataJSON contains the JSON metadata for the // struct [ProjectDomainEditResponseVerificationData] type projectDomainEditResponseVerificationDataJSON struct { - ErrorMessage apijson.Field Status apijson.Field + ErrorMessage apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -688,16 +690,17 @@ func (r ProjectDomainEditResponseVerificationDataStatus) IsKnown() bool { } type ProjectDomainGetResponse struct { - ID string `json:"id"` - CertificateAuthority ProjectDomainGetResponseCertificateAuthority `json:"certificate_authority"` - CreatedOn string `json:"created_on"` - DomainID string `json:"domain_id"` - Name string `json:"name"` - Status ProjectDomainGetResponseStatus `json:"status"` - ValidationData ProjectDomainGetResponseValidationData `json:"validation_data"` - VerificationData ProjectDomainGetResponseVerificationData `json:"verification_data"` - ZoneTag string `json:"zone_tag"` - JSON projectDomainGetResponseJSON `json:"-"` + ID string `json:"id,required"` + CertificateAuthority ProjectDomainGetResponseCertificateAuthority `json:"certificate_authority,required"` + CreatedOn string `json:"created_on,required"` + DomainID string `json:"domain_id,required"` + // The domain name. + Name string `json:"name,required"` + Status ProjectDomainGetResponseStatus `json:"status,required"` + ValidationData ProjectDomainGetResponseValidationData `json:"validation_data,required"` + VerificationData ProjectDomainGetResponseVerificationData `json:"verification_data,required"` + ZoneTag string `json:"zone_tag,required"` + JSON projectDomainGetResponseJSON `json:"-"` } // projectDomainGetResponseJSON contains the JSON metadata for the struct @@ -759,9 +762,9 @@ func (r ProjectDomainGetResponseStatus) IsKnown() bool { } type ProjectDomainGetResponseValidationData struct { + Method ProjectDomainGetResponseValidationDataMethod `json:"method,required"` + Status ProjectDomainGetResponseValidationDataStatus `json:"status,required"` ErrorMessage string `json:"error_message"` - Method ProjectDomainGetResponseValidationDataMethod `json:"method"` - Status ProjectDomainGetResponseValidationDataStatus `json:"status"` TXTName string `json:"txt_name"` TXTValue string `json:"txt_value"` JSON projectDomainGetResponseValidationDataJSON `json:"-"` @@ -770,9 +773,9 @@ type ProjectDomainGetResponseValidationData struct { // projectDomainGetResponseValidationDataJSON contains the JSON metadata for the // struct [ProjectDomainGetResponseValidationData] type projectDomainGetResponseValidationDataJSON struct { - ErrorMessage apijson.Field Method apijson.Field Status apijson.Field + ErrorMessage apijson.Field TXTName apijson.Field TXTValue apijson.Field raw string @@ -821,16 +824,16 @@ func (r ProjectDomainGetResponseValidationDataStatus) IsKnown() bool { } type ProjectDomainGetResponseVerificationData struct { + Status ProjectDomainGetResponseVerificationDataStatus `json:"status,required"` ErrorMessage string `json:"error_message"` - Status ProjectDomainGetResponseVerificationDataStatus `json:"status"` JSON projectDomainGetResponseVerificationDataJSON `json:"-"` } // projectDomainGetResponseVerificationDataJSON contains the JSON metadata for the // struct [ProjectDomainGetResponseVerificationData] type projectDomainGetResponseVerificationDataJSON struct { - ErrorMessage apijson.Field Status apijson.Field + ErrorMessage apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -862,9 +865,10 @@ func (r ProjectDomainGetResponseVerificationDataStatus) IsKnown() bool { } type ProjectDomainNewParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` - Name param.Field[string] `json:"name"` + // The domain name. + Name param.Field[string] `json:"name,required"` } func (r ProjectDomainNewParams) MarshalJSON() (data []byte, err error) { @@ -872,10 +876,10 @@ func (r ProjectDomainNewParams) MarshalJSON() (data []byte, err error) { } type ProjectDomainNewResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ProjectDomainNewResponse `json:"result,required,nullable"` - // Whether the API call was successful + Errors []ProjectDomainNewResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDomainNewResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDomainNewResponse `json:"result,required"` + // Whether the API call was successful. Success ProjectDomainNewResponseEnvelopeSuccess `json:"success,required"` JSON projectDomainNewResponseEnvelopeJSON `json:"-"` } @@ -899,37 +903,132 @@ func (r projectDomainNewResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDomainNewResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDomainNewResponseEnvelopeErrorsSource `json:"source"` + JSON projectDomainNewResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDomainNewResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [ProjectDomainNewResponseEnvelopeErrors] +type projectDomainNewResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainNewResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainNewResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDomainNewResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDomainNewResponseEnvelopeErrorsSourceJSON contains the JSON metadata for +// the struct [ProjectDomainNewResponseEnvelopeErrorsSource] +type projectDomainNewResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainNewResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainNewResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDomainNewResponseEnvelopeMessagesSource `json:"source"` + JSON projectDomainNewResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDomainNewResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [ProjectDomainNewResponseEnvelopeMessages] +type projectDomainNewResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainNewResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainNewResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDomainNewResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDomainNewResponseEnvelopeMessagesSourceJSON contains the JSON metadata +// for the struct [ProjectDomainNewResponseEnvelopeMessagesSource] +type projectDomainNewResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainNewResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDomainNewResponseEnvelopeSuccess bool const ( - ProjectDomainNewResponseEnvelopeSuccessFalse ProjectDomainNewResponseEnvelopeSuccess = false - ProjectDomainNewResponseEnvelopeSuccessTrue ProjectDomainNewResponseEnvelopeSuccess = true + ProjectDomainNewResponseEnvelopeSuccessTrue ProjectDomainNewResponseEnvelopeSuccess = true ) func (r ProjectDomainNewResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDomainNewResponseEnvelopeSuccessFalse, ProjectDomainNewResponseEnvelopeSuccessTrue: + case ProjectDomainNewResponseEnvelopeSuccessTrue: return true } return false } type ProjectDomainListParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` } type ProjectDomainDeleteParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` } type ProjectDomainDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ProjectDomainDeleteResponse `json:"result,required,nullable"` - // Whether the API call was successful + Errors []ProjectDomainDeleteResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDomainDeleteResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDomainDeleteResponse `json:"result,required,nullable"` + // Whether the API call was successful. Success ProjectDomainDeleteResponseEnvelopeSuccess `json:"success,required"` JSON projectDomainDeleteResponseEnvelopeJSON `json:"-"` } @@ -953,37 +1052,127 @@ func (r projectDomainDeleteResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDomainDeleteResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDomainDeleteResponseEnvelopeErrorsSource `json:"source"` + JSON projectDomainDeleteResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDomainDeleteResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [ProjectDomainDeleteResponseEnvelopeErrors] +type projectDomainDeleteResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainDeleteResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainDeleteResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDomainDeleteResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDomainDeleteResponseEnvelopeErrorsSourceJSON contains the JSON metadata +// for the struct [ProjectDomainDeleteResponseEnvelopeErrorsSource] +type projectDomainDeleteResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainDeleteResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainDeleteResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDomainDeleteResponseEnvelopeMessagesSource `json:"source"` + JSON projectDomainDeleteResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDomainDeleteResponseEnvelopeMessagesJSON contains the JSON metadata for +// the struct [ProjectDomainDeleteResponseEnvelopeMessages] +type projectDomainDeleteResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainDeleteResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainDeleteResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDomainDeleteResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDomainDeleteResponseEnvelopeMessagesSourceJSON contains the JSON metadata +// for the struct [ProjectDomainDeleteResponseEnvelopeMessagesSource] +type projectDomainDeleteResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainDeleteResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDomainDeleteResponseEnvelopeSuccess bool const ( - ProjectDomainDeleteResponseEnvelopeSuccessFalse ProjectDomainDeleteResponseEnvelopeSuccess = false - ProjectDomainDeleteResponseEnvelopeSuccessTrue ProjectDomainDeleteResponseEnvelopeSuccess = true + ProjectDomainDeleteResponseEnvelopeSuccessTrue ProjectDomainDeleteResponseEnvelopeSuccess = true ) func (r ProjectDomainDeleteResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDomainDeleteResponseEnvelopeSuccessFalse, ProjectDomainDeleteResponseEnvelopeSuccessTrue: + case ProjectDomainDeleteResponseEnvelopeSuccessTrue: return true } return false } type ProjectDomainEditParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` - Body interface{} `json:"body,required"` -} - -func (r ProjectDomainEditParams) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r.Body) } type ProjectDomainEditResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ProjectDomainEditResponse `json:"result,required,nullable"` - // Whether the API call was successful + Errors []ProjectDomainEditResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDomainEditResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDomainEditResponse `json:"result,required"` + // Whether the API call was successful. Success ProjectDomainEditResponseEnvelopeSuccess `json:"success,required"` JSON projectDomainEditResponseEnvelopeJSON `json:"-"` } @@ -1007,32 +1196,127 @@ func (r projectDomainEditResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDomainEditResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDomainEditResponseEnvelopeErrorsSource `json:"source"` + JSON projectDomainEditResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDomainEditResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [ProjectDomainEditResponseEnvelopeErrors] +type projectDomainEditResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainEditResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainEditResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDomainEditResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDomainEditResponseEnvelopeErrorsSourceJSON contains the JSON metadata for +// the struct [ProjectDomainEditResponseEnvelopeErrorsSource] +type projectDomainEditResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainEditResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainEditResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainEditResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDomainEditResponseEnvelopeMessagesSource `json:"source"` + JSON projectDomainEditResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDomainEditResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [ProjectDomainEditResponseEnvelopeMessages] +type projectDomainEditResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainEditResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainEditResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDomainEditResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDomainEditResponseEnvelopeMessagesSourceJSON contains the JSON metadata +// for the struct [ProjectDomainEditResponseEnvelopeMessagesSource] +type projectDomainEditResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainEditResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainEditResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDomainEditResponseEnvelopeSuccess bool const ( - ProjectDomainEditResponseEnvelopeSuccessFalse ProjectDomainEditResponseEnvelopeSuccess = false - ProjectDomainEditResponseEnvelopeSuccessTrue ProjectDomainEditResponseEnvelopeSuccess = true + ProjectDomainEditResponseEnvelopeSuccessTrue ProjectDomainEditResponseEnvelopeSuccess = true ) func (r ProjectDomainEditResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDomainEditResponseEnvelopeSuccessFalse, ProjectDomainEditResponseEnvelopeSuccessTrue: + case ProjectDomainEditResponseEnvelopeSuccessTrue: return true } return false } type ProjectDomainGetParams struct { - // Identifier + // Identifier. AccountID param.Field[string] `path:"account_id,required"` } type ProjectDomainGetResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result ProjectDomainGetResponse `json:"result,required,nullable"` - // Whether the API call was successful + Errors []ProjectDomainGetResponseEnvelopeErrors `json:"errors,required"` + Messages []ProjectDomainGetResponseEnvelopeMessages `json:"messages,required"` + Result ProjectDomainGetResponse `json:"result,required"` + // Whether the API call was successful. Success ProjectDomainGetResponseEnvelopeSuccess `json:"success,required"` JSON projectDomainGetResponseEnvelopeJSON `json:"-"` } @@ -1056,17 +1340,112 @@ func (r projectDomainGetResponseEnvelopeJSON) RawJSON() string { return r.raw } -// Whether the API call was successful +type ProjectDomainGetResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDomainGetResponseEnvelopeErrorsSource `json:"source"` + JSON projectDomainGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// projectDomainGetResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [ProjectDomainGetResponseEnvelopeErrors] +type projectDomainGetResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainGetResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON projectDomainGetResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// projectDomainGetResponseEnvelopeErrorsSourceJSON contains the JSON metadata for +// the struct [ProjectDomainGetResponseEnvelopeErrorsSource] +type projectDomainGetResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainGetResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainGetResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ProjectDomainGetResponseEnvelopeMessagesSource `json:"source"` + JSON projectDomainGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// projectDomainGetResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [ProjectDomainGetResponseEnvelopeMessages] +type projectDomainGetResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ProjectDomainGetResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON projectDomainGetResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// projectDomainGetResponseEnvelopeMessagesSourceJSON contains the JSON metadata +// for the struct [ProjectDomainGetResponseEnvelopeMessagesSource] +type projectDomainGetResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ProjectDomainGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r projectDomainGetResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. type ProjectDomainGetResponseEnvelopeSuccess bool const ( - ProjectDomainGetResponseEnvelopeSuccessFalse ProjectDomainGetResponseEnvelopeSuccess = false - ProjectDomainGetResponseEnvelopeSuccessTrue ProjectDomainGetResponseEnvelopeSuccess = true + ProjectDomainGetResponseEnvelopeSuccessTrue ProjectDomainGetResponseEnvelopeSuccess = true ) func (r ProjectDomainGetResponseEnvelopeSuccess) IsKnown() bool { switch r { - case ProjectDomainGetResponseEnvelopeSuccessFalse, ProjectDomainGetResponseEnvelopeSuccessTrue: + case ProjectDomainGetResponseEnvelopeSuccessTrue: return true } return false diff --git a/pages/projectdomain_test.go b/pages/projectdomain_test.go index 4da37bc5374..4806b474a8e 100644 --- a/pages/projectdomain_test.go +++ b/pages/projectdomain_test.go @@ -14,7 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v6/pages" ) -func TestProjectDomainNewWithOptionalParams(t *testing.T) { +func TestProjectDomainNew(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -32,7 +32,7 @@ func TestProjectDomainNewWithOptionalParams(t *testing.T) { "this-is-my-project-01", pages.ProjectDomainNewParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Name: cloudflare.F("example.com"), + Name: cloudflare.F("this-is-my-domain-01.com"), }, ) if err != nil { @@ -122,7 +122,6 @@ func TestProjectDomainEdit(t *testing.T) { "this-is-my-domain-01.com", pages.ProjectDomainEditParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: map[string]interface{}{}, }, ) if err != nil { diff --git a/radar/aibot.go b/radar/aibot.go index 2f7de2d0729..81fe193ba0e 100644 --- a/radar/aibot.go +++ b/radar/aibot.go @@ -163,10 +163,12 @@ func (r aiBotSummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AIBotSummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -196,6 +198,65 @@ func (r aiBotSummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIBotSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIBotSummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -376,10 +437,12 @@ func (r aiBotTimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AIBotTimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -409,6 +472,65 @@ func (r aiBotTimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() strin return r.raw } +// Data source for annotations. +type AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIBotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIBotTimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -590,10 +712,12 @@ func (r aiBotTimeseriesGroupsResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -624,6 +748,65 @@ func (r aiBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIBotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIBotTimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/aibotsummary.go b/radar/aibotsummary.go index cbe3f62a732..d88d8113a38 100644 --- a/radar/aibotsummary.go +++ b/radar/aibotsummary.go @@ -136,10 +136,12 @@ func (r aiBotSummaryUserAgentResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -170,6 +172,65 @@ func (r aiBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAll AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBots AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceCt AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDos AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFw AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceNet AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIBotSummaryUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIBotSummaryUserAgentResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/aiinference.go b/radar/aiinference.go index 21828ef4b8b..278e6312621 100644 --- a/radar/aiinference.go +++ b/radar/aiinference.go @@ -152,10 +152,12 @@ func (r aiInferenceSummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -186,6 +188,65 @@ func (r aiInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIInferenceSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIInferenceSummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -368,10 +429,12 @@ func (r aiInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -402,6 +465,65 @@ func (r aiInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIInferenceTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIInferenceTimeseriesGroupsV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/aiinferencesummary.go b/radar/aiinferencesummary.go index f68a6f89183..b5fb36aac8d 100644 --- a/radar/aiinferencesummary.go +++ b/radar/aiinferencesummary.go @@ -153,10 +153,12 @@ func (r aiInferenceSummaryModelResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -187,6 +189,65 @@ func (r aiInferenceSummaryModelResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceCt AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIInferenceSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIInferenceSummaryModelResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -342,10 +403,12 @@ func (r aiInferenceSummaryTaskResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -376,6 +439,65 @@ func (r aiInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceCt AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIInferenceSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIInferenceSummaryTaskResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/aiinferencetimeseriesgroupsummary.go b/radar/aiinferencetimeseriesgroupsummary.go index 44ff558aff0..a2cbcabe733 100644 --- a/radar/aiinferencetimeseriesgroupsummary.go +++ b/radar/aiinferencetimeseriesgroupsummary.go @@ -180,10 +180,12 @@ func (r aiInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoJSON) Ra // Annotation associated with the result (e.g. outage or other type of event). type AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -214,6 +216,65 @@ func (r aiInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotati return r.raw } +// Data source for annotations. +type AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceCt AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIInferenceTimeseriesGroupSummaryModelResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIInferenceTimeseriesGroupSummaryModelResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -419,10 +480,12 @@ func (r aiInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoJSON) Raw // Annotation associated with the result (e.g. outage or other type of event). type AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -453,6 +516,65 @@ func (r aiInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotatio return r.raw } +// Data source for annotations. +type AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAll AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBGP AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBots AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceCt AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNS AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDos AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFw AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceIQI AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceNet AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAll, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceBots, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceCt, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceDos, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFw, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceNet, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeEvent AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeOutage AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePipeline AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AIInferenceTimeseriesGroupSummaryTaskResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AIInferenceTimeseriesGroupSummaryTaskResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/aitimeseriesgroup.go b/radar/aitimeseriesgroup.go index 25d684334af..0006493106f 100644 --- a/radar/aitimeseriesgroup.go +++ b/radar/aitimeseriesgroup.go @@ -190,10 +190,12 @@ func (r aiTimeseriesGroupSummaryResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -224,6 +226,65 @@ func (r aiTimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AITimeseriesGroupSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AITimeseriesGroupSummaryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -404,10 +465,12 @@ func (r aiTimeseriesGroupTimeseriesResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -438,6 +501,65 @@ func (r aiTimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AITimeseriesGroupTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AITimeseriesGroupTimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -620,10 +742,12 @@ func (r aiTimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoJSON) RawJSON // Annotation associated with the result (e.g. outage or other type of event). type AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -654,6 +778,65 @@ func (r aiTimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationJSO return r.raw } +// Data source for annotations. +type AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AITimeseriesGroupTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AITimeseriesGroupTimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -857,10 +1040,12 @@ func (r aiTimeseriesGroupUserAgentResponseMetaConfidenceInfoJSON) RawJSON() stri // Annotation associated with the result (e.g. outage or other type of event). type AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -891,6 +1076,65 @@ func (r aiTimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationJSON) RawJ return r.raw } +// Data source for annotations. +type AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAll AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBGP AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBots AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceCt AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNS AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDos AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFw AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceIQI AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceNet AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAll, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceBots, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceCt, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceDos, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFw, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceNet, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeEvent AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeOutage AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePipeline AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AITimeseriesGroupUserAgentResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AITimeseriesGroupUserAgentResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/annotation.go b/radar/annotation.go index d6a2935b1ec..b849754e77e 100644 --- a/radar/annotation.go +++ b/radar/annotation.go @@ -79,6 +79,8 @@ type AnnotationListResponseAnnotation struct { EventType string `json:"eventType,required"` Locations []string `json:"locations,required"` LocationsDetails []AnnotationListResponseAnnotationsLocationsDetail `json:"locationsDetails,required"` + Origins []string `json:"origins,required"` + OriginsDetails []AnnotationListResponseAnnotationsOriginsDetail `json:"originsDetails,required"` Outage AnnotationListResponseAnnotationsOutage `json:"outage,required"` StartDate string `json:"startDate,required"` Description string `json:"description"` @@ -98,6 +100,8 @@ type annotationListResponseAnnotationJSON struct { EventType apijson.Field Locations apijson.Field LocationsDetails apijson.Field + Origins apijson.Field + OriginsDetails apijson.Field Outage apijson.Field StartDate apijson.Field Description apijson.Field @@ -187,6 +191,29 @@ func (r annotationListResponseAnnotationsLocationsDetailJSON) RawJSON() string { return r.raw } +type AnnotationListResponseAnnotationsOriginsDetail struct { + Name string `json:"name,required"` + Origin string `json:"origin,required"` + JSON annotationListResponseAnnotationsOriginsDetailJSON `json:"-"` +} + +// annotationListResponseAnnotationsOriginsDetailJSON contains the JSON metadata +// for the struct [AnnotationListResponseAnnotationsOriginsDetail] +type annotationListResponseAnnotationsOriginsDetailJSON struct { + Name apijson.Field + Origin apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AnnotationListResponseAnnotationsOriginsDetail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r annotationListResponseAnnotationsOriginsDetailJSON) RawJSON() string { + return r.raw +} + type AnnotationListResponseAnnotationsOutage struct { OutageCause string `json:"outageCause,required"` OutageType string `json:"outageType,required"` @@ -214,12 +241,16 @@ type AnnotationListParams struct { // Filters results by Autonomous System. Specify a single Autonomous System Number // (ASN) as integer. ASN param.Field[int64] `query:"asn"` + // Filters results by data source. + DataSource param.Field[AnnotationListParamsDataSource] `query:"dataSource"` // End of the date range (inclusive). DateEnd param.Field[time.Time] `query:"dateEnd" format:"date-time"` // Filters results by date range. DateRange param.Field[string] `query:"dateRange"` // Start of the date range (inclusive). DateStart param.Field[time.Time] `query:"dateStart" format:"date-time"` + // Filters results by event type. + EventType param.Field[AnnotationListParamsEventType] `query:"eventType"` // Format in which results will be returned. Format param.Field[AnnotationListParamsFormat] `query:"format"` // Limits the number of objects returned in the response. @@ -228,6 +259,8 @@ type AnnotationListParams struct { Location param.Field[string] `query:"location"` // Skips the specified number of objects before fetching the results. Offset param.Field[int64] `query:"offset"` + // Filters results by origin. + Origin param.Field[string] `query:"origin"` } // URLQuery serializes [AnnotationListParams]'s query parameters as `url.Values`. @@ -238,6 +271,65 @@ func (r AnnotationListParams) URLQuery() (v url.Values) { }) } +// Filters results by data source. +type AnnotationListParamsDataSource string + +const ( + AnnotationListParamsDataSourceAll AnnotationListParamsDataSource = "ALL" + AnnotationListParamsDataSourceAIBots AnnotationListParamsDataSource = "AI_BOTS" + AnnotationListParamsDataSourceAIGateway AnnotationListParamsDataSource = "AI_GATEWAY" + AnnotationListParamsDataSourceBGP AnnotationListParamsDataSource = "BGP" + AnnotationListParamsDataSourceBots AnnotationListParamsDataSource = "BOTS" + AnnotationListParamsDataSourceConnectionAnomaly AnnotationListParamsDataSource = "CONNECTION_ANOMALY" + AnnotationListParamsDataSourceCt AnnotationListParamsDataSource = "CT" + AnnotationListParamsDataSourceDNS AnnotationListParamsDataSource = "DNS" + AnnotationListParamsDataSourceDNSMagnitude AnnotationListParamsDataSource = "DNS_MAGNITUDE" + AnnotationListParamsDataSourceDNSAS112 AnnotationListParamsDataSource = "DNS_AS112" + AnnotationListParamsDataSourceDos AnnotationListParamsDataSource = "DOS" + AnnotationListParamsDataSourceEmailRouting AnnotationListParamsDataSource = "EMAIL_ROUTING" + AnnotationListParamsDataSourceEmailSecurity AnnotationListParamsDataSource = "EMAIL_SECURITY" + AnnotationListParamsDataSourceFw AnnotationListParamsDataSource = "FW" + AnnotationListParamsDataSourceFwPg AnnotationListParamsDataSource = "FW_PG" + AnnotationListParamsDataSourceHTTP AnnotationListParamsDataSource = "HTTP" + AnnotationListParamsDataSourceHTTPControl AnnotationListParamsDataSource = "HTTP_CONTROL" + AnnotationListParamsDataSourceHTTPCrawlerReferer AnnotationListParamsDataSource = "HTTP_CRAWLER_REFERER" + AnnotationListParamsDataSourceHTTPOrigins AnnotationListParamsDataSource = "HTTP_ORIGINS" + AnnotationListParamsDataSourceIQI AnnotationListParamsDataSource = "IQI" + AnnotationListParamsDataSourceLeakedCredentials AnnotationListParamsDataSource = "LEAKED_CREDENTIALS" + AnnotationListParamsDataSourceNet AnnotationListParamsDataSource = "NET" + AnnotationListParamsDataSourceRobotsTXT AnnotationListParamsDataSource = "ROBOTS_TXT" + AnnotationListParamsDataSourceSpeed AnnotationListParamsDataSource = "SPEED" + AnnotationListParamsDataSourceWorkersAI AnnotationListParamsDataSource = "WORKERS_AI" +) + +func (r AnnotationListParamsDataSource) IsKnown() bool { + switch r { + case AnnotationListParamsDataSourceAll, AnnotationListParamsDataSourceAIBots, AnnotationListParamsDataSourceAIGateway, AnnotationListParamsDataSourceBGP, AnnotationListParamsDataSourceBots, AnnotationListParamsDataSourceConnectionAnomaly, AnnotationListParamsDataSourceCt, AnnotationListParamsDataSourceDNS, AnnotationListParamsDataSourceDNSMagnitude, AnnotationListParamsDataSourceDNSAS112, AnnotationListParamsDataSourceDos, AnnotationListParamsDataSourceEmailRouting, AnnotationListParamsDataSourceEmailSecurity, AnnotationListParamsDataSourceFw, AnnotationListParamsDataSourceFwPg, AnnotationListParamsDataSourceHTTP, AnnotationListParamsDataSourceHTTPControl, AnnotationListParamsDataSourceHTTPCrawlerReferer, AnnotationListParamsDataSourceHTTPOrigins, AnnotationListParamsDataSourceIQI, AnnotationListParamsDataSourceLeakedCredentials, AnnotationListParamsDataSourceNet, AnnotationListParamsDataSourceRobotsTXT, AnnotationListParamsDataSourceSpeed, AnnotationListParamsDataSourceWorkersAI: + return true + } + return false +} + +// Filters results by event type. +type AnnotationListParamsEventType string + +const ( + AnnotationListParamsEventTypeEvent AnnotationListParamsEventType = "EVENT" + AnnotationListParamsEventTypeGeneral AnnotationListParamsEventType = "GENERAL" + AnnotationListParamsEventTypeOutage AnnotationListParamsEventType = "OUTAGE" + AnnotationListParamsEventTypePartialProjection AnnotationListParamsEventType = "PARTIAL_PROJECTION" + AnnotationListParamsEventTypePipeline AnnotationListParamsEventType = "PIPELINE" + AnnotationListParamsEventTypeTrafficAnomaly AnnotationListParamsEventType = "TRAFFIC_ANOMALY" +) + +func (r AnnotationListParamsEventType) IsKnown() bool { + switch r { + case AnnotationListParamsEventTypeEvent, AnnotationListParamsEventTypeGeneral, AnnotationListParamsEventTypeOutage, AnnotationListParamsEventTypePartialProjection, AnnotationListParamsEventTypePipeline, AnnotationListParamsEventTypeTrafficAnomaly: + return true + } + return false +} + // Format in which results will be returned. type AnnotationListParamsFormat string diff --git a/radar/annotation_test.go b/radar/annotation_test.go index bf4ef98ec07..c98012f8eb4 100644 --- a/radar/annotation_test.go +++ b/radar/annotation_test.go @@ -29,14 +29,17 @@ func TestAnnotationListWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.Radar.Annotations.List(context.TODO(), radar.AnnotationListParams{ - ASN: cloudflare.F(int64(174)), - DateEnd: cloudflare.F(time.Now()), - DateRange: cloudflare.F("7d"), - DateStart: cloudflare.F(time.Now()), - Format: cloudflare.F(radar.AnnotationListParamsFormatJson), - Limit: cloudflare.F(int64(1)), - Location: cloudflare.F("US"), - Offset: cloudflare.F(int64(0)), + ASN: cloudflare.F(int64(174)), + DataSource: cloudflare.F(radar.AnnotationListParamsDataSourceAll), + DateEnd: cloudflare.F(time.Now()), + DateRange: cloudflare.F("7d"), + DateStart: cloudflare.F(time.Now()), + EventType: cloudflare.F(radar.AnnotationListParamsEventTypeOutage), + Format: cloudflare.F(radar.AnnotationListParamsFormatJson), + Limit: cloudflare.F(int64(1)), + Location: cloudflare.F("US"), + Offset: cloudflare.F(int64(0)), + Origin: cloudflare.F("amazon-us-east-1"), }) if err != nil { var apierr *cloudflare.Error diff --git a/radar/annotationoutage.go b/radar/annotationoutage.go index e6069b2f6f2..768e6657c8d 100644 --- a/radar/annotationoutage.go +++ b/radar/annotationoutage.go @@ -90,6 +90,8 @@ type AnnotationOutageGetResponseAnnotation struct { EventType string `json:"eventType,required"` Locations []string `json:"locations,required"` LocationsDetails []AnnotationOutageGetResponseAnnotationsLocationsDetail `json:"locationsDetails,required"` + Origins []string `json:"origins,required"` + OriginsDetails []AnnotationOutageGetResponseAnnotationsOriginsDetail `json:"originsDetails,required"` Outage AnnotationOutageGetResponseAnnotationsOutage `json:"outage,required"` StartDate time.Time `json:"startDate,required" format:"date-time"` Description string `json:"description"` @@ -109,6 +111,8 @@ type annotationOutageGetResponseAnnotationJSON struct { EventType apijson.Field Locations apijson.Field LocationsDetails apijson.Field + Origins apijson.Field + OriginsDetails apijson.Field Outage apijson.Field StartDate apijson.Field Description apijson.Field @@ -199,6 +203,29 @@ func (r annotationOutageGetResponseAnnotationsLocationsDetailJSON) RawJSON() str return r.raw } +type AnnotationOutageGetResponseAnnotationsOriginsDetail struct { + Name string `json:"name,required"` + Origin string `json:"origin,required"` + JSON annotationOutageGetResponseAnnotationsOriginsDetailJSON `json:"-"` +} + +// annotationOutageGetResponseAnnotationsOriginsDetailJSON contains the JSON +// metadata for the struct [AnnotationOutageGetResponseAnnotationsOriginsDetail] +type annotationOutageGetResponseAnnotationsOriginsDetailJSON struct { + Name apijson.Field + Origin apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *AnnotationOutageGetResponseAnnotationsOriginsDetail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r annotationOutageGetResponseAnnotationsOriginsDetailJSON) RawJSON() string { + return r.raw +} + type AnnotationOutageGetResponseAnnotationsOutage struct { OutageCause string `json:"outageCause,required"` OutageType string `json:"outageType,required"` @@ -287,6 +314,8 @@ type AnnotationOutageGetParams struct { Location param.Field[string] `query:"location"` // Skips the specified number of objects before fetching the results. Offset param.Field[int64] `query:"offset"` + // Filters results by origin. + Origin param.Field[string] `query:"origin"` } // URLQuery serializes [AnnotationOutageGetParams]'s query parameters as diff --git a/radar/annotationoutage_test.go b/radar/annotationoutage_test.go index 1093307a161..1e3348d8de9 100644 --- a/radar/annotationoutage_test.go +++ b/radar/annotationoutage_test.go @@ -37,6 +37,7 @@ func TestAnnotationOutageGetWithOptionalParams(t *testing.T) { Limit: cloudflare.F(int64(1)), Location: cloudflare.F("US"), Offset: cloudflare.F(int64(0)), + Origin: cloudflare.F("amazon-us-east-1"), }) if err != nil { var apierr *cloudflare.Error diff --git a/radar/as112.go b/radar/as112.go index 3c561a9724c..73774aa4e93 100644 --- a/radar/as112.go +++ b/radar/as112.go @@ -165,10 +165,12 @@ func (r as112SummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112SummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -198,6 +200,65 @@ func (r as112SummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112SummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -378,10 +439,12 @@ func (r as112TimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112TimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -411,6 +474,65 @@ func (r as112TimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() strin return r.raw } +// Data source for annotations. +type AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -592,10 +714,12 @@ func (r as112TimeseriesGroupsV2ResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -626,6 +750,65 @@ func (r as112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TimeseriesGroupsV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/as112summary.go b/radar/as112summary.go index 4f8a9ae3365..e953f031f60 100644 --- a/radar/as112summary.go +++ b/radar/as112summary.go @@ -223,10 +223,12 @@ func (r as112SummaryDNSSECResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -256,6 +258,65 @@ func (r as112SummaryDNSSECResponseMetaConfidenceInfoAnnotationJSON) RawJSON() st return r.raw } +// Data source for annotations. +type AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112SummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112SummaryDNSSECResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -436,10 +497,12 @@ func (r as112SummaryEdnsResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112SummaryEdnsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -469,6 +532,65 @@ func (r as112SummaryEdnsResponseMetaConfidenceInfoAnnotationJSON) RawJSON() stri return r.raw } +// Data source for annotations. +type AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112SummaryEdnsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112SummaryEdnsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -649,10 +771,12 @@ func (r as112SummaryIPVersionResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -683,6 +807,65 @@ func (r as112SummaryIPVersionResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112SummaryIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -863,10 +1046,12 @@ func (r as112SummaryProtocolResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112SummaryProtocolResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -897,6 +1082,65 @@ func (r as112SummaryProtocolResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112SummaryProtocolResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1083,10 +1327,12 @@ func (r as112SummaryQueryTypeResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1117,6 +1363,65 @@ func (r as112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112SummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112SummaryQueryTypeResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1272,10 +1577,12 @@ func (r as112SummaryResponseCodesResponseMetaConfidenceInfoJSON) RawJSON() strin // Annotation associated with the result (e.g. outage or other type of event). type AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1306,6 +1613,65 @@ func (r as112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationJSON) RawJS return r.raw } +// Data source for annotations. +type AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112SummaryResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112SummaryResponseCodesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/as112timeseriesgroup.go b/radar/as112timeseriesgroup.go index 9232cd6cd42..8a66ad8c814 100644 --- a/radar/as112timeseriesgroup.go +++ b/radar/as112timeseriesgroup.go @@ -251,10 +251,12 @@ func (r as112TimeseriesGroupDNSSECResponseMetaConfidenceInfoJSON) RawJSON() stri // Annotation associated with the result (e.g. outage or other type of event). type AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -285,6 +287,65 @@ func (r as112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationJSON) RawJ return r.raw } +// Data source for annotations. +type AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TimeseriesGroupDNSSECResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -489,10 +550,12 @@ func (r as112TimeseriesGroupEdnsResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -523,6 +586,65 @@ func (r as112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TimeseriesGroupEdnsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TimeseriesGroupEdnsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -728,10 +850,12 @@ func (r as112TimeseriesGroupIPVersionResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -762,6 +886,65 @@ func (r as112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TimeseriesGroupIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -966,10 +1149,12 @@ func (r as112TimeseriesGroupProtocolResponseMetaConfidenceInfoJSON) RawJSON() st // Annotation associated with the result (e.g. outage or other type of event). type AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1000,6 +1185,65 @@ func (r as112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationJSON) Ra return r.raw } +// Data source for annotations. +type AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TimeseriesGroupProtocolResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1209,10 +1453,12 @@ func (r as112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1243,6 +1489,65 @@ func (r as112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TimeseriesGroupQueryTypeResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1447,10 +1752,12 @@ func (r as112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoJSON) RawJSON // Annotation associated with the result (e.g. outage or other type of event). type AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1481,6 +1788,65 @@ func (r as112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationJSO return r.raw } +// Data source for annotations. +type AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TimeseriesGroupResponseCodesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TimeseriesGroupResponseCodesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/as112top.go b/radar/as112top.go index 378c74739af..837337f53eb 100644 --- a/radar/as112top.go +++ b/radar/as112top.go @@ -174,10 +174,12 @@ func (r as112TopDNSSECResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112TopDNSSECResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -207,6 +209,65 @@ func (r as112TopDNSSECResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TopDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TopDNSSECResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -388,10 +449,12 @@ func (r as112TopEdnsResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112TopEdnsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -421,6 +484,65 @@ func (r as112TopEdnsResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { return r.raw } +// Data source for annotations. +type AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TopEdnsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TopEdnsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -602,10 +724,12 @@ func (r as112TopIPVersionResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112TopIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -635,6 +759,65 @@ func (r as112TopIPVersionResponseMetaConfidenceInfoAnnotationJSON) RawJSON() str return r.raw } +// Data source for annotations. +type AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TopIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TopIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -816,10 +999,12 @@ func (r as112TopLocationsResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AS112TopLocationsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -849,6 +1034,65 @@ func (r as112TopLocationsResponseMetaConfidenceInfoAnnotationJSON) RawJSON() str return r.raw } +// Data source for annotations. +type AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAll AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBGP AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBots AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceCt AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNS AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDos AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFw AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceIQI AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceNet AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAll, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBots, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceCt, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDos, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFw, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceNet, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeEvent AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeOutage AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePipeline AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AS112TopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AS112TopLocationsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer3.go b/radar/attacklayer3.go index 1c1e2c7ac1d..77461c57d4d 100644 --- a/radar/attacklayer3.go +++ b/radar/attacklayer3.go @@ -165,10 +165,12 @@ func (r attackLayer3SummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -199,6 +201,65 @@ func (r attackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3SummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -379,10 +440,12 @@ func (r attackLayer3TimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -413,6 +476,65 @@ func (r attackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -595,10 +717,12 @@ func (r attackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -629,6 +753,65 @@ func (r attackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TimeseriesGroupsV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer3summary.go b/radar/attacklayer3summary.go index 1995c998bd1..49b1eebb74a 100644 --- a/radar/attacklayer3summary.go +++ b/radar/attacklayer3summary.go @@ -238,10 +238,12 @@ func (r attackLayer3SummaryBitrateResponseMetaConfidenceInfoJSON) RawJSON() stri // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -272,6 +274,65 @@ func (r attackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationJSON) RawJ return r.raw } +// Data source for annotations. +type AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3SummaryBitrateResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3SummaryBitrateResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -461,10 +522,12 @@ func (r attackLayer3SummaryDurationResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -495,6 +558,65 @@ func (r attackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3SummaryDurationResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3SummaryDurationResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -687,10 +809,12 @@ func (r attackLayer3SummaryIndustryResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -721,6 +845,65 @@ func (r attackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3SummaryIndustryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -876,10 +1059,12 @@ func (r attackLayer3SummaryIPVersionResponseMetaConfidenceInfoJSON) RawJSON() st // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -910,6 +1095,65 @@ func (r attackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationJSON) Ra return r.raw } +// Data source for annotations. +type AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3SummaryIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1090,10 +1334,12 @@ func (r attackLayer3SummaryProtocolResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1124,6 +1370,65 @@ func (r attackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3SummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3SummaryProtocolResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1310,10 +1615,12 @@ func (r attackLayer3SummaryVectorResponseMetaConfidenceInfoJSON) RawJSON() strin // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1344,6 +1651,65 @@ func (r attackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationJSON) RawJS return r.raw } +// Data source for annotations. +type AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3SummaryVectorResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3SummaryVectorResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1499,10 +1865,12 @@ func (r attackLayer3SummaryVerticalResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1533,6 +1901,65 @@ func (r attackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3SummaryVerticalResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer3timeseriesgroup.go b/radar/attacklayer3timeseriesgroup.go index 634470edf44..975f4a78110 100644 --- a/radar/attacklayer3timeseriesgroup.go +++ b/radar/attacklayer3timeseriesgroup.go @@ -265,10 +265,12 @@ func (r attackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoJSON) RawJSO // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -299,6 +301,65 @@ func (r attackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationJS return r.raw } +// Data source for annotations. +type AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TimeseriesGroupBitrateResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TimeseriesGroupBitrateResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -513,10 +574,12 @@ func (r attackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoJSON) RawJS // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -547,6 +610,65 @@ func (r attackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationJ return r.raw } +// Data source for annotations. +type AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TimeseriesGroupDurationResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TimeseriesGroupDurationResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -763,10 +885,12 @@ func (r attackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoJSON) RawJS // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -797,6 +921,65 @@ func (r attackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationJ return r.raw } +// Data source for annotations. +type AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TimeseriesGroupIndustryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1002,10 +1185,12 @@ func (r attackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoJSON) RawJ // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1036,6 +1221,65 @@ func (r attackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation return r.raw } +// Data source for annotations. +type AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TimeseriesGroupIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1244,10 +1488,12 @@ func (r attackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoJSON) RawJS // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1278,6 +1524,65 @@ func (r attackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationJ return r.raw } +// Data source for annotations. +type AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TimeseriesGroupProtocolResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1490,10 +1795,12 @@ func (r attackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoJSON) RawJSON // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1524,6 +1831,65 @@ func (r attackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationJSO return r.raw } +// Data source for annotations. +type AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TimeseriesGroupVectorResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TimeseriesGroupVectorResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1728,10 +2094,12 @@ func (r attackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoJSON) RawJS // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1762,6 +2130,65 @@ func (r attackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationJ return r.raw } +// Data source for annotations. +type AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TimeseriesGroupVerticalResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer3top.go b/radar/attacklayer3top.go index dc89fe38b34..c9db2d26b83 100644 --- a/radar/attacklayer3top.go +++ b/radar/attacklayer3top.go @@ -173,10 +173,12 @@ func (r attackLayer3TopAttacksResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -207,6 +209,65 @@ func (r attackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TopAttacksResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -387,10 +448,12 @@ func (r attackLayer3TopIndustryResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -421,6 +484,65 @@ func (r attackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TopIndustryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -599,10 +721,12 @@ func (r attackLayer3TopVerticalResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -633,6 +757,65 @@ func (r attackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TopVerticalResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer3toplocation.go b/radar/attacklayer3toplocation.go index 089cebb4a50..9027a235161 100644 --- a/radar/attacklayer3toplocation.go +++ b/radar/attacklayer3toplocation.go @@ -146,10 +146,12 @@ func (r attackLayer3TopLocationOriginResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -180,6 +182,65 @@ func (r attackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TopLocationOriginResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -363,10 +424,12 @@ func (r attackLayer3TopLocationTargetResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -397,6 +460,65 @@ func (r attackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer3TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer3TopLocationTargetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer7.go b/radar/attacklayer7.go index 0381b64b2bd..47a340871aa 100644 --- a/radar/attacklayer7.go +++ b/radar/attacklayer7.go @@ -165,10 +165,12 @@ func (r attackLayer7SummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -199,6 +201,65 @@ func (r attackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7SummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7SummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -380,10 +441,12 @@ func (r attackLayer7TimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -414,6 +477,65 @@ func (r attackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -619,10 +741,12 @@ func (r attackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -653,6 +777,65 @@ func (r attackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TimeseriesGroupsV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer7summary.go b/radar/attacklayer7summary.go index a40f6c78926..a0aaecaddef 100644 --- a/radar/attacklayer7summary.go +++ b/radar/attacklayer7summary.go @@ -239,10 +239,12 @@ func (r attackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -273,6 +275,65 @@ func (r attackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7SummaryHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7SummaryHTTPMethodResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -429,10 +490,12 @@ func (r attackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -463,6 +526,65 @@ func (r attackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7SummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7SummaryHTTPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -643,10 +765,12 @@ func (r attackLayer7SummaryIndustryResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -677,6 +801,65 @@ func (r attackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7SummaryIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7SummaryIndustryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -832,10 +1015,12 @@ func (r attackLayer7SummaryIPVersionResponseMetaConfidenceInfoJSON) RawJSON() st // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -866,6 +1051,65 @@ func (r attackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationJSON) Ra return r.raw } +// Data source for annotations. +type AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7SummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7SummaryIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1045,10 +1289,12 @@ func (r attackLayer7SummaryManagedRulesResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1079,6 +1325,65 @@ func (r attackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7SummaryManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7SummaryManagedRulesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1235,10 +1540,12 @@ func (r attackLayer7SummaryMitigationProductResponseMetaConfidenceInfoJSON) RawJ // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1269,6 +1576,65 @@ func (r attackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotation return r.raw } +// Data source for annotations. +type AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7SummaryMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7SummaryMitigationProductResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1425,10 +1791,12 @@ func (r attackLayer7SummaryVerticalResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1459,6 +1827,65 @@ func (r attackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7SummaryVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7SummaryVerticalResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer7timeseriesgroup.go b/radar/attacklayer7timeseriesgroup.go index 02dc12699f0..284bac7a6f2 100644 --- a/radar/attacklayer7timeseriesgroup.go +++ b/radar/attacklayer7timeseriesgroup.go @@ -265,10 +265,12 @@ func (r attackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoJSON) Raw // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -299,6 +301,65 @@ func (r attackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotatio return r.raw } +// Data source for annotations. +type AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TimeseriesGroupHTTPMethodResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TimeseriesGroupHTTPMethodResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -504,10 +565,12 @@ func (r attackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoJSON) Ra // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -538,6 +601,65 @@ func (r attackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotati return r.raw } +// Data source for annotations. +type AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TimeseriesGroupHTTPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -748,10 +870,12 @@ func (r attackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoJSON) RawJS // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -782,6 +906,65 @@ func (r attackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationJ return r.raw } +// Data source for annotations. +type AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TimeseriesGroupIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TimeseriesGroupIndustryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -987,10 +1170,12 @@ func (r attackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoJSON) RawJ // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1021,6 +1206,65 @@ func (r attackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation return r.raw } +// Data source for annotations. +type AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TimeseriesGroupIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1229,10 +1473,12 @@ func (r attackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoJSON) R // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1263,6 +1509,65 @@ func (r attackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotat return r.raw } +// Data source for annotations. +type AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TimeseriesGroupManagedRulesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TimeseriesGroupManagedRulesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1470,10 +1775,12 @@ func (r attackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoJS // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1504,6 +1811,65 @@ func (r attackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAn return r.raw } +// Data source for annotations. +type AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TimeseriesGroupMitigationProductResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TimeseriesGroupMitigationProductResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1711,10 +2077,12 @@ func (r attackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoJSON) RawJS // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1745,6 +2113,65 @@ func (r attackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationJ return r.raw } +// Data source for annotations. +type AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TimeseriesGroupVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TimeseriesGroupVerticalResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer7top.go b/radar/attacklayer7top.go index 10c44d2a84c..37d359dd14d 100644 --- a/radar/attacklayer7top.go +++ b/radar/attacklayer7top.go @@ -176,10 +176,12 @@ func (r attackLayer7TopAttacksResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -210,6 +212,65 @@ func (r attackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TopAttacksResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TopAttacksResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -394,10 +455,12 @@ func (r attackLayer7TopIndustryResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -428,6 +491,65 @@ func (r attackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TopIndustryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TopIndustryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -606,10 +728,12 @@ func (r attackLayer7TopVerticalResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -640,6 +764,65 @@ func (r attackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TopVerticalResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TopVerticalResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer7topase.go b/radar/attacklayer7topase.go index 6b0c44a4e43..c26cd02426a 100644 --- a/radar/attacklayer7topase.go +++ b/radar/attacklayer7topase.go @@ -134,10 +134,12 @@ func (r attackLayer7TopAseOriginResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r attackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TopAseOriginResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TopAseOriginResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/attacklayer7toplocation.go b/radar/attacklayer7toplocation.go index 1452fdbb066..67e417928f7 100644 --- a/radar/attacklayer7toplocation.go +++ b/radar/attacklayer7toplocation.go @@ -150,10 +150,12 @@ func (r attackLayer7TopLocationOriginResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -184,6 +186,65 @@ func (r attackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TopLocationOriginResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TopLocationOriginResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -367,10 +428,12 @@ func (r attackLayer7TopLocationTargetResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -401,6 +464,65 @@ func (r attackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAll AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBGP AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBots AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceCt AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNS AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDos AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFw AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceIQI AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceNet AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAll, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceBots, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceCt, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceDos, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFw, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceNet, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeEvent AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeOutage AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePipeline AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, AttackLayer7TopLocationTargetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type AttackLayer7TopLocationTargetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/bgp.go b/radar/bgp.go index 70a0c741ace..1c86259a07c 100644 --- a/radar/bgp.go +++ b/radar/bgp.go @@ -152,10 +152,12 @@ func (r bgpTimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type BGPTimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -185,6 +187,65 @@ func (r bgpTimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, BGPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type BGPTimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/bgpip.go b/radar/bgpip.go index 6c8422fd542..ce565ecf35a 100644 --- a/radar/bgpip.go +++ b/radar/bgpip.go @@ -161,10 +161,12 @@ func (r bgpipTimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type BgpipTimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -194,6 +196,65 @@ func (r bgpipTimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() strin return r.raw } +// Data source for annotations. +type BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, BgpipTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type BgpipTimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/bot.go b/radar/bot.go index 441d2723810..0a44a1dded5 100644 --- a/radar/bot.go +++ b/radar/bot.go @@ -317,10 +317,12 @@ func (r botSummaryResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type BotSummaryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType BotSummaryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -350,6 +352,65 @@ func (r botSummaryResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { return r.raw } +// Data source for annotations. +type BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r BotSummaryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, BotSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type BotSummaryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r BotSummaryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, BotSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type BotSummaryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -530,10 +591,12 @@ func (r botTimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type BotTimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -563,6 +626,65 @@ func (r botTimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, BotTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, BotTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type BotTimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -744,10 +866,12 @@ func (r botTimeseriesGroupsResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -778,6 +902,65 @@ func (r botTimeseriesGroupsResponseMetaConfidenceInfoAnnotationJSON) RawJSON() s return r.raw } +// Data source for annotations. +type BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, BotTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type BotTimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/botwebcrawler.go b/radar/botwebcrawler.go index d6af9d03e42..7988adf55dc 100644 --- a/radar/botwebcrawler.go +++ b/radar/botwebcrawler.go @@ -148,10 +148,12 @@ func (r botWebCrawlerSummaryResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -182,6 +184,65 @@ func (r botWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, BotWebCrawlerSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type BotWebCrawlerSummaryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -364,10 +425,12 @@ func (r botWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -398,6 +461,65 @@ func (r botWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, BotWebCrawlerTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type BotWebCrawlerTimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/ct.go b/radar/ct.go index 76a18b47874..a5b8e5ded15 100644 --- a/radar/ct.go +++ b/radar/ct.go @@ -167,10 +167,12 @@ func (r ctSummaryResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type CtSummaryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType CtSummaryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -200,6 +202,65 @@ func (r ctSummaryResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { return r.raw } +// Data source for annotations. +type CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r CtSummaryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, CtSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type CtSummaryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent CtSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral CtSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage CtSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection CtSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline CtSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly CtSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r CtSummaryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, CtSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type CtSummaryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -457,10 +518,12 @@ func (r ctTimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type CtTimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -490,6 +553,65 @@ func (r ctTimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { return r.raw } +// Data source for annotations. +type CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, CtTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, CtTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type CtTimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -671,10 +793,12 @@ func (r ctTimeseriesGroupsResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -704,6 +828,65 @@ func (r ctTimeseriesGroupsResponseMetaConfidenceInfoAnnotationJSON) RawJSON() st return r.raw } +// Data source for annotations. +type CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, CtTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type CtTimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/dns.go b/radar/dns.go index ba0401a0a55..395f2c23f4a 100644 --- a/radar/dns.go +++ b/radar/dns.go @@ -165,10 +165,12 @@ func (r dnsSummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -198,6 +200,65 @@ func (r dnsSummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { return r.raw } +// Data source for annotations. +type DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -378,10 +439,12 @@ func (r dnsTimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -411,6 +474,65 @@ func (r dnsTimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -592,10 +714,12 @@ func (r dnsTimeseriesGroupsV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -626,6 +750,65 @@ func (r dnsTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupsV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/dnssummary.go b/radar/dnssummary.go index 8e38881ed31..19a76359c98 100644 --- a/radar/dnssummary.go +++ b/radar/dnssummary.go @@ -292,10 +292,12 @@ func (r dnsSummaryCacheHitResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -325,6 +327,65 @@ func (r dnsSummaryCacheHitResponseMetaConfidenceInfoAnnotationJSON) RawJSON() st return r.raw } +// Data source for annotations. +type DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryCacheHitResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -505,10 +566,12 @@ func (r dnsSummaryDNSSECResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -538,6 +601,65 @@ func (r dnsSummaryDNSSECResponseMetaConfidenceInfoAnnotationJSON) RawJSON() stri return r.raw } +// Data source for annotations. +type DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryDNSSECResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -724,10 +846,12 @@ func (r dnsSummaryDNSSECAwareResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -758,6 +882,65 @@ func (r dnsSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryDNSSECAwareResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -938,10 +1121,12 @@ func (r dnsSummaryDnssece2EResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -972,6 +1157,65 @@ func (r dnsSummaryDnssece2EResponseMetaConfidenceInfoAnnotationJSON) RawJSON() s return r.raw } +// Data source for annotations. +type DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryDnssece2EResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1152,10 +1396,12 @@ func (r dnsSummaryIPVersionResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1186,6 +1432,65 @@ func (r dnsSummaryIPVersionResponseMetaConfidenceInfoAnnotationJSON) RawJSON() s return r.raw } +// Data source for annotations. +type DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1366,10 +1671,12 @@ func (r dnsSummaryMatchingAnswerResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1400,6 +1707,65 @@ func (r dnsSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryMatchingAnswerResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1580,10 +1946,12 @@ func (r dnsSummaryProtocolResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryProtocolResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1613,6 +1981,65 @@ func (r dnsSummaryProtocolResponseMetaConfidenceInfoAnnotationJSON) RawJSON() st return r.raw } +// Data source for annotations. +type DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryProtocolResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1799,10 +2226,12 @@ func (r dnsSummaryQueryTypeResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1833,6 +2262,65 @@ func (r dnsSummaryQueryTypeResponseMetaConfidenceInfoAnnotationJSON) RawJSON() s return r.raw } +// Data source for annotations. +type DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryQueryTypeResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1988,10 +2476,12 @@ func (r dnsSummaryResponseCodeResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -2022,6 +2512,65 @@ func (r dnsSummaryResponseCodeResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryResponseCodeResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -2177,10 +2726,12 @@ func (r dnsSummaryResponseTTLResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -2211,6 +2762,65 @@ func (r dnsSummaryResponseTTLResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSSummaryResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSSummaryResponseTTLResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/dnstimeseriesgroup.go b/radar/dnstimeseriesgroup.go index b6e3cd11e8f..2cb50eb97aa 100644 --- a/radar/dnstimeseriesgroup.go +++ b/radar/dnstimeseriesgroup.go @@ -318,10 +318,12 @@ func (r dnsTimeseriesGroupCacheHitResponseMetaConfidenceInfoJSON) RawJSON() stri // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -352,6 +354,65 @@ func (r dnsTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationJSON) RawJ return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupCacheHitResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupCacheHitResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -556,10 +617,12 @@ func (r dnsTimeseriesGroupDNSSECResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -590,6 +653,65 @@ func (r dnsTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupDNSSECResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupDNSSECResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -799,10 +921,12 @@ func (r dnsTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -833,6 +957,65 @@ func (r dnsTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupDNSSECAwareResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupDNSSECAwareResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1037,10 +1220,12 @@ func (r dnsTimeseriesGroupDnssece2EResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1071,6 +1256,65 @@ func (r dnsTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupDnssece2EResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupDnssece2EResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1275,10 +1519,12 @@ func (r dnsTimeseriesGroupIPVersionResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1309,6 +1555,65 @@ func (r dnsTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1514,10 +1819,12 @@ func (r dnsTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoJSON) RawJSON( // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1548,6 +1855,65 @@ func (r dnsTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationJSON return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupMatchingAnswerResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupMatchingAnswerResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1752,10 +2118,12 @@ func (r dnsTimeseriesGroupProtocolResponseMetaConfidenceInfoJSON) RawJSON() stri // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1786,6 +2154,65 @@ func (r dnsTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationJSON) RawJ return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupProtocolResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1994,10 +2421,12 @@ func (r dnsTimeseriesGroupQueryTypeResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -2028,6 +2457,65 @@ func (r dnsTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupQueryTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupQueryTypeResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -2232,10 +2720,12 @@ func (r dnsTimeseriesGroupResponseCodeResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -2266,6 +2756,65 @@ func (r dnsTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupResponseCodeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupResponseCodeResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -2470,10 +3019,12 @@ func (r dnsTimeseriesGroupResponseTTLResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -2504,6 +3055,65 @@ func (r dnsTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTimeseriesGroupResponseTTLResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTimeseriesGroupResponseTTLResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/dnstop.go b/radar/dnstop.go index b4445ce8ad9..362a46e3b70 100644 --- a/radar/dnstop.go +++ b/radar/dnstop.go @@ -146,10 +146,12 @@ func (r dnsTopAsesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSTopAsesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -179,6 +181,65 @@ func (r dnsTopAsesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { return r.raw } +// Data source for annotations. +type DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTopAsesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -360,10 +421,12 @@ func (r dnsTopLocationsResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type DNSTopLocationsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -393,6 +456,65 @@ func (r dnsTopLocationsResponseMetaConfidenceInfoAnnotationJSON) RawJSON() strin return r.raw } +// Data source for annotations. +type DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAll DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBGP DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBots DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceCt DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNS DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDos DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFw DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceIQI DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceNet DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAll, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBots, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceCt, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDos, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFw, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceNet, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeEvent DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeOutage DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePipeline DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, DNSTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type DNSTopLocationsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailrouting.go b/radar/emailrouting.go index 9a3b6f41d53..f514ee08660 100644 --- a/radar/emailrouting.go +++ b/radar/emailrouting.go @@ -151,10 +151,12 @@ func (r emailRoutingSummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -185,6 +187,65 @@ func (r emailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingSummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -367,10 +428,12 @@ func (r emailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -401,6 +464,65 @@ func (r emailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingTimeseriesGroupsV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailroutingsummary.go b/radar/emailroutingsummary.go index e11c98188d7..622919485f5 100644 --- a/radar/emailroutingsummary.go +++ b/radar/emailroutingsummary.go @@ -226,10 +226,12 @@ func (r emailRoutingSummaryARCResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -260,6 +262,65 @@ func (r emailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingSummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingSummaryARCResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -415,10 +476,12 @@ func (r emailRoutingSummaryDKIMResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -449,6 +512,65 @@ func (r emailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingSummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingSummaryDKIMResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -604,10 +726,12 @@ func (r emailRoutingSummaryDMARCResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -638,6 +762,65 @@ func (r emailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingSummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingSummaryDMARCResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -793,10 +976,12 @@ func (r emailRoutingSummaryEncryptedResponseMetaConfidenceInfoJSON) RawJSON() st // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -827,6 +1012,65 @@ func (r emailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationJSON) Ra return r.raw } +// Data source for annotations. +type EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingSummaryEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingSummaryEncryptedResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1007,10 +1251,12 @@ func (r emailRoutingSummaryIPVersionResponseMetaConfidenceInfoJSON) RawJSON() st // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1041,6 +1287,65 @@ func (r emailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationJSON) Ra return r.raw } +// Data source for annotations. +type EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingSummaryIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1221,10 +1526,12 @@ func (r emailRoutingSummarySPFResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1255,6 +1562,65 @@ func (r emailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingSummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingSummarySPFResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailroutingtimeseriesgroup.go b/radar/emailroutingtimeseriesgroup.go index 6776c075350..bbbe4da99e8 100644 --- a/radar/emailroutingtimeseriesgroup.go +++ b/radar/emailroutingtimeseriesgroup.go @@ -253,10 +253,12 @@ func (r emailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -287,6 +289,65 @@ func (r emailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingTimeseriesGroupARCResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -469,10 +530,12 @@ func (r emailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -503,6 +566,65 @@ func (r emailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingTimeseriesGroupDKIMResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -685,10 +807,12 @@ func (r emailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoJSON) RawJSON( // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -719,6 +843,65 @@ func (r emailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationJSON return r.raw } +// Data source for annotations. +type EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingTimeseriesGroupDMARCResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -901,10 +1084,12 @@ func (r emailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoJSON) RawJ // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -935,6 +1120,65 @@ func (r emailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotation return r.raw } +// Data source for annotations. +type EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingTimeseriesGroupEncryptedResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingTimeseriesGroupEncryptedResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1141,10 +1385,12 @@ func (r emailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoJSON) RawJ // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1175,6 +1421,65 @@ func (r emailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation return r.raw } +// Data source for annotations. +type EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingTimeseriesGroupIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1381,10 +1686,12 @@ func (r emailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1415,6 +1722,65 @@ func (r emailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailRoutingTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailRoutingTimeseriesGroupSPFResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailsecurity.go b/radar/emailsecurity.go index 09f72bd3f29..05043549787 100644 --- a/radar/emailsecurity.go +++ b/radar/emailsecurity.go @@ -153,10 +153,12 @@ func (r emailSecuritySummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -187,6 +189,65 @@ func (r emailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -369,10 +430,12 @@ func (r emailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -403,6 +466,65 @@ func (r emailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupsV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailsecuritysummary.go b/radar/emailsecuritysummary.go index 2f83c064255..3fe9cf88c41 100644 --- a/radar/emailsecuritysummary.go +++ b/radar/emailsecuritysummary.go @@ -277,10 +277,12 @@ func (r emailSecuritySummaryARCResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -311,6 +313,65 @@ func (r emailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummaryARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummaryARCResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -466,10 +527,12 @@ func (r emailSecuritySummaryDKIMResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -500,6 +563,65 @@ func (r emailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummaryDKIMResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummaryDKIMResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -655,10 +777,12 @@ func (r emailSecuritySummaryDMARCResponseMetaConfidenceInfoJSON) RawJSON() strin // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -689,6 +813,65 @@ func (r emailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationJSON) RawJS return r.raw } +// Data source for annotations. +type EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummaryDMARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummaryDMARCResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -845,10 +1028,12 @@ func (r emailSecuritySummaryMaliciousResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -879,6 +1064,65 @@ func (r emailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummaryMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummaryMaliciousResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1059,10 +1303,12 @@ func (r emailSecuritySummarySpamResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1093,6 +1339,65 @@ func (r emailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummarySpamResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummarySpamResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1273,10 +1578,12 @@ func (r emailSecuritySummarySPFResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1307,6 +1614,65 @@ func (r emailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummarySPFResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummarySPFResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1462,10 +1828,12 @@ func (r emailSecuritySummarySpoofResponseMetaConfidenceInfoJSON) RawJSON() strin // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1496,6 +1864,65 @@ func (r emailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationJSON) RawJS return r.raw } +// Data source for annotations. +type EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummarySpoofResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummarySpoofResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1677,10 +2104,12 @@ func (r emailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoJSON) RawJSO // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1711,6 +2140,65 @@ func (r emailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationJS return r.raw } +// Data source for annotations. +type EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummaryThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummaryThreatCategoryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1899,10 +2387,12 @@ func (r emailSecuritySummaryTLSVersionResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1933,6 +2423,65 @@ func (r emailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecuritySummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecuritySummaryTLSVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailsecuritytimeseriesgroup.go b/radar/emailsecuritytimeseriesgroup.go index 62546665673..0ba9e04100a 100644 --- a/radar/emailsecuritytimeseriesgroup.go +++ b/radar/emailsecuritytimeseriesgroup.go @@ -305,10 +305,12 @@ func (r emailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -339,6 +341,65 @@ func (r emailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupARCResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -521,10 +582,12 @@ func (r emailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoJSON) RawJSON( // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -555,6 +618,65 @@ func (r emailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationJSON return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupDKIMResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupDKIMResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -737,10 +859,12 @@ func (r emailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoJSON) RawJSON // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -771,6 +895,65 @@ func (r emailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationJSO return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupDMARCResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupDMARCResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -953,10 +1136,12 @@ func (r emailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoJSON) Raw // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -987,6 +1172,65 @@ func (r emailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotatio return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupMaliciousResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupMaliciousResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1193,10 +1437,12 @@ func (r emailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoJSON) RawJSON( // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1227,6 +1473,65 @@ func (r emailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationJSON return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupSpamResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupSpamResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1432,10 +1737,12 @@ func (r emailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1466,6 +1773,65 @@ func (r emailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupSPFResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupSPFResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1648,10 +2014,12 @@ func (r emailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoJSON) RawJSON // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1682,6 +2050,65 @@ func (r emailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationJSO return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupSpoofResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupSpoofResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1887,10 +2314,12 @@ func (r emailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoJSON // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1921,6 +2350,65 @@ func (r emailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnno return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupThreatCategoryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupThreatCategoryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -2133,10 +2621,12 @@ func (r emailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoJSON) Ra // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -2167,6 +2657,65 @@ func (r emailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotati return r.raw } +// Data source for annotations. +type EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTimeseriesGroupTLSVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailsecuritytoptld.go b/radar/emailsecuritytoptld.go index a6726fef105..ab3475d7026 100644 --- a/radar/emailsecuritytoptld.go +++ b/radar/emailsecuritytoptld.go @@ -138,10 +138,12 @@ func (r emailSecurityTopTldGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -172,6 +174,65 @@ func (r emailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTopTldGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTopTldGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailsecuritytoptldmalicious.go b/radar/emailsecuritytoptldmalicious.go index bfe0e489b38..66c2d41c45e 100644 --- a/radar/emailsecuritytoptldmalicious.go +++ b/radar/emailsecuritytoptldmalicious.go @@ -134,10 +134,12 @@ func (r emailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r emailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTopTldMaliciousGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTopTldMaliciousGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailsecuritytoptldspam.go b/radar/emailsecuritytoptldspam.go index d7f2bcd8630..0441c0c0a4d 100644 --- a/radar/emailsecuritytoptldspam.go +++ b/radar/emailsecuritytoptldspam.go @@ -133,10 +133,12 @@ func (r emailSecurityTopTldSpamGetResponseMetaConfidenceInfoJSON) RawJSON() stri // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r emailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationJSON) RawJ return r.raw } +// Data source for annotations. +type EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTopTldSpamGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTopTldSpamGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/emailsecuritytoptldspoof.go b/radar/emailsecuritytoptldspoof.go index c6741f45af3..7405f96ac30 100644 --- a/radar/emailsecuritytoptldspoof.go +++ b/radar/emailsecuritytoptldspoof.go @@ -133,10 +133,12 @@ func (r emailSecurityTopTldSpoofGetResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r emailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceAll EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceBots EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceCt EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceDos EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceFw EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceNet EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, EmailSecurityTopTldSpoofGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type EmailSecurityTopTldSpoofGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/http.go b/radar/http.go index f2995ccbf9a..6ef75dc3c6e 100644 --- a/radar/http.go +++ b/radar/http.go @@ -169,10 +169,12 @@ func (r httpSummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPSummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -202,6 +204,65 @@ func (r httpSummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPSummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -382,10 +443,12 @@ func (r httpTimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -415,6 +478,65 @@ func (r httpTimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -596,10 +718,12 @@ func (r httpTimeseriesGroupsV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -630,6 +754,65 @@ func (r httpTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupsV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpase.go b/radar/httpase.go index 2d485b823b5..82efbfa0231 100644 --- a/radar/httpase.go +++ b/radar/httpase.go @@ -148,10 +148,12 @@ func (r httpAseGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPAseGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -181,6 +183,65 @@ func (r httpAseGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { return r.raw } +// Data source for annotations. +type HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPAseGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPAseGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPAseGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpasebotclass.go b/radar/httpasebotclass.go index 20d9feba8a4..f002ba6798e 100644 --- a/radar/httpasebotclass.go +++ b/radar/httpasebotclass.go @@ -134,10 +134,12 @@ func (r httpAseBotClassGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r httpAseBotClassGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON() st return r.raw } +// Data source for annotations. +type HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPAseBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPAseBotClassGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpasebrowserfamily.go b/radar/httpasebrowserfamily.go index 2a996d4b833..cc56b99190c 100644 --- a/radar/httpasebrowserfamily.go +++ b/radar/httpasebrowserfamily.go @@ -134,10 +134,12 @@ func (r httpAseBrowserFamilyGetResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r httpAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPAseBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPAseBrowserFamilyGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpasedevicetype.go b/radar/httpasedevicetype.go index 455c26d0877..952c7835f6b 100644 --- a/radar/httpasedevicetype.go +++ b/radar/httpasedevicetype.go @@ -134,10 +134,12 @@ func (r httpAseDeviceTypeGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r httpAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPAseDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPAseDeviceTypeGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpasehttpmethod.go b/radar/httpasehttpmethod.go index ad6b71741c2..af8d0f3b75a 100644 --- a/radar/httpasehttpmethod.go +++ b/radar/httpasehttpmethod.go @@ -134,10 +134,12 @@ func (r httpAseHTTPMethodGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r httpAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPAseHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPAseHTTPMethodGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpasehttpprotocol.go b/radar/httpasehttpprotocol.go index e0ab5f6f5a0..f55f6230083 100644 --- a/radar/httpasehttpprotocol.go +++ b/radar/httpasehttpprotocol.go @@ -134,10 +134,12 @@ func (r httpAseHTTPProtocolGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r httpAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPAseHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPAseHTTPProtocolGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpaseipversion.go b/radar/httpaseipversion.go index 6b51c14b4da..bc571d60272 100644 --- a/radar/httpaseipversion.go +++ b/radar/httpaseipversion.go @@ -134,10 +134,12 @@ func (r httpAseIPVersionGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r httpAseIPVersionGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON() s return r.raw } +// Data source for annotations. +type HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPAseIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPAseIPVersionGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpaseos.go b/radar/httpaseos.go index e389d9b6d8d..7c56703e04a 100644 --- a/radar/httpaseos.go +++ b/radar/httpaseos.go @@ -134,10 +134,12 @@ func (r httpAseOSGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPAseOSGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r httpAseOSGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { return r.raw } +// Data source for annotations. +type HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPAseOSGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPAseOSGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpasetlsversion.go b/radar/httpasetlsversion.go index 1e350de2e52..6234aadad98 100644 --- a/radar/httpasetlsversion.go +++ b/radar/httpasetlsversion.go @@ -134,10 +134,12 @@ func (r httpAseTLSVersionGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r httpAseTLSVersionGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPAseTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPAseTLSVersionGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httplocation.go b/radar/httplocation.go index 839b5392f38..02fcdf071eb 100644 --- a/radar/httplocation.go +++ b/radar/httplocation.go @@ -148,10 +148,12 @@ func (r httpLocationGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPLocationGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -181,6 +183,65 @@ func (r httpLocationGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON() strin return r.raw } +// Data source for annotations. +type HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPLocationGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPLocationGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httplocationbotclass.go b/radar/httplocationbotclass.go index 0db08bae595..0face76ee3a 100644 --- a/radar/httplocationbotclass.go +++ b/radar/httplocationbotclass.go @@ -133,10 +133,12 @@ func (r httpLocationBotClassGetResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r httpLocationBotClassGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPLocationBotClassGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPLocationBotClassGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httplocationbrowserfamily.go b/radar/httplocationbrowserfamily.go index 5704a8f9dea..0e4bca1cb69 100644 --- a/radar/httplocationbrowserfamily.go +++ b/radar/httplocationbrowserfamily.go @@ -133,10 +133,12 @@ func (r httpLocationBrowserFamilyGetResponseMetaConfidenceInfoJSON) RawJSON() st // Annotation associated with the result (e.g. outage or other type of event). type HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r httpLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationJSON) Ra return r.raw } +// Data source for annotations. +type HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPLocationBrowserFamilyGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPLocationBrowserFamilyGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httplocationdevicetype.go b/radar/httplocationdevicetype.go index cd2a04437cd..5c70b542c91 100644 --- a/radar/httplocationdevicetype.go +++ b/radar/httplocationdevicetype.go @@ -133,10 +133,12 @@ func (r httpLocationDeviceTypeGetResponseMetaConfidenceInfoJSON) RawJSON() strin // Annotation associated with the result (e.g. outage or other type of event). type HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r httpLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationJSON) RawJS return r.raw } +// Data source for annotations. +type HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPLocationDeviceTypeGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPLocationDeviceTypeGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httplocationhttpmethod.go b/radar/httplocationhttpmethod.go index d6277a6fb8c..ed2f90a3c95 100644 --- a/radar/httplocationhttpmethod.go +++ b/radar/httplocationhttpmethod.go @@ -133,10 +133,12 @@ func (r httpLocationHTTPMethodGetResponseMetaConfidenceInfoJSON) RawJSON() strin // Annotation associated with the result (e.g. outage or other type of event). type HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r httpLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationJSON) RawJS return r.raw } +// Data source for annotations. +type HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPLocationHTTPMethodGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPLocationHTTPMethodGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httplocationhttpprotocol.go b/radar/httplocationhttpprotocol.go index 2a7d8b9f862..3593112fec6 100644 --- a/radar/httplocationhttpprotocol.go +++ b/radar/httplocationhttpprotocol.go @@ -133,10 +133,12 @@ func (r httpLocationHTTPProtocolGetResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r httpLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPLocationHTTPProtocolGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPLocationHTTPProtocolGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httplocationipversion.go b/radar/httplocationipversion.go index cadbe0bd890..b38fc73e907 100644 --- a/radar/httplocationipversion.go +++ b/radar/httplocationipversion.go @@ -133,10 +133,12 @@ func (r httpLocationIPVersionGetResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r httpLocationIPVersionGetResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPLocationIPVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPLocationIPVersionGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httplocationos.go b/radar/httplocationos.go index 6826505e805..f11447ed396 100644 --- a/radar/httplocationos.go +++ b/radar/httplocationos.go @@ -134,10 +134,12 @@ func (r httpLocationOSGetResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPLocationOSGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r httpLocationOSGetResponseMetaConfidenceInfoAnnotationJSON) RawJSON() str return r.raw } +// Data source for annotations. +type HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPLocationOSGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPLocationOSGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httplocationtlsversion.go b/radar/httplocationtlsversion.go index 49728746955..d231b602c81 100644 --- a/radar/httplocationtlsversion.go +++ b/radar/httplocationtlsversion.go @@ -134,10 +134,12 @@ func (r httpLocationTLSVersionGetResponseMetaConfidenceInfoJSON) RawJSON() strin // Annotation associated with the result (e.g. outage or other type of event). type HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r httpLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationJSON) RawJS return r.raw } +// Data source for annotations. +type HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPLocationTLSVersionGetResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPLocationTLSVersionGetResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httpsummary.go b/radar/httpsummary.go index 16ab6fe88a9..34d85edc673 100644 --- a/radar/httpsummary.go +++ b/radar/httpsummary.go @@ -260,10 +260,12 @@ func (r httpSummaryBotClassResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -294,6 +296,65 @@ func (r httpSummaryBotClassResponseMetaConfidenceInfoAnnotationJSON) RawJSON() s return r.raw } +// Data source for annotations. +type HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPSummaryBotClassResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -474,10 +535,12 @@ func (r httpSummaryDeviceTypeResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -508,6 +571,65 @@ func (r httpSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPSummaryDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPSummaryDeviceTypeResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -691,10 +813,12 @@ func (r httpSummaryHTTPProtocolResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -725,6 +849,65 @@ func (r httpSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPSummaryHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPSummaryHTTPProtocolResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -905,10 +1088,12 @@ func (r httpSummaryHTTPVersionResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -939,6 +1124,65 @@ func (r httpSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPSummaryHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPSummaryHTTPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1122,10 +1366,12 @@ func (r httpSummaryIPVersionResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1156,6 +1402,65 @@ func (r httpSummaryIPVersionResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPSummaryIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPSummaryIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1336,10 +1641,12 @@ func (r httpSummaryOSResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPSummaryOSResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1369,6 +1676,65 @@ func (r httpSummaryOSResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPSummaryOSResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPSummaryOSResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1549,10 +1915,12 @@ func (r httpSummaryPostQuantumResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1583,6 +1951,65 @@ func (r httpSummaryPostQuantumResponseMetaConfidenceInfoAnnotationJSON) RawJSON( return r.raw } +// Data source for annotations. +type HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPSummaryPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPSummaryPostQuantumResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1763,10 +2190,12 @@ func (r httpSummaryTLSVersionResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1797,6 +2226,65 @@ func (r httpSummaryTLSVersionResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPSummaryTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPSummaryTLSVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httptimeseriesgroup.go b/radar/httptimeseriesgroup.go index 6c5de778699..7de5761c352 100644 --- a/radar/httptimeseriesgroup.go +++ b/radar/httptimeseriesgroup.go @@ -318,10 +318,12 @@ func (r httpTimeseriesGroupBotClassResponseMetaConfidenceInfoJSON) RawJSON() str // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -352,6 +354,65 @@ func (r httpTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationJSON) Raw return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupBotClassResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -558,10 +619,12 @@ func (r httpTimeseriesGroupBrowserResponseMetaConfidenceInfoJSON) RawJSON() stri // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -592,6 +655,65 @@ func (r httpTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationJSON) RawJ return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupBrowserResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupBrowserResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -796,10 +918,12 @@ func (r httpTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoJSON) RawJSON( // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -830,6 +954,65 @@ func (r httpTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationJSON return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupBrowserFamilyResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1034,10 +1217,12 @@ func (r httpTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1068,6 +1253,65 @@ func (r httpTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupDeviceTypeResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupDeviceTypeResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1277,10 +1521,12 @@ func (r httpTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1311,6 +1557,65 @@ func (r httpTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupHTTPProtocolResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupHTTPProtocolResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1518,10 +1823,12 @@ func (r httpTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1552,6 +1859,65 @@ func (r httpTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupHTTPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupHTTPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -1760,10 +2126,12 @@ func (r httpTimeseriesGroupIPVersionResponseMetaConfidenceInfoJSON) RawJSON() st // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -1794,6 +2162,65 @@ func (r httpTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationJSON) Ra return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupIPVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupIPVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -2000,10 +2427,12 @@ func (r httpTimeseriesGroupOSResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -2034,6 +2463,65 @@ func (r httpTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupOSResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupOSResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -2238,10 +2726,12 @@ func (r httpTimeseriesGroupPostQuantumResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -2272,6 +2762,65 @@ func (r httpTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupPostQuantumResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupPostQuantumResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -2479,10 +3028,12 @@ func (r httpTimeseriesGroupTLSVersionResponseMetaConfidenceInfoJSON) RawJSON() s // Annotation associated with the result (e.g. outage or other type of event). type HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -2513,6 +3064,65 @@ func (r httpTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationJSON) R return r.raw } +// Data source for annotations. +type HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTimeseriesGroupTLSVersionResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTimeseriesGroupTLSVersionResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/httptop.go b/radar/httptop.go index 42b845ced81..283df79069e 100644 --- a/radar/httptop.go +++ b/radar/httptop.go @@ -153,10 +153,12 @@ func (r httpTopBrowserResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPTopBrowserResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -186,6 +188,65 @@ func (r httpTopBrowserResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTopBrowserResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTopBrowserResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -364,10 +425,12 @@ func (r httpTopBrowserFamilyResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -398,6 +461,65 @@ func (r httpTopBrowserFamilyResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAll HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAIBots HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceBGP HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceBots HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceCt HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNS HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDos HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceFw HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceFwPg HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTP HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceIQI HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceNet HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceSpeed HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAll, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceBGP, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceBots, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceCt, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNS, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceDos, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceFw, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceIQI, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceNet, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeEvent HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeGeneral HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeOutage HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypePipeline HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeEvent, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeOutage, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypePipeline, HTTPTopBrowserFamilyResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type HTTPTopBrowserFamilyResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/leakedcredential.go b/radar/leakedcredential.go index 2112fb2f50d..e14ccb5adfd 100644 --- a/radar/leakedcredential.go +++ b/radar/leakedcredential.go @@ -152,10 +152,12 @@ func (r leakedCredentialSummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() strin // Annotation associated with the result (e.g. outage or other type of event). type LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -186,6 +188,65 @@ func (r leakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJS return r.raw } +// Data source for annotations. +type LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, LeakedCredentialSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type LeakedCredentialSummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -368,10 +429,12 @@ func (r leakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoJSON) RawJSO // Annotation associated with the result (e.g. outage or other type of event). type LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -402,6 +465,65 @@ func (r leakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationJS return r.raw } +// Data source for annotations. +type LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, LeakedCredentialTimeseriesGroupsV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type LeakedCredentialTimeseriesGroupsV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/leakedcredentialsummary.go b/radar/leakedcredentialsummary.go index 4b5776a8604..5f0fe28bc4f 100644 --- a/radar/leakedcredentialsummary.go +++ b/radar/leakedcredentialsummary.go @@ -155,10 +155,12 @@ func (r leakedCredentialSummaryBotClassResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -189,6 +191,65 @@ func (r leakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAll LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIBots LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBGP LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBots LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceCt LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNS LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDos LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFw LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFwPg LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTP LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceIQI LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceNet LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceSpeed LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAll, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBGP, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBots, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceCt, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNS, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDos, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFw, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceIQI, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceNet, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeEvent LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeGeneral LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeOutage LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePipeline LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeEvent, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeOutage, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypePipeline, LeakedCredentialSummaryBotClassResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type LeakedCredentialSummaryBotClassResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -370,10 +431,12 @@ func (r leakedCredentialSummaryCompromisedResponseMetaConfidenceInfoJSON) RawJSO // Annotation associated with the result (e.g. outage or other type of event). type LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -404,6 +467,65 @@ func (r leakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationJS return r.raw } +// Data source for annotations. +type LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAll LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAIBots LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceBGP LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceBots LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceCt LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNS LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDos LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceFw LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceFwPg LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTP LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceIQI LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceNet LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceSpeed LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAll, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceBGP, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceBots, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceCt, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNS, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDos, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceFw, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceIQI, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceNet, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeEvent LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeGeneral LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeOutage LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypePipeline LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeEvent, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeOutage, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypePipeline, LeakedCredentialSummaryCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type LeakedCredentialSummaryCompromisedResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/leakedcredentialtimeseriesgroup.go b/radar/leakedcredentialtimeseriesgroup.go index 03126d3f5df..c7a2ce1a2cb 100644 --- a/radar/leakedcredentialtimeseriesgroup.go +++ b/radar/leakedcredentialtimeseriesgroup.go @@ -182,10 +182,12 @@ func (r leakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoJSON) R // Annotation associated with the result (e.g. outage or other type of event). type LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -216,6 +218,65 @@ func (r leakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotat return r.raw } +// Data source for annotations. +type LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAll LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIBots LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBGP LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBots LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceCt LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNS LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDos LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFw LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFwPg LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTP LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceIQI LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceNet LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceSpeed LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAll, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBGP, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceBots, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceCt, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNS, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceDos, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFw, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceIQI, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceNet, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeEvent LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeGeneral LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeOutage LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypePipeline LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeEvent, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeOutage, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypePipeline, LeakedCredentialTimeseriesGroupBotClassResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type LeakedCredentialTimeseriesGroupBotClassResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -425,10 +486,12 @@ func (r leakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoJSON // Annotation associated with the result (e.g. outage or other type of event). type LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -459,6 +522,65 @@ func (r leakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnno return r.raw } +// Data source for annotations. +type LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAll LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAIBots LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceBGP LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceBots LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceCt LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNS LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDos LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceFw LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceFwPg LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTP LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceIQI LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceNet LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceSpeed LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAll, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceBGP, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceBots, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceCt, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNS, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceDos, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceFw, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceIQI, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceNet, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeEvent LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeGeneral LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeOutage LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypePipeline LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeEvent, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeOutage, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypePipeline, LeakedCredentialTimeseriesGroupCompromisedResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type LeakedCredentialTimeseriesGroupCompromisedResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/netflow.go b/radar/netflow.go index d705c8d2741..9feb88befdd 100644 --- a/radar/netflow.go +++ b/radar/netflow.go @@ -181,10 +181,12 @@ func (r netflowSummaryResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type NetflowSummaryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -214,6 +216,65 @@ func (r netflowSummaryResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, NetflowSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, NetflowSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type NetflowSummaryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -394,10 +455,12 @@ func (r netflowSummaryV2ResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type NetflowSummaryV2ResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -427,6 +490,65 @@ func (r netflowSummaryV2ResponseMetaConfidenceInfoAnnotationJSON) RawJSON() stri return r.raw } +// Data source for annotations. +type NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAll, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBGP, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceBots, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceCt, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNS, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceDos, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFw, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceIQI, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceNet, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeEvent, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeOutage, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypePipeline, NetflowSummaryV2ResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type NetflowSummaryV2ResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -608,10 +730,12 @@ func (r netflowTimeseriesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type NetflowTimeseriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -641,6 +765,65 @@ func (r netflowTimeseriesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() str return r.raw } +// Data source for annotations. +type NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, NetflowTimeseriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type NetflowTimeseriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -845,10 +1028,12 @@ func (r netflowTimeseriesGroupsResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -879,6 +1064,65 @@ func (r netflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, NetflowTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type NetflowTimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/netflowtop.go b/radar/netflowtop.go index d316d96cff8..a60f9fa6737 100644 --- a/radar/netflowtop.go +++ b/radar/netflowtop.go @@ -145,10 +145,12 @@ func (r netflowTopAsesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type NetflowTopAsesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -178,6 +180,65 @@ func (r netflowTopAsesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string return r.raw } +// Data source for annotations. +type NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAll NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBGP NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBots NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceCt NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNS NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDos NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFw NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceIQI NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceNet NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAll, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBots, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceCt, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDos, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFw, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceNet, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeEvent NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeOutage NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePipeline NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, NetflowTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type NetflowTopAsesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -359,10 +420,12 @@ func (r netflowTopLocationsResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type NetflowTopLocationsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -393,6 +456,65 @@ func (r netflowTopLocationsResponseMetaConfidenceInfoAnnotationJSON) RawJSON() s return r.raw } +// Data source for annotations. +type NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAll NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBGP NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBots NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceCt NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNS NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDos NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFw NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceIQI NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceNet NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAll, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBots, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceCt, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDos, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFw, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceNet, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeEvent NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeOutage NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePipeline NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, NetflowTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type NetflowTopLocationsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/qualityiqi.go b/radar/qualityiqi.go index d4f694b55ee..eaf1c28bb3a 100644 --- a/radar/qualityiqi.go +++ b/radar/qualityiqi.go @@ -147,10 +147,12 @@ func (r qualityIQISummaryResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type QualityIQISummaryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -180,6 +182,65 @@ func (r qualityIQISummaryResponseMetaConfidenceInfoAnnotationJSON) RawJSON() str return r.raw } +// Data source for annotations. +type QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, QualityIQISummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type QualityIQISummaryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -386,10 +447,12 @@ func (r qualityIQITimeseriesGroupsResponseMetaConfidenceInfoJSON) RawJSON() stri // Annotation associated with the result (e.g. outage or other type of event). type QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -420,6 +483,65 @@ func (r qualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationJSON) RawJ return r.raw } +// Data source for annotations. +type QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, QualityIQITimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type QualityIQITimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/qualityspeed.go b/radar/qualityspeed.go index 30fbcb177ab..15502f76226 100644 --- a/radar/qualityspeed.go +++ b/radar/qualityspeed.go @@ -179,10 +179,12 @@ func (r qualitySpeedHistogramResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type QualitySpeedHistogramResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -213,6 +215,65 @@ func (r qualitySpeedHistogramResponseMetaConfidenceInfoAnnotationJSON) RawJSON() return r.raw } +// Data source for annotations. +type QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceAll QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceAIBots QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceBGP QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceBots QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceCt QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceDNS QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceDos QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceFw QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceFwPg QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceHTTP QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceIQI QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceNet QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceSpeed QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceAll, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceBGP, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceBots, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceCt, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceDNS, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceDos, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceFw, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceIQI, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceNet, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypeEvent QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypeGeneral QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypeOutage QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypePipeline QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypeEvent, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypeOutage, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypePipeline, QualitySpeedHistogramResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type QualitySpeedHistogramResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -368,10 +429,12 @@ func (r qualitySpeedSummaryResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type QualitySpeedSummaryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -402,6 +465,65 @@ func (r qualitySpeedSummaryResponseMetaConfidenceInfoAnnotationJSON) RawJSON() s return r.raw } +// Data source for annotations. +type QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, QualitySpeedSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type QualitySpeedSummaryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/qualityspeedtop.go b/radar/qualityspeedtop.go index 9ed0a240cc8..a325a863737 100644 --- a/radar/qualityspeedtop.go +++ b/radar/qualityspeedtop.go @@ -147,10 +147,12 @@ func (r qualitySpeedTopAsesResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -181,6 +183,65 @@ func (r qualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationJSON) RawJSON() s return r.raw } +// Data source for annotations. +type QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAll QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBGP QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBots QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceCt QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNS QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDos QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFw QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceIQI QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceNet QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAll, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceBots, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceCt, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceDos, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFw, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceNet, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeEvent QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeOutage QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePipeline QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, QualitySpeedTopAsesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type QualitySpeedTopAsesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -375,10 +436,12 @@ func (r qualitySpeedTopLocationsResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -409,6 +472,65 @@ func (r qualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAll QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBGP QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBots QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceCt QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNS QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDos QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFw QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceIQI QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceNet QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAll, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceBots, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceCt, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceDos, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFw, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceNet, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeEvent QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeOutage QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePipeline QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, QualitySpeedTopLocationsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type QualitySpeedTopLocationsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/ranking.go b/radar/ranking.go index facafe2d1db..852b067f50a 100644 --- a/radar/ranking.go +++ b/radar/ranking.go @@ -181,10 +181,12 @@ func (r rankingTimeseriesGroupsResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -215,6 +217,65 @@ func (r rankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, RankingTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type RankingTimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -412,10 +473,12 @@ func (r rankingTopResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type RankingTopResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource RankingTopResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType RankingTopResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -445,6 +508,65 @@ func (r rankingTopResponseMetaConfidenceInfoAnnotationJSON) RawJSON() string { return r.raw } +// Data source for annotations. +type RankingTopResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceAll RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceBGP RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceBots RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceCt RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDNS RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDos RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceFw RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceIQI RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceNet RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RankingTopResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r RankingTopResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceAll, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceBGP, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceBots, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceCt, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDNS, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceDos, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceFw, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceIQI, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceNet, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, RankingTopResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type RankingTopResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeEvent RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeOutage RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + RankingTopResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + RankingTopResponseMetaConfidenceInfoAnnotationsEventTypePipeline RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RankingTopResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r RankingTopResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeEvent, RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeOutage, RankingTopResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, RankingTopResponseMetaConfidenceInfoAnnotationsEventTypePipeline, RankingTopResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type RankingTopResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/rankinginternetservice.go b/radar/rankinginternetservice.go index 07fcc932361..941f94e960f 100644 --- a/radar/rankinginternetservice.go +++ b/radar/rankinginternetservice.go @@ -230,10 +230,12 @@ func (r rankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoJSON) Ra // Annotation associated with the result (e.g. outage or other type of event). type RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -264,6 +266,65 @@ func (r rankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotati return r.raw } +// Data source for annotations. +type RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, RankingInternetServiceTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type RankingInternetServiceTimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -462,10 +523,12 @@ func (r rankingInternetServiceTopResponseMetaConfidenceInfoJSON) RawJSON() strin // Annotation associated with the result (e.g. outage or other type of event). type RankingInternetServiceTopResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -496,6 +559,65 @@ func (r rankingInternetServiceTopResponseMetaConfidenceInfoAnnotationJSON) RawJS return r.raw } +// Data source for annotations. +type RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceAll RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceBGP RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceBots RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceCt RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDNS RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDos RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceFw RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceIQI RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceNet RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceAll, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceBGP, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceBots, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceCt, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDNS, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceDos, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceFw, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceIQI, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceNet, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeEvent RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeOutage RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypePipeline RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeEvent, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeOutage, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypePipeline, RankingInternetServiceTopResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type RankingInternetServiceTopResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/robotstxttop.go b/radar/robotstxttop.go index bbe27c0d1aa..077b30ee065 100644 --- a/radar/robotstxttop.go +++ b/radar/robotstxttop.go @@ -134,10 +134,12 @@ func (r robotsTXTTopDomainCategoriesResponseMetaConfidenceInfoJSON) RawJSON() st // Annotation associated with the result (e.g. outage or other type of event). type RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -168,6 +170,65 @@ func (r robotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationJSON) Ra return r.raw } +// Data source for annotations. +type RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAll RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceBots RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceCt RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDos RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceFw RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceNet RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, RobotsTXTTopDomainCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type RobotsTXTTopDomainCategoriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/robotstxttopuseragent.go b/radar/robotstxttopuseragent.go index d098f8c1fee..6e8bcbbde71 100644 --- a/radar/robotstxttopuseragent.go +++ b/radar/robotstxttopuseragent.go @@ -133,10 +133,12 @@ func (r robotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoJSON) RawJSON() // Annotation associated with the result (e.g. outage or other type of event). type RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -167,6 +169,65 @@ func (r robotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationJSON) return r.raw } +// Data source for annotations. +type RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceAll RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceAIBots RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceBGP RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceBots RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceCt RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceDNS RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceDos RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceFw RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceFwPg RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceHTTP RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceIQI RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceNet RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceSpeed RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceAll, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceBGP, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceBots, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceCt, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceDNS, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceDos, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceFw, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceIQI, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceNet, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypeEvent RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypeGeneral RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypeOutage RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypePipeline RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypeEvent, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypeOutage, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypePipeline, RobotsTXTTopUserAgentDirectiveResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type RobotsTXTTopUserAgentDirectiveResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/search.go b/radar/search.go index b6e0d373ad7..adb87c17a3c 100644 --- a/radar/search.go +++ b/radar/search.go @@ -125,6 +125,8 @@ const ( SearchGlobalParamsExcludeBots SearchGlobalParamsExclude = "BOTS" SearchGlobalParamsExcludeCertificateAuthorities SearchGlobalParamsExclude = "CERTIFICATE_AUTHORITIES" SearchGlobalParamsExcludeCertificateLogs SearchGlobalParamsExclude = "CERTIFICATE_LOGS" + SearchGlobalParamsExcludeOrigins SearchGlobalParamsExclude = "ORIGINS" + SearchGlobalParamsExcludeOriginRegions SearchGlobalParamsExclude = "ORIGIN_REGIONS" SearchGlobalParamsExcludeIndustries SearchGlobalParamsExclude = "INDUSTRIES" SearchGlobalParamsExcludeLocations SearchGlobalParamsExclude = "LOCATIONS" SearchGlobalParamsExcludeNotebooks SearchGlobalParamsExclude = "NOTEBOOKS" @@ -134,7 +136,7 @@ const ( func (r SearchGlobalParamsExclude) IsKnown() bool { switch r { - case SearchGlobalParamsExcludeAdm1S, SearchGlobalParamsExcludeASNs, SearchGlobalParamsExcludeBots, SearchGlobalParamsExcludeCertificateAuthorities, SearchGlobalParamsExcludeCertificateLogs, SearchGlobalParamsExcludeIndustries, SearchGlobalParamsExcludeLocations, SearchGlobalParamsExcludeNotebooks, SearchGlobalParamsExcludeTlds, SearchGlobalParamsExcludeVerticals: + case SearchGlobalParamsExcludeAdm1S, SearchGlobalParamsExcludeASNs, SearchGlobalParamsExcludeBots, SearchGlobalParamsExcludeCertificateAuthorities, SearchGlobalParamsExcludeCertificateLogs, SearchGlobalParamsExcludeOrigins, SearchGlobalParamsExcludeOriginRegions, SearchGlobalParamsExcludeIndustries, SearchGlobalParamsExcludeLocations, SearchGlobalParamsExcludeNotebooks, SearchGlobalParamsExcludeTlds, SearchGlobalParamsExcludeVerticals: return true } return false @@ -164,6 +166,8 @@ const ( SearchGlobalParamsIncludeBots SearchGlobalParamsInclude = "BOTS" SearchGlobalParamsIncludeCertificateAuthorities SearchGlobalParamsInclude = "CERTIFICATE_AUTHORITIES" SearchGlobalParamsIncludeCertificateLogs SearchGlobalParamsInclude = "CERTIFICATE_LOGS" + SearchGlobalParamsIncludeOrigins SearchGlobalParamsInclude = "ORIGINS" + SearchGlobalParamsIncludeOriginRegions SearchGlobalParamsInclude = "ORIGIN_REGIONS" SearchGlobalParamsIncludeIndustries SearchGlobalParamsInclude = "INDUSTRIES" SearchGlobalParamsIncludeLocations SearchGlobalParamsInclude = "LOCATIONS" SearchGlobalParamsIncludeNotebooks SearchGlobalParamsInclude = "NOTEBOOKS" @@ -173,7 +177,7 @@ const ( func (r SearchGlobalParamsInclude) IsKnown() bool { switch r { - case SearchGlobalParamsIncludeAdm1S, SearchGlobalParamsIncludeASNs, SearchGlobalParamsIncludeBots, SearchGlobalParamsIncludeCertificateAuthorities, SearchGlobalParamsIncludeCertificateLogs, SearchGlobalParamsIncludeIndustries, SearchGlobalParamsIncludeLocations, SearchGlobalParamsIncludeNotebooks, SearchGlobalParamsIncludeTlds, SearchGlobalParamsIncludeVerticals: + case SearchGlobalParamsIncludeAdm1S, SearchGlobalParamsIncludeASNs, SearchGlobalParamsIncludeBots, SearchGlobalParamsIncludeCertificateAuthorities, SearchGlobalParamsIncludeCertificateLogs, SearchGlobalParamsIncludeOrigins, SearchGlobalParamsIncludeOriginRegions, SearchGlobalParamsIncludeIndustries, SearchGlobalParamsIncludeLocations, SearchGlobalParamsIncludeNotebooks, SearchGlobalParamsIncludeTlds, SearchGlobalParamsIncludeVerticals: return true } return false diff --git a/radar/tcpresetstimeout.go b/radar/tcpresetstimeout.go index d46fff26dc8..8cbda251bf3 100644 --- a/radar/tcpresetstimeout.go +++ b/radar/tcpresetstimeout.go @@ -147,10 +147,12 @@ func (r tcpResetsTimeoutSummaryResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -181,6 +183,65 @@ func (r tcpResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationJSON) RawJSON return r.raw } +// Data source for annotations. +type TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAll, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBGP, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceBots, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceCt, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNS, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceDos, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFw, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceIQI, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceNet, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypeEvent, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypeOutage, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypePipeline, TCPResetsTimeoutSummaryResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type TCPResetsTimeoutSummaryResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -401,10 +462,12 @@ func (r tcpResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoJSON) RawJSON( // Annotation associated with the result (e.g. outage or other type of event). type TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -435,6 +498,65 @@ func (r tcpResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationJSON return r.raw } +// Data source for annotations. +type TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAll, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceBots, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceCt, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceDos, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFw, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceNet, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, TCPResetsTimeoutTimeseriesGroupsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type TCPResetsTimeoutTimeseriesGroupsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/radar/trafficanomaly.go b/radar/trafficanomaly.go index 17f0e4a6fda..bb2b35ad75c 100644 --- a/radar/trafficanomaly.go +++ b/radar/trafficanomaly.go @@ -81,6 +81,7 @@ type TrafficAnomalyGetResponseTrafficAnomaly struct { ASNDetails TrafficAnomalyGetResponseTrafficAnomaliesASNDetails `json:"asnDetails"` EndDate time.Time `json:"endDate" format:"date-time"` LocationDetails TrafficAnomalyGetResponseTrafficAnomaliesLocationDetails `json:"locationDetails"` + OriginDetails TrafficAnomalyGetResponseTrafficAnomaliesOriginDetails `json:"originDetails"` VisibleInDataSources []string `json:"visibleInDataSources"` JSON trafficAnomalyGetResponseTrafficAnomalyJSON `json:"-"` } @@ -95,6 +96,7 @@ type trafficAnomalyGetResponseTrafficAnomalyJSON struct { ASNDetails apijson.Field EndDate apijson.Field LocationDetails apijson.Field + OriginDetails apijson.Field VisibleInDataSources apijson.Field raw string ExtraFields map[string]apijson.Field @@ -181,6 +183,29 @@ func (r trafficAnomalyGetResponseTrafficAnomaliesLocationDetailsJSON) RawJSON() return r.raw } +type TrafficAnomalyGetResponseTrafficAnomaliesOriginDetails struct { + Name string `json:"name,required"` + Origin string `json:"origin,required"` + JSON trafficAnomalyGetResponseTrafficAnomaliesOriginDetailsJSON `json:"-"` +} + +// trafficAnomalyGetResponseTrafficAnomaliesOriginDetailsJSON contains the JSON +// metadata for the struct [TrafficAnomalyGetResponseTrafficAnomaliesOriginDetails] +type trafficAnomalyGetResponseTrafficAnomaliesOriginDetailsJSON struct { + Name apijson.Field + Origin apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *TrafficAnomalyGetResponseTrafficAnomaliesOriginDetails) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r trafficAnomalyGetResponseTrafficAnomaliesOriginDetailsJSON) RawJSON() string { + return r.raw +} + type TrafficAnomalyGetParams struct { // Filters results by Autonomous System. Specify a single Autonomous System Number // (ASN) as integer. @@ -198,8 +223,12 @@ type TrafficAnomalyGetParams struct { // Filters results by location. Specify an alpha-2 location code. Location param.Field[string] `query:"location"` // Skips the specified number of objects before fetching the results. - Offset param.Field[int64] `query:"offset"` + Offset param.Field[int64] `query:"offset"` + // Filters results by origin. + Origin param.Field[string] `query:"origin"` Status param.Field[TrafficAnomalyGetParamsStatus] `query:"status"` + // Filters results by entity type (LOCATION, AS, or ORIGIN). + Type param.Field[[]TrafficAnomalyGetParamsType] `query:"type"` } // URLQuery serializes [TrafficAnomalyGetParams]'s query parameters as @@ -242,6 +271,22 @@ func (r TrafficAnomalyGetParamsStatus) IsKnown() bool { return false } +type TrafficAnomalyGetParamsType string + +const ( + TrafficAnomalyGetParamsTypeLocation TrafficAnomalyGetParamsType = "LOCATION" + TrafficAnomalyGetParamsTypeAs TrafficAnomalyGetParamsType = "AS" + TrafficAnomalyGetParamsTypeOrigin TrafficAnomalyGetParamsType = "ORIGIN" +) + +func (r TrafficAnomalyGetParamsType) IsKnown() bool { + switch r { + case TrafficAnomalyGetParamsTypeLocation, TrafficAnomalyGetParamsTypeAs, TrafficAnomalyGetParamsTypeOrigin: + return true + } + return false +} + type TrafficAnomalyGetResponseEnvelope struct { Result TrafficAnomalyGetResponse `json:"result,required"` Success bool `json:"success,required"` diff --git a/radar/trafficanomaly_test.go b/radar/trafficanomaly_test.go index 093cd46b704..42437975b1b 100644 --- a/radar/trafficanomaly_test.go +++ b/radar/trafficanomaly_test.go @@ -37,7 +37,9 @@ func TestTrafficAnomalyGetWithOptionalParams(t *testing.T) { Limit: cloudflare.F(int64(1)), Location: cloudflare.F("US"), Offset: cloudflare.F(int64(0)), + Origin: cloudflare.F("amazon-us-east-1"), Status: cloudflare.F(radar.TrafficAnomalyGetParamsStatusVerified), + Type: cloudflare.F([]radar.TrafficAnomalyGetParamsType{radar.TrafficAnomalyGetParamsTypeLocation}), }) if err != nil { var apierr *cloudflare.Error diff --git a/radar/verifiedbottop.go b/radar/verifiedbottop.go index e13d4982505..67256fb6ffd 100644 --- a/radar/verifiedbottop.go +++ b/radar/verifiedbottop.go @@ -154,10 +154,12 @@ func (r verifiedBotTopBotsResponseMetaConfidenceInfoJSON) RawJSON() string { // Annotation associated with the result (e.g. outage or other type of event). type VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -187,6 +189,65 @@ func (r verifiedBotTopBotsResponseMetaConfidenceInfoAnnotationJSON) RawJSON() st return r.raw } +// Data source for annotations. +type VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceAll VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceBGP VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceBots VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceCt VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceDNS VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceDos VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceFw VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceIQI VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceNet VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceAll, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceBGP, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceBots, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceCt, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceDNS, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceDos, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceFw, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceIQI, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceNet, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypeEvent VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypeOutage VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypePipeline VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypeEvent, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypeOutage, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypePipeline, VerifiedBotTopBotsResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type VerifiedBotTopBotsResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` @@ -370,10 +431,12 @@ func (r verifiedBotTopCategoriesResponseMetaConfidenceInfoJSON) RawJSON() string // Annotation associated with the result (e.g. outage or other type of event). type VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotation struct { - DataSource string `json:"dataSource,required"` - Description string `json:"description,required"` - EndDate time.Time `json:"endDate,required" format:"date-time"` - EventType string `json:"eventType,required"` + // Data source for annotations. + DataSource VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource `json:"dataSource,required"` + Description string `json:"description,required"` + EndDate time.Time `json:"endDate,required" format:"date-time"` + // Event type for annotations. + EventType VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventType `json:"eventType,required"` // Whether event is a single point in time or a time range. IsInstantaneous bool `json:"isInstantaneous,required"` LinkedURL string `json:"linkedUrl,required" format:"uri"` @@ -404,6 +467,65 @@ func (r verifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationJSON) RawJSO return r.raw } +// Data source for annotations. +type VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource string + +const ( + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAll VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "ALL" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_BOTS" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "AI_GATEWAY" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "BGP" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceBots VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "BOTS" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "CONNECTION_ANOMALY" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceCt VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "CT" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_MAGNITUDE" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112 VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "DNS_AS112" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDos VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "DOS" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_ROUTING" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "EMAIL_SECURITY" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceFw VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "FW_PG" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CONTROL" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_CRAWLER_REFERER" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "HTTP_ORIGINS" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "IQI" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "LEAKED_CREDENTIALS" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceNet VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "NET" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "ROBOTS_TXT" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "SPEED" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource = "WORKERS_AI" +) + +func (r VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSource) IsKnown() bool { + switch r { + case VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAll, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAIBots, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceAIGateway, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceBGP, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceBots, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceConnectionAnomaly, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceCt, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNS, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSMagnitude, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDNSAS112, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceDos, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailRouting, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceEmailSecurity, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceFw, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceFwPg, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTP, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPControl, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPCrawlerReferer, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceHTTPOrigins, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceIQI, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceLeakedCredentials, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceNet, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceRobotsTXT, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceSpeed, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsDataSourceWorkersAI: + return true + } + return false +} + +// Event type for annotations. +type VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventType string + +const ( + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "EVENT" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "GENERAL" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "OUTAGE" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "PARTIAL_PROJECTION" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "PIPELINE" + VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventType = "TRAFFIC_ANOMALY" +) + +func (r VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventType) IsKnown() bool { + switch r { + case VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeEvent, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeGeneral, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeOutage, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypePartialProjection, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypePipeline, VerifiedBotTopCategoriesResponseMetaConfidenceInfoAnnotationsEventTypeTrafficAnomaly: + return true + } + return false +} + type VerifiedBotTopCategoriesResponseMetaDateRange struct { // Adjusted end of date range. EndTime time.Time `json:"endTime,required" format:"date-time"` diff --git a/rules/listitem.go b/rules/listitem.go index 66787442877..8a39e365b56 100644 --- a/rules/listitem.go +++ b/rules/listitem.go @@ -1049,6 +1049,8 @@ func (r ListItemDeleteParams) MarshalJSON() (data []byte, err error) { } type ListItemDeleteParamsItem struct { + // Defines the unique ID of the item in the List. + ID param.Field[string] `json:"id,required"` } func (r ListItemDeleteParamsItem) MarshalJSON() (data []byte, err error) { diff --git a/rules/listitem_test.go b/rules/listitem_test.go index 4574c3f0dd2..2c7085e0abc 100644 --- a/rules/listitem_test.go +++ b/rules/listitem_test.go @@ -130,7 +130,9 @@ func TestListItemDeleteWithOptionalParams(t *testing.T) { "2c0fc9fa937b11eaa1b71c4d701ab86e", rules.ListItemDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Items: cloudflare.F([]rules.ListItemDeleteParamsItem{{}}), + Items: cloudflare.F([]rules.ListItemDeleteParamsItem{{ + ID: cloudflare.F("34b12448945f11eaa1b71c4d701ab86e"), + }}), }, ) if err != nil { diff --git a/scripts/detect-breaking-changes b/scripts/detect-breaking-changes index 03175062b53..803c66cf1e5 100755 --- a/scripts/detect-breaking-changes +++ b/scripts/detect-breaking-changes @@ -94,20 +94,6 @@ TEST_PATHS=( dns/zonetransferacl_test.go dns/zonetransferpeer_test.go dns/zonetransfertsig_test.go - email_security/investigate_test.go - email_security/investigatedetection_test.go - email_security/investigatepreview_test.go - email_security/investigateraw_test.go - email_security/investigatetrace_test.go - email_security/investigatemove_test.go - email_security/investigatereclassify_test.go - email_security/investigaterelease_test.go - email_security/settingallowpolicy_test.go - email_security/settingblocksender_test.go - email_security/settingdomain_test.go - email_security/settingimpersonationregistry_test.go - email_security/settingtrusteddomain_test.go - email_security/submission_test.go email_routing/emailrouting_test.go email_routing/dns_test.go email_routing/rule_test.go diff --git a/ssl/certificatepack.go b/ssl/certificatepack.go index ca5ad41fcb5..02cc498bba4 100644 --- a/ssl/certificatepack.go +++ b/ssl/certificatepack.go @@ -9,6 +9,7 @@ import ( "net/http" "net/url" "slices" + "time" "github.com/cloudflare/cloudflare-go/v6/internal/apijson" "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" @@ -225,9 +226,19 @@ func (r ValidationMethod) IsKnown() bool { return false } +// A certificate pack with all its properties. type CertificatePackNewResponse struct { // Identifier. - ID string `json:"id"` + ID string `json:"id,required"` + // Array of certificates in this pack. + Certificates []CertificatePackNewResponseCertificate `json:"certificates,required"` + // Comma separated list of valid host names for the certificate packs. Must contain + // the zone apex, may not contain more than 50 hosts, and may not be empty. + Hosts []Host `json:"hosts,required"` + // Status of certificate pack. + Status Status `json:"status,required"` + // Type of certificate pack. + Type CertificatePackNewResponseType `json:"type,required"` // Certificate Authority selected for the order. For information on any certificate // authority specific details or restrictions // [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) @@ -235,20 +246,14 @@ type CertificatePackNewResponse struct { // Whether or not to add Cloudflare Branding for the order. This will add a // subdomain of sni.cloudflaressl.com as the Common Name if set to true. CloudflareBranding bool `json:"cloudflare_branding"` - // Comma separated list of valid host names for the certificate packs. Must contain - // the zone apex, may not contain more than 50 hosts, and may not be empty. - Hosts []Host `json:"hosts"` - // Status of certificate pack. - Status Status `json:"status"` - // Type of certificate pack. - Type CertificatePackNewResponseType `json:"type"` + // Identifier of the primary certificate in a pack. + PrimaryCertificate string `json:"primary_certificate"` // Domain validation errors that have been received by the certificate authority // (CA). ValidationErrors []CertificatePackNewResponseValidationError `json:"validation_errors"` // Validation Method selected for the order. ValidationMethod CertificatePackNewResponseValidationMethod `json:"validation_method"` - // Certificates' validation records. Only present when certificate pack is in - // "pending_validation" status + // Certificates' validation records. ValidationRecords []CertificatePackNewResponseValidationRecord `json:"validation_records"` // Validity Days selected for the order. ValidityDays CertificatePackNewResponseValidityDays `json:"validity_days"` @@ -259,11 +264,13 @@ type CertificatePackNewResponse struct { // [CertificatePackNewResponse] type certificatePackNewResponseJSON struct { ID apijson.Field - CertificateAuthority apijson.Field - CloudflareBranding apijson.Field + Certificates apijson.Field Hosts apijson.Field Status apijson.Field Type apijson.Field + CertificateAuthority apijson.Field + CloudflareBranding apijson.Field + PrimaryCertificate apijson.Field ValidationErrors apijson.Field ValidationMethod apijson.Field ValidationRecords apijson.Field @@ -280,20 +287,95 @@ func (r certificatePackNewResponseJSON) RawJSON() string { return r.raw } -// Certificate Authority selected for the order. For information on any certificate -// authority specific details or restrictions -// [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) -type CertificatePackNewResponseCertificateAuthority string +// An individual certificate within a certificate pack. +type CertificatePackNewResponseCertificate struct { + // Certificate identifier. + ID string `json:"id,required"` + // Hostnames covered by this certificate. + Hosts []string `json:"hosts,required"` + // Certificate status. + Status string `json:"status,required"` + // Certificate bundle method. + BundleMethod string `json:"bundle_method"` + // When the certificate from the authority expires. + ExpiresOn time.Time `json:"expires_on" format:"date-time"` + // Specify the region where your private key can be held locally. + GeoRestrictions CertificatePackNewResponseCertificatesGeoRestrictions `json:"geo_restrictions"` + // The certificate authority that issued the certificate. + Issuer string `json:"issuer"` + // When the certificate was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The order/priority in which the certificate will be used. + Priority float64 `json:"priority"` + // The type of hash used for the certificate. + Signature string `json:"signature"` + // When the certificate was uploaded to Cloudflare. + UploadedOn time.Time `json:"uploaded_on" format:"date-time"` + // Identifier. + ZoneID string `json:"zone_id"` + JSON certificatePackNewResponseCertificateJSON `json:"-"` +} + +// certificatePackNewResponseCertificateJSON contains the JSON metadata for the +// struct [CertificatePackNewResponseCertificate] +type certificatePackNewResponseCertificateJSON struct { + ID apijson.Field + Hosts apijson.Field + Status apijson.Field + BundleMethod apijson.Field + ExpiresOn apijson.Field + GeoRestrictions apijson.Field + Issuer apijson.Field + ModifiedOn apijson.Field + Priority apijson.Field + Signature apijson.Field + UploadedOn apijson.Field + ZoneID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackNewResponseCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackNewResponseCertificateJSON) RawJSON() string { + return r.raw +} + +// Specify the region where your private key can be held locally. +type CertificatePackNewResponseCertificatesGeoRestrictions struct { + Label CertificatePackNewResponseCertificatesGeoRestrictionsLabel `json:"label"` + JSON certificatePackNewResponseCertificatesGeoRestrictionsJSON `json:"-"` +} + +// certificatePackNewResponseCertificatesGeoRestrictionsJSON contains the JSON +// metadata for the struct [CertificatePackNewResponseCertificatesGeoRestrictions] +type certificatePackNewResponseCertificatesGeoRestrictionsJSON struct { + Label apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackNewResponseCertificatesGeoRestrictions) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackNewResponseCertificatesGeoRestrictionsJSON) RawJSON() string { + return r.raw +} + +type CertificatePackNewResponseCertificatesGeoRestrictionsLabel string const ( - CertificatePackNewResponseCertificateAuthorityGoogle CertificatePackNewResponseCertificateAuthority = "google" - CertificatePackNewResponseCertificateAuthorityLetsEncrypt CertificatePackNewResponseCertificateAuthority = "lets_encrypt" - CertificatePackNewResponseCertificateAuthoritySSLCom CertificatePackNewResponseCertificateAuthority = "ssl_com" + CertificatePackNewResponseCertificatesGeoRestrictionsLabelUs CertificatePackNewResponseCertificatesGeoRestrictionsLabel = "us" + CertificatePackNewResponseCertificatesGeoRestrictionsLabelEu CertificatePackNewResponseCertificatesGeoRestrictionsLabel = "eu" + CertificatePackNewResponseCertificatesGeoRestrictionsLabelHighestSecurity CertificatePackNewResponseCertificatesGeoRestrictionsLabel = "highest_security" ) -func (r CertificatePackNewResponseCertificateAuthority) IsKnown() bool { +func (r CertificatePackNewResponseCertificatesGeoRestrictionsLabel) IsKnown() bool { switch r { - case CertificatePackNewResponseCertificateAuthorityGoogle, CertificatePackNewResponseCertificateAuthorityLetsEncrypt, CertificatePackNewResponseCertificateAuthoritySSLCom: + case CertificatePackNewResponseCertificatesGeoRestrictionsLabelUs, CertificatePackNewResponseCertificatesGeoRestrictionsLabelEu, CertificatePackNewResponseCertificatesGeoRestrictionsLabelHighestSecurity: return true } return false @@ -321,6 +403,25 @@ func (r CertificatePackNewResponseType) IsKnown() bool { return false } +// Certificate Authority selected for the order. For information on any certificate +// authority specific details or restrictions +// [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) +type CertificatePackNewResponseCertificateAuthority string + +const ( + CertificatePackNewResponseCertificateAuthorityGoogle CertificatePackNewResponseCertificateAuthority = "google" + CertificatePackNewResponseCertificateAuthorityLetsEncrypt CertificatePackNewResponseCertificateAuthority = "lets_encrypt" + CertificatePackNewResponseCertificateAuthoritySSLCom CertificatePackNewResponseCertificateAuthority = "ssl_com" +) + +func (r CertificatePackNewResponseCertificateAuthority) IsKnown() bool { + switch r { + case CertificatePackNewResponseCertificateAuthorityGoogle, CertificatePackNewResponseCertificateAuthorityLetsEncrypt, CertificatePackNewResponseCertificateAuthoritySSLCom: + return true + } + return false +} + type CertificatePackNewResponseValidationError struct { // A domain validation error. Message string `json:"message"` @@ -417,7 +518,297 @@ func (r CertificatePackNewResponseValidityDays) IsKnown() bool { return false } -type CertificatePackListResponse = interface{} +// A certificate pack with all its properties. +type CertificatePackListResponse struct { + // Identifier. + ID string `json:"id,required"` + // Array of certificates in this pack. + Certificates []CertificatePackListResponseCertificate `json:"certificates,required"` + // Comma separated list of valid host names for the certificate packs. Must contain + // the zone apex, may not contain more than 50 hosts, and may not be empty. + Hosts []Host `json:"hosts,required"` + // Status of certificate pack. + Status Status `json:"status,required"` + // Type of certificate pack. + Type CertificatePackListResponseType `json:"type,required"` + // Certificate Authority selected for the order. For information on any certificate + // authority specific details or restrictions + // [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) + CertificateAuthority CertificatePackListResponseCertificateAuthority `json:"certificate_authority"` + // Whether or not to add Cloudflare Branding for the order. This will add a + // subdomain of sni.cloudflaressl.com as the Common Name if set to true. + CloudflareBranding bool `json:"cloudflare_branding"` + // Identifier of the primary certificate in a pack. + PrimaryCertificate string `json:"primary_certificate"` + // Domain validation errors that have been received by the certificate authority + // (CA). + ValidationErrors []CertificatePackListResponseValidationError `json:"validation_errors"` + // Validation Method selected for the order. + ValidationMethod CertificatePackListResponseValidationMethod `json:"validation_method"` + // Certificates' validation records. + ValidationRecords []CertificatePackListResponseValidationRecord `json:"validation_records"` + // Validity Days selected for the order. + ValidityDays CertificatePackListResponseValidityDays `json:"validity_days"` + JSON certificatePackListResponseJSON `json:"-"` +} + +// certificatePackListResponseJSON contains the JSON metadata for the struct +// [CertificatePackListResponse] +type certificatePackListResponseJSON struct { + ID apijson.Field + Certificates apijson.Field + Hosts apijson.Field + Status apijson.Field + Type apijson.Field + CertificateAuthority apijson.Field + CloudflareBranding apijson.Field + PrimaryCertificate apijson.Field + ValidationErrors apijson.Field + ValidationMethod apijson.Field + ValidationRecords apijson.Field + ValidityDays apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackListResponseJSON) RawJSON() string { + return r.raw +} + +// An individual certificate within a certificate pack. +type CertificatePackListResponseCertificate struct { + // Certificate identifier. + ID string `json:"id,required"` + // Hostnames covered by this certificate. + Hosts []string `json:"hosts,required"` + // Certificate status. + Status string `json:"status,required"` + // Certificate bundle method. + BundleMethod string `json:"bundle_method"` + // When the certificate from the authority expires. + ExpiresOn time.Time `json:"expires_on" format:"date-time"` + // Specify the region where your private key can be held locally. + GeoRestrictions CertificatePackListResponseCertificatesGeoRestrictions `json:"geo_restrictions"` + // The certificate authority that issued the certificate. + Issuer string `json:"issuer"` + // When the certificate was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The order/priority in which the certificate will be used. + Priority float64 `json:"priority"` + // The type of hash used for the certificate. + Signature string `json:"signature"` + // When the certificate was uploaded to Cloudflare. + UploadedOn time.Time `json:"uploaded_on" format:"date-time"` + // Identifier. + ZoneID string `json:"zone_id"` + JSON certificatePackListResponseCertificateJSON `json:"-"` +} + +// certificatePackListResponseCertificateJSON contains the JSON metadata for the +// struct [CertificatePackListResponseCertificate] +type certificatePackListResponseCertificateJSON struct { + ID apijson.Field + Hosts apijson.Field + Status apijson.Field + BundleMethod apijson.Field + ExpiresOn apijson.Field + GeoRestrictions apijson.Field + Issuer apijson.Field + ModifiedOn apijson.Field + Priority apijson.Field + Signature apijson.Field + UploadedOn apijson.Field + ZoneID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackListResponseCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackListResponseCertificateJSON) RawJSON() string { + return r.raw +} + +// Specify the region where your private key can be held locally. +type CertificatePackListResponseCertificatesGeoRestrictions struct { + Label CertificatePackListResponseCertificatesGeoRestrictionsLabel `json:"label"` + JSON certificatePackListResponseCertificatesGeoRestrictionsJSON `json:"-"` +} + +// certificatePackListResponseCertificatesGeoRestrictionsJSON contains the JSON +// metadata for the struct [CertificatePackListResponseCertificatesGeoRestrictions] +type certificatePackListResponseCertificatesGeoRestrictionsJSON struct { + Label apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackListResponseCertificatesGeoRestrictions) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackListResponseCertificatesGeoRestrictionsJSON) RawJSON() string { + return r.raw +} + +type CertificatePackListResponseCertificatesGeoRestrictionsLabel string + +const ( + CertificatePackListResponseCertificatesGeoRestrictionsLabelUs CertificatePackListResponseCertificatesGeoRestrictionsLabel = "us" + CertificatePackListResponseCertificatesGeoRestrictionsLabelEu CertificatePackListResponseCertificatesGeoRestrictionsLabel = "eu" + CertificatePackListResponseCertificatesGeoRestrictionsLabelHighestSecurity CertificatePackListResponseCertificatesGeoRestrictionsLabel = "highest_security" +) + +func (r CertificatePackListResponseCertificatesGeoRestrictionsLabel) IsKnown() bool { + switch r { + case CertificatePackListResponseCertificatesGeoRestrictionsLabelUs, CertificatePackListResponseCertificatesGeoRestrictionsLabelEu, CertificatePackListResponseCertificatesGeoRestrictionsLabelHighestSecurity: + return true + } + return false +} + +// Type of certificate pack. +type CertificatePackListResponseType string + +const ( + CertificatePackListResponseTypeMhCustom CertificatePackListResponseType = "mh_custom" + CertificatePackListResponseTypeManagedHostname CertificatePackListResponseType = "managed_hostname" + CertificatePackListResponseTypeSNICustom CertificatePackListResponseType = "sni_custom" + CertificatePackListResponseTypeUniversal CertificatePackListResponseType = "universal" + CertificatePackListResponseTypeAdvanced CertificatePackListResponseType = "advanced" + CertificatePackListResponseTypeTotalTLS CertificatePackListResponseType = "total_tls" + CertificatePackListResponseTypeKeyless CertificatePackListResponseType = "keyless" + CertificatePackListResponseTypeLegacyCustom CertificatePackListResponseType = "legacy_custom" +) + +func (r CertificatePackListResponseType) IsKnown() bool { + switch r { + case CertificatePackListResponseTypeMhCustom, CertificatePackListResponseTypeManagedHostname, CertificatePackListResponseTypeSNICustom, CertificatePackListResponseTypeUniversal, CertificatePackListResponseTypeAdvanced, CertificatePackListResponseTypeTotalTLS, CertificatePackListResponseTypeKeyless, CertificatePackListResponseTypeLegacyCustom: + return true + } + return false +} + +// Certificate Authority selected for the order. For information on any certificate +// authority specific details or restrictions +// [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) +type CertificatePackListResponseCertificateAuthority string + +const ( + CertificatePackListResponseCertificateAuthorityGoogle CertificatePackListResponseCertificateAuthority = "google" + CertificatePackListResponseCertificateAuthorityLetsEncrypt CertificatePackListResponseCertificateAuthority = "lets_encrypt" + CertificatePackListResponseCertificateAuthoritySSLCom CertificatePackListResponseCertificateAuthority = "ssl_com" +) + +func (r CertificatePackListResponseCertificateAuthority) IsKnown() bool { + switch r { + case CertificatePackListResponseCertificateAuthorityGoogle, CertificatePackListResponseCertificateAuthorityLetsEncrypt, CertificatePackListResponseCertificateAuthoritySSLCom: + return true + } + return false +} + +type CertificatePackListResponseValidationError struct { + // A domain validation error. + Message string `json:"message"` + JSON certificatePackListResponseValidationErrorJSON `json:"-"` +} + +// certificatePackListResponseValidationErrorJSON contains the JSON metadata for +// the struct [CertificatePackListResponseValidationError] +type certificatePackListResponseValidationErrorJSON struct { + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackListResponseValidationError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackListResponseValidationErrorJSON) RawJSON() string { + return r.raw +} + +// Validation Method selected for the order. +type CertificatePackListResponseValidationMethod string + +const ( + CertificatePackListResponseValidationMethodTXT CertificatePackListResponseValidationMethod = "txt" + CertificatePackListResponseValidationMethodHTTP CertificatePackListResponseValidationMethod = "http" + CertificatePackListResponseValidationMethodEmail CertificatePackListResponseValidationMethod = "email" +) + +func (r CertificatePackListResponseValidationMethod) IsKnown() bool { + switch r { + case CertificatePackListResponseValidationMethodTXT, CertificatePackListResponseValidationMethodHTTP, CertificatePackListResponseValidationMethodEmail: + return true + } + return false +} + +// Certificate's required validation record. +type CertificatePackListResponseValidationRecord struct { + // The set of email addresses that the certificate authority (CA) will use to + // complete domain validation. + Emails []string `json:"emails"` + // The content that the certificate authority (CA) will expect to find at the + // http_url during the domain validation. + HTTPBody string `json:"http_body"` + // The url that will be checked during domain validation. + HTTPURL string `json:"http_url"` + // The hostname that the certificate authority (CA) will check for a TXT record + // during domain validation . + TXTName string `json:"txt_name"` + // The TXT record that the certificate authority (CA) will check during domain + // validation. + TXTValue string `json:"txt_value"` + JSON certificatePackListResponseValidationRecordJSON `json:"-"` +} + +// certificatePackListResponseValidationRecordJSON contains the JSON metadata for +// the struct [CertificatePackListResponseValidationRecord] +type certificatePackListResponseValidationRecordJSON struct { + Emails apijson.Field + HTTPBody apijson.Field + HTTPURL apijson.Field + TXTName apijson.Field + TXTValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackListResponseValidationRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackListResponseValidationRecordJSON) RawJSON() string { + return r.raw +} + +// Validity Days selected for the order. +type CertificatePackListResponseValidityDays int64 + +const ( + CertificatePackListResponseValidityDays14 CertificatePackListResponseValidityDays = 14 + CertificatePackListResponseValidityDays30 CertificatePackListResponseValidityDays = 30 + CertificatePackListResponseValidityDays90 CertificatePackListResponseValidityDays = 90 + CertificatePackListResponseValidityDays365 CertificatePackListResponseValidityDays = 365 +) + +func (r CertificatePackListResponseValidityDays) IsKnown() bool { + switch r { + case CertificatePackListResponseValidityDays14, CertificatePackListResponseValidityDays30, CertificatePackListResponseValidityDays90, CertificatePackListResponseValidityDays365: + return true + } + return false +} type CertificatePackDeleteResponse struct { // Identifier. @@ -441,9 +832,19 @@ func (r certificatePackDeleteResponseJSON) RawJSON() string { return r.raw } +// A certificate pack with all its properties. type CertificatePackEditResponse struct { // Identifier. - ID string `json:"id"` + ID string `json:"id,required"` + // Array of certificates in this pack. + Certificates []CertificatePackEditResponseCertificate `json:"certificates,required"` + // Comma separated list of valid host names for the certificate packs. Must contain + // the zone apex, may not contain more than 50 hosts, and may not be empty. + Hosts []Host `json:"hosts,required"` + // Status of certificate pack. + Status Status `json:"status,required"` + // Type of certificate pack. + Type CertificatePackEditResponseType `json:"type,required"` // Certificate Authority selected for the order. For information on any certificate // authority specific details or restrictions // [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) @@ -451,20 +852,14 @@ type CertificatePackEditResponse struct { // Whether or not to add Cloudflare Branding for the order. This will add a // subdomain of sni.cloudflaressl.com as the Common Name if set to true. CloudflareBranding bool `json:"cloudflare_branding"` - // Comma separated list of valid host names for the certificate packs. Must contain - // the zone apex, may not contain more than 50 hosts, and may not be empty. - Hosts []Host `json:"hosts"` - // Status of certificate pack. - Status Status `json:"status"` - // Type of certificate pack. - Type CertificatePackEditResponseType `json:"type"` + // Identifier of the primary certificate in a pack. + PrimaryCertificate string `json:"primary_certificate"` // Domain validation errors that have been received by the certificate authority // (CA). ValidationErrors []CertificatePackEditResponseValidationError `json:"validation_errors"` // Validation Method selected for the order. ValidationMethod CertificatePackEditResponseValidationMethod `json:"validation_method"` - // Certificates' validation records. Only present when certificate pack is in - // "pending_validation" status + // Certificates' validation records. ValidationRecords []CertificatePackEditResponseValidationRecord `json:"validation_records"` // Validity Days selected for the order. ValidityDays CertificatePackEditResponseValidityDays `json:"validity_days"` @@ -475,11 +870,13 @@ type CertificatePackEditResponse struct { // [CertificatePackEditResponse] type certificatePackEditResponseJSON struct { ID apijson.Field - CertificateAuthority apijson.Field - CloudflareBranding apijson.Field + Certificates apijson.Field Hosts apijson.Field Status apijson.Field Type apijson.Field + CertificateAuthority apijson.Field + CloudflareBranding apijson.Field + PrimaryCertificate apijson.Field ValidationErrors apijson.Field ValidationMethod apijson.Field ValidationRecords apijson.Field @@ -496,20 +893,95 @@ func (r certificatePackEditResponseJSON) RawJSON() string { return r.raw } -// Certificate Authority selected for the order. For information on any certificate -// authority specific details or restrictions -// [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) -type CertificatePackEditResponseCertificateAuthority string +// An individual certificate within a certificate pack. +type CertificatePackEditResponseCertificate struct { + // Certificate identifier. + ID string `json:"id,required"` + // Hostnames covered by this certificate. + Hosts []string `json:"hosts,required"` + // Certificate status. + Status string `json:"status,required"` + // Certificate bundle method. + BundleMethod string `json:"bundle_method"` + // When the certificate from the authority expires. + ExpiresOn time.Time `json:"expires_on" format:"date-time"` + // Specify the region where your private key can be held locally. + GeoRestrictions CertificatePackEditResponseCertificatesGeoRestrictions `json:"geo_restrictions"` + // The certificate authority that issued the certificate. + Issuer string `json:"issuer"` + // When the certificate was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The order/priority in which the certificate will be used. + Priority float64 `json:"priority"` + // The type of hash used for the certificate. + Signature string `json:"signature"` + // When the certificate was uploaded to Cloudflare. + UploadedOn time.Time `json:"uploaded_on" format:"date-time"` + // Identifier. + ZoneID string `json:"zone_id"` + JSON certificatePackEditResponseCertificateJSON `json:"-"` +} + +// certificatePackEditResponseCertificateJSON contains the JSON metadata for the +// struct [CertificatePackEditResponseCertificate] +type certificatePackEditResponseCertificateJSON struct { + ID apijson.Field + Hosts apijson.Field + Status apijson.Field + BundleMethod apijson.Field + ExpiresOn apijson.Field + GeoRestrictions apijson.Field + Issuer apijson.Field + ModifiedOn apijson.Field + Priority apijson.Field + Signature apijson.Field + UploadedOn apijson.Field + ZoneID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackEditResponseCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackEditResponseCertificateJSON) RawJSON() string { + return r.raw +} + +// Specify the region where your private key can be held locally. +type CertificatePackEditResponseCertificatesGeoRestrictions struct { + Label CertificatePackEditResponseCertificatesGeoRestrictionsLabel `json:"label"` + JSON certificatePackEditResponseCertificatesGeoRestrictionsJSON `json:"-"` +} + +// certificatePackEditResponseCertificatesGeoRestrictionsJSON contains the JSON +// metadata for the struct [CertificatePackEditResponseCertificatesGeoRestrictions] +type certificatePackEditResponseCertificatesGeoRestrictionsJSON struct { + Label apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackEditResponseCertificatesGeoRestrictions) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackEditResponseCertificatesGeoRestrictionsJSON) RawJSON() string { + return r.raw +} + +type CertificatePackEditResponseCertificatesGeoRestrictionsLabel string const ( - CertificatePackEditResponseCertificateAuthorityGoogle CertificatePackEditResponseCertificateAuthority = "google" - CertificatePackEditResponseCertificateAuthorityLetsEncrypt CertificatePackEditResponseCertificateAuthority = "lets_encrypt" - CertificatePackEditResponseCertificateAuthoritySSLCom CertificatePackEditResponseCertificateAuthority = "ssl_com" + CertificatePackEditResponseCertificatesGeoRestrictionsLabelUs CertificatePackEditResponseCertificatesGeoRestrictionsLabel = "us" + CertificatePackEditResponseCertificatesGeoRestrictionsLabelEu CertificatePackEditResponseCertificatesGeoRestrictionsLabel = "eu" + CertificatePackEditResponseCertificatesGeoRestrictionsLabelHighestSecurity CertificatePackEditResponseCertificatesGeoRestrictionsLabel = "highest_security" ) -func (r CertificatePackEditResponseCertificateAuthority) IsKnown() bool { +func (r CertificatePackEditResponseCertificatesGeoRestrictionsLabel) IsKnown() bool { switch r { - case CertificatePackEditResponseCertificateAuthorityGoogle, CertificatePackEditResponseCertificateAuthorityLetsEncrypt, CertificatePackEditResponseCertificateAuthoritySSLCom: + case CertificatePackEditResponseCertificatesGeoRestrictionsLabelUs, CertificatePackEditResponseCertificatesGeoRestrictionsLabelEu, CertificatePackEditResponseCertificatesGeoRestrictionsLabelHighestSecurity: return true } return false @@ -537,6 +1009,25 @@ func (r CertificatePackEditResponseType) IsKnown() bool { return false } +// Certificate Authority selected for the order. For information on any certificate +// authority specific details or restrictions +// [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) +type CertificatePackEditResponseCertificateAuthority string + +const ( + CertificatePackEditResponseCertificateAuthorityGoogle CertificatePackEditResponseCertificateAuthority = "google" + CertificatePackEditResponseCertificateAuthorityLetsEncrypt CertificatePackEditResponseCertificateAuthority = "lets_encrypt" + CertificatePackEditResponseCertificateAuthoritySSLCom CertificatePackEditResponseCertificateAuthority = "ssl_com" +) + +func (r CertificatePackEditResponseCertificateAuthority) IsKnown() bool { + switch r { + case CertificatePackEditResponseCertificateAuthorityGoogle, CertificatePackEditResponseCertificateAuthorityLetsEncrypt, CertificatePackEditResponseCertificateAuthoritySSLCom: + return true + } + return false +} + type CertificatePackEditResponseValidationError struct { // A domain validation error. Message string `json:"message"` @@ -633,7 +1124,297 @@ func (r CertificatePackEditResponseValidityDays) IsKnown() bool { return false } -type CertificatePackGetResponse = interface{} +// A certificate pack with all its properties. +type CertificatePackGetResponse struct { + // Identifier. + ID string `json:"id,required"` + // Array of certificates in this pack. + Certificates []CertificatePackGetResponseCertificate `json:"certificates,required"` + // Comma separated list of valid host names for the certificate packs. Must contain + // the zone apex, may not contain more than 50 hosts, and may not be empty. + Hosts []Host `json:"hosts,required"` + // Status of certificate pack. + Status Status `json:"status,required"` + // Type of certificate pack. + Type CertificatePackGetResponseType `json:"type,required"` + // Certificate Authority selected for the order. For information on any certificate + // authority specific details or restrictions + // [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) + CertificateAuthority CertificatePackGetResponseCertificateAuthority `json:"certificate_authority"` + // Whether or not to add Cloudflare Branding for the order. This will add a + // subdomain of sni.cloudflaressl.com as the Common Name if set to true. + CloudflareBranding bool `json:"cloudflare_branding"` + // Identifier of the primary certificate in a pack. + PrimaryCertificate string `json:"primary_certificate"` + // Domain validation errors that have been received by the certificate authority + // (CA). + ValidationErrors []CertificatePackGetResponseValidationError `json:"validation_errors"` + // Validation Method selected for the order. + ValidationMethod CertificatePackGetResponseValidationMethod `json:"validation_method"` + // Certificates' validation records. + ValidationRecords []CertificatePackGetResponseValidationRecord `json:"validation_records"` + // Validity Days selected for the order. + ValidityDays CertificatePackGetResponseValidityDays `json:"validity_days"` + JSON certificatePackGetResponseJSON `json:"-"` +} + +// certificatePackGetResponseJSON contains the JSON metadata for the struct +// [CertificatePackGetResponse] +type certificatePackGetResponseJSON struct { + ID apijson.Field + Certificates apijson.Field + Hosts apijson.Field + Status apijson.Field + Type apijson.Field + CertificateAuthority apijson.Field + CloudflareBranding apijson.Field + PrimaryCertificate apijson.Field + ValidationErrors apijson.Field + ValidationMethod apijson.Field + ValidationRecords apijson.Field + ValidityDays apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackGetResponseJSON) RawJSON() string { + return r.raw +} + +// An individual certificate within a certificate pack. +type CertificatePackGetResponseCertificate struct { + // Certificate identifier. + ID string `json:"id,required"` + // Hostnames covered by this certificate. + Hosts []string `json:"hosts,required"` + // Certificate status. + Status string `json:"status,required"` + // Certificate bundle method. + BundleMethod string `json:"bundle_method"` + // When the certificate from the authority expires. + ExpiresOn time.Time `json:"expires_on" format:"date-time"` + // Specify the region where your private key can be held locally. + GeoRestrictions CertificatePackGetResponseCertificatesGeoRestrictions `json:"geo_restrictions"` + // The certificate authority that issued the certificate. + Issuer string `json:"issuer"` + // When the certificate was last modified. + ModifiedOn time.Time `json:"modified_on" format:"date-time"` + // The order/priority in which the certificate will be used. + Priority float64 `json:"priority"` + // The type of hash used for the certificate. + Signature string `json:"signature"` + // When the certificate was uploaded to Cloudflare. + UploadedOn time.Time `json:"uploaded_on" format:"date-time"` + // Identifier. + ZoneID string `json:"zone_id"` + JSON certificatePackGetResponseCertificateJSON `json:"-"` +} + +// certificatePackGetResponseCertificateJSON contains the JSON metadata for the +// struct [CertificatePackGetResponseCertificate] +type certificatePackGetResponseCertificateJSON struct { + ID apijson.Field + Hosts apijson.Field + Status apijson.Field + BundleMethod apijson.Field + ExpiresOn apijson.Field + GeoRestrictions apijson.Field + Issuer apijson.Field + ModifiedOn apijson.Field + Priority apijson.Field + Signature apijson.Field + UploadedOn apijson.Field + ZoneID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackGetResponseCertificate) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackGetResponseCertificateJSON) RawJSON() string { + return r.raw +} + +// Specify the region where your private key can be held locally. +type CertificatePackGetResponseCertificatesGeoRestrictions struct { + Label CertificatePackGetResponseCertificatesGeoRestrictionsLabel `json:"label"` + JSON certificatePackGetResponseCertificatesGeoRestrictionsJSON `json:"-"` +} + +// certificatePackGetResponseCertificatesGeoRestrictionsJSON contains the JSON +// metadata for the struct [CertificatePackGetResponseCertificatesGeoRestrictions] +type certificatePackGetResponseCertificatesGeoRestrictionsJSON struct { + Label apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackGetResponseCertificatesGeoRestrictions) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackGetResponseCertificatesGeoRestrictionsJSON) RawJSON() string { + return r.raw +} + +type CertificatePackGetResponseCertificatesGeoRestrictionsLabel string + +const ( + CertificatePackGetResponseCertificatesGeoRestrictionsLabelUs CertificatePackGetResponseCertificatesGeoRestrictionsLabel = "us" + CertificatePackGetResponseCertificatesGeoRestrictionsLabelEu CertificatePackGetResponseCertificatesGeoRestrictionsLabel = "eu" + CertificatePackGetResponseCertificatesGeoRestrictionsLabelHighestSecurity CertificatePackGetResponseCertificatesGeoRestrictionsLabel = "highest_security" +) + +func (r CertificatePackGetResponseCertificatesGeoRestrictionsLabel) IsKnown() bool { + switch r { + case CertificatePackGetResponseCertificatesGeoRestrictionsLabelUs, CertificatePackGetResponseCertificatesGeoRestrictionsLabelEu, CertificatePackGetResponseCertificatesGeoRestrictionsLabelHighestSecurity: + return true + } + return false +} + +// Type of certificate pack. +type CertificatePackGetResponseType string + +const ( + CertificatePackGetResponseTypeMhCustom CertificatePackGetResponseType = "mh_custom" + CertificatePackGetResponseTypeManagedHostname CertificatePackGetResponseType = "managed_hostname" + CertificatePackGetResponseTypeSNICustom CertificatePackGetResponseType = "sni_custom" + CertificatePackGetResponseTypeUniversal CertificatePackGetResponseType = "universal" + CertificatePackGetResponseTypeAdvanced CertificatePackGetResponseType = "advanced" + CertificatePackGetResponseTypeTotalTLS CertificatePackGetResponseType = "total_tls" + CertificatePackGetResponseTypeKeyless CertificatePackGetResponseType = "keyless" + CertificatePackGetResponseTypeLegacyCustom CertificatePackGetResponseType = "legacy_custom" +) + +func (r CertificatePackGetResponseType) IsKnown() bool { + switch r { + case CertificatePackGetResponseTypeMhCustom, CertificatePackGetResponseTypeManagedHostname, CertificatePackGetResponseTypeSNICustom, CertificatePackGetResponseTypeUniversal, CertificatePackGetResponseTypeAdvanced, CertificatePackGetResponseTypeTotalTLS, CertificatePackGetResponseTypeKeyless, CertificatePackGetResponseTypeLegacyCustom: + return true + } + return false +} + +// Certificate Authority selected for the order. For information on any certificate +// authority specific details or restrictions +// [see this page for more details.](https://developers.cloudflare.com/ssl/reference/certificate-authorities) +type CertificatePackGetResponseCertificateAuthority string + +const ( + CertificatePackGetResponseCertificateAuthorityGoogle CertificatePackGetResponseCertificateAuthority = "google" + CertificatePackGetResponseCertificateAuthorityLetsEncrypt CertificatePackGetResponseCertificateAuthority = "lets_encrypt" + CertificatePackGetResponseCertificateAuthoritySSLCom CertificatePackGetResponseCertificateAuthority = "ssl_com" +) + +func (r CertificatePackGetResponseCertificateAuthority) IsKnown() bool { + switch r { + case CertificatePackGetResponseCertificateAuthorityGoogle, CertificatePackGetResponseCertificateAuthorityLetsEncrypt, CertificatePackGetResponseCertificateAuthoritySSLCom: + return true + } + return false +} + +type CertificatePackGetResponseValidationError struct { + // A domain validation error. + Message string `json:"message"` + JSON certificatePackGetResponseValidationErrorJSON `json:"-"` +} + +// certificatePackGetResponseValidationErrorJSON contains the JSON metadata for the +// struct [CertificatePackGetResponseValidationError] +type certificatePackGetResponseValidationErrorJSON struct { + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackGetResponseValidationError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackGetResponseValidationErrorJSON) RawJSON() string { + return r.raw +} + +// Validation Method selected for the order. +type CertificatePackGetResponseValidationMethod string + +const ( + CertificatePackGetResponseValidationMethodTXT CertificatePackGetResponseValidationMethod = "txt" + CertificatePackGetResponseValidationMethodHTTP CertificatePackGetResponseValidationMethod = "http" + CertificatePackGetResponseValidationMethodEmail CertificatePackGetResponseValidationMethod = "email" +) + +func (r CertificatePackGetResponseValidationMethod) IsKnown() bool { + switch r { + case CertificatePackGetResponseValidationMethodTXT, CertificatePackGetResponseValidationMethodHTTP, CertificatePackGetResponseValidationMethodEmail: + return true + } + return false +} + +// Certificate's required validation record. +type CertificatePackGetResponseValidationRecord struct { + // The set of email addresses that the certificate authority (CA) will use to + // complete domain validation. + Emails []string `json:"emails"` + // The content that the certificate authority (CA) will expect to find at the + // http_url during the domain validation. + HTTPBody string `json:"http_body"` + // The url that will be checked during domain validation. + HTTPURL string `json:"http_url"` + // The hostname that the certificate authority (CA) will check for a TXT record + // during domain validation . + TXTName string `json:"txt_name"` + // The TXT record that the certificate authority (CA) will check during domain + // validation. + TXTValue string `json:"txt_value"` + JSON certificatePackGetResponseValidationRecordJSON `json:"-"` +} + +// certificatePackGetResponseValidationRecordJSON contains the JSON metadata for +// the struct [CertificatePackGetResponseValidationRecord] +type certificatePackGetResponseValidationRecordJSON struct { + Emails apijson.Field + HTTPBody apijson.Field + HTTPURL apijson.Field + TXTName apijson.Field + TXTValue apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CertificatePackGetResponseValidationRecord) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r certificatePackGetResponseValidationRecordJSON) RawJSON() string { + return r.raw +} + +// Validity Days selected for the order. +type CertificatePackGetResponseValidityDays int64 + +const ( + CertificatePackGetResponseValidityDays14 CertificatePackGetResponseValidityDays = 14 + CertificatePackGetResponseValidityDays30 CertificatePackGetResponseValidityDays = 30 + CertificatePackGetResponseValidityDays90 CertificatePackGetResponseValidityDays = 90 + CertificatePackGetResponseValidityDays365 CertificatePackGetResponseValidityDays = 365 +) + +func (r CertificatePackGetResponseValidityDays) IsKnown() bool { + switch r { + case CertificatePackGetResponseValidityDays14, CertificatePackGetResponseValidityDays30, CertificatePackGetResponseValidityDays90, CertificatePackGetResponseValidityDays365: + return true + } + return false +} type CertificatePackNewParams struct { // Identifier. @@ -734,8 +1515,9 @@ type CertificatePackNewResponseEnvelope struct { Messages []CertificatePackNewResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success CertificatePackNewResponseEnvelopeSuccess `json:"success,required"` - Result CertificatePackNewResponse `json:"result"` - JSON certificatePackNewResponseEnvelopeJSON `json:"-"` + // A certificate pack with all its properties. + Result CertificatePackNewResponse `json:"result"` + JSON certificatePackNewResponseEnvelopeJSON `json:"-"` } // certificatePackNewResponseEnvelopeJSON contains the JSON metadata for the struct @@ -1060,8 +1842,9 @@ type CertificatePackEditResponseEnvelope struct { Messages []CertificatePackEditResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success CertificatePackEditResponseEnvelopeSuccess `json:"success,required"` - Result CertificatePackEditResponse `json:"result"` - JSON certificatePackEditResponseEnvelopeJSON `json:"-"` + // A certificate pack with all its properties. + Result CertificatePackEditResponse `json:"result"` + JSON certificatePackEditResponseEnvelopeJSON `json:"-"` } // certificatePackEditResponseEnvelopeJSON contains the JSON metadata for the @@ -1204,8 +1987,9 @@ type CertificatePackGetResponseEnvelope struct { Messages []CertificatePackGetResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success CertificatePackGetResponseEnvelopeSuccess `json:"success,required"` - Result CertificatePackGetResponse `json:"result"` - JSON certificatePackGetResponseEnvelopeJSON `json:"-"` + // A certificate pack with all its properties. + Result CertificatePackGetResponse `json:"result"` + JSON certificatePackGetResponseEnvelopeJSON `json:"-"` } // certificatePackGetResponseEnvelopeJSON contains the JSON metadata for the struct diff --git a/workers/domain.go b/workers/domain.go index 7f98a88328f..10384bc9aca 100644 --- a/workers/domain.go +++ b/workers/domain.go @@ -123,6 +123,8 @@ type Domain struct { // Identifer of the Worker Domain. ID string `json:"id"` // Worker environment associated with the zone and hostname. + // + // Deprecated: deprecated Environment string `json:"environment"` // Hostname of the Worker Domain. Hostname string `json:"hostname"` @@ -158,14 +160,14 @@ func (r domainJSON) RawJSON() string { type DomainUpdateParams struct { // Identifer of the account. AccountID param.Field[string] `path:"account_id,required"` - // Worker environment associated with the zone and hostname. - Environment param.Field[string] `json:"environment,required"` // Hostname of the Worker Domain. Hostname param.Field[string] `json:"hostname,required"` // Worker service associated with the zone and hostname. Service param.Field[string] `json:"service,required"` // Identifier of the zone. ZoneID param.Field[string] `json:"zone_id,required"` + // Worker environment associated with the zone and hostname. + Environment param.Field[string] `json:"environment"` } func (r DomainUpdateParams) MarshalJSON() (data []byte, err error) { diff --git a/workers/domain_test.go b/workers/domain_test.go index 45ca138b4a3..15d803c8380 100644 --- a/workers/domain_test.go +++ b/workers/domain_test.go @@ -14,7 +14,7 @@ import ( "github.com/cloudflare/cloudflare-go/v6/workers" ) -func TestDomainUpdate(t *testing.T) { +func TestDomainUpdateWithOptionalParams(t *testing.T) { baseURL := "http://localhost:4010" if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { baseURL = envURL @@ -29,10 +29,10 @@ func TestDomainUpdate(t *testing.T) { ) _, err := client.Workers.Domains.Update(context.TODO(), workers.DomainUpdateParams{ AccountID: cloudflare.F("9a7806061c88ada191ed06f989cc3dac"), - Environment: cloudflare.F("production"), Hostname: cloudflare.F("foo.example.com"), Service: cloudflare.F("foo"), ZoneID: cloudflare.F("593c9c94de529bbbfaac7c53ced0447d"), + Environment: cloudflare.F("production"), }) if err != nil { var apierr *cloudflare.Error diff --git a/workers/observabilitytelemetry.go b/workers/observabilitytelemetry.go index 934c9b01141..3d39b77c2d8 100644 --- a/workers/observabilitytelemetry.go +++ b/workers/observabilitytelemetry.go @@ -161,6 +161,7 @@ type ObservabilityTelemetryQueryResponse struct { Events ObservabilityTelemetryQueryResponseEvents `json:"events"` Invocations map[string][]ObservabilityTelemetryQueryResponseInvocation `json:"invocations"` Patterns []ObservabilityTelemetryQueryResponsePattern `json:"patterns"` + Traces []ObservabilityTelemetryQueryResponseTrace `json:"traces"` JSON observabilityTelemetryQueryResponseJSON `json:"-"` } @@ -174,6 +175,7 @@ type observabilityTelemetryQueryResponseJSON struct { Events apijson.Field Invocations apijson.Field Patterns apijson.Field + Traces apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -192,12 +194,13 @@ type ObservabilityTelemetryQueryResponseRun struct { AccountID string `json:"accountId,required"` Dry bool `json:"dry,required"` // Deprecated: deprecated - EnvironmentID string `json:"environmentId,required"` - Granularity float64 `json:"granularity,required"` - Query ObservabilityTelemetryQueryResponseRunQuery `json:"query,required"` - Status ObservabilityTelemetryQueryResponseRunStatus `json:"status,required"` - Timeframe ObservabilityTelemetryQueryResponseRunTimeframe `json:"timeframe,required"` - UserID string `json:"userId,required"` + EnvironmentID string `json:"environmentId,required"` + Granularity float64 `json:"granularity,required"` + Query ObservabilityTelemetryQueryResponseRunQuery `json:"query,required"` + Status ObservabilityTelemetryQueryResponseRunStatus `json:"status,required"` + // Time range for the query execution + Timeframe ObservabilityTelemetryQueryResponseRunTimeframe `json:"timeframe,required"` + UserID string `json:"userId,required"` // Deprecated: deprecated WorkspaceID string `json:"workspaceId,required"` Created string `json:"created"` @@ -750,10 +753,11 @@ func (r ObservabilityTelemetryQueryResponseRunStatus) IsKnown() bool { return false } +// Time range for the query execution type ObservabilityTelemetryQueryResponseRunTimeframe struct { - // Set the start time for your query using UNIX time in milliseconds. + // Start timestamp for the query timeframe (Unix timestamp in milliseconds) From float64 `json:"from,required"` - // Set the end time for your query using UNIX time in milliseconds. + // End timestamp for the query timeframe (Unix timestamp in milliseconds) To float64 `json:"to,required"` JSON observabilityTelemetryQueryResponseRunTimeframeJSON `json:"-"` } @@ -781,7 +785,10 @@ type ObservabilityTelemetryQueryResponseRunStatistics struct { // Time in seconds for the query to run. Elapsed float64 `json:"elapsed,required"` // Number of rows scanned from the table. - RowsRead float64 `json:"rows_read,required"` + RowsRead float64 `json:"rows_read,required"` + // The level of Adaptive Bit Rate (ABR) sampling used for the query. If empty the + // ABR level is 1 + AbrLevel float64 `json:"abr_level"` JSON observabilityTelemetryQueryResponseRunStatisticsJSON `json:"-"` } @@ -791,6 +798,7 @@ type observabilityTelemetryQueryResponseRunStatisticsJSON struct { BytesRead apijson.Field Elapsed apijson.Field RowsRead apijson.Field + AbrLevel apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -811,7 +819,10 @@ type ObservabilityTelemetryQueryResponseStatistics struct { // Time in seconds for the query to run. Elapsed float64 `json:"elapsed,required"` // Number of rows scanned from the table. - RowsRead float64 `json:"rows_read,required"` + RowsRead float64 `json:"rows_read,required"` + // The level of Adaptive Bit Rate (ABR) sampling used for the query. If empty the + // ABR level is 1 + AbrLevel float64 `json:"abr_level"` JSON observabilityTelemetryQueryResponseStatisticsJSON `json:"-"` } @@ -821,6 +832,7 @@ type observabilityTelemetryQueryResponseStatisticsJSON struct { BytesRead apijson.Field Elapsed apijson.Field RowsRead apijson.Field + AbrLevel apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -1304,6 +1316,9 @@ type ObservabilityTelemetryQueryResponseEventsEvent struct { Dataset string `json:"dataset,required"` Source interface{} `json:"source,required"` Timestamp int64 `json:"timestamp,required"` + // Cloudflare Containers event information enriches your logs so you can easily + // identify and debug issues. + Containers interface{} `json:"$containers"` // Cloudflare Workers event information enriches your logs so you can easily // identify and debug issues. Workers ObservabilityTelemetryQueryResponseEventsEventsWorkers `json:"$workers"` @@ -1317,6 +1332,7 @@ type observabilityTelemetryQueryResponseEventsEventJSON struct { Dataset apijson.Field Source apijson.Field Timestamp apijson.Field + Containers apijson.Field Workers apijson.Field raw string ExtraFields map[string]apijson.Field @@ -1358,6 +1374,7 @@ type ObservabilityTelemetryQueryResponseEventsEventsMetadata struct { StatusCode int64 `json:"statusCode"` TraceDuration int64 `json:"traceDuration"` TraceID string `json:"traceId"` + TransactionName string `json:"transactionName"` Trigger string `json:"trigger"` Type string `json:"type"` URL string `json:"url"` @@ -1395,6 +1412,7 @@ type observabilityTelemetryQueryResponseEventsEventsMetadataJSON struct { StatusCode apijson.Field TraceDuration apijson.Field TraceID apijson.Field + TransactionName apijson.Field Trigger apijson.Field Type apijson.Field URL apijson.Field @@ -1414,7 +1432,6 @@ func (r observabilityTelemetryQueryResponseEventsEventsMetadataJSON) RawJSON() s // identify and debug issues. type ObservabilityTelemetryQueryResponseEventsEventsWorkers struct { EventType ObservabilityTelemetryQueryResponseEventsEventsWorkersEventType `json:"eventType,required"` - Outcome string `json:"outcome,required"` RequestID string `json:"requestId,required"` ScriptName string `json:"scriptName,required"` CPUTimeMs float64 `json:"cpuTimeMs"` @@ -1422,11 +1439,13 @@ type ObservabilityTelemetryQueryResponseEventsEventsWorkers struct { // [[]ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectDiagnosticsChannelEvent]. DiagnosticsChannelEvents interface{} `json:"diagnosticsChannelEvents"` DispatchNamespace string `json:"dispatchNamespace"` + DurableObjectID string `json:"durableObjectId"` Entrypoint string `json:"entrypoint"` // This field can have the runtime type of // [map[string]ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectEventUnion]. Event interface{} `json:"event"` ExecutionModel ObservabilityTelemetryQueryResponseEventsEventsWorkersExecutionModel `json:"executionModel"` + Outcome string `json:"outcome"` // This field can have the runtime type of // [ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectScriptVersion]. ScriptVersion interface{} `json:"scriptVersion"` @@ -1440,15 +1459,16 @@ type ObservabilityTelemetryQueryResponseEventsEventsWorkers struct { // metadata for the struct [ObservabilityTelemetryQueryResponseEventsEventsWorkers] type observabilityTelemetryQueryResponseEventsEventsWorkersJSON struct { EventType apijson.Field - Outcome apijson.Field RequestID apijson.Field ScriptName apijson.Field CPUTimeMs apijson.Field DiagnosticsChannelEvents apijson.Field DispatchNamespace apijson.Field + DurableObjectID apijson.Field Entrypoint apijson.Field Event apijson.Field ExecutionModel apijson.Field + Outcome apijson.Field ScriptVersion apijson.Field Truncated apijson.Field WallTimeMs apijson.Field @@ -1505,33 +1525,35 @@ func init() { } type ObservabilityTelemetryQueryResponseEventsEventsWorkersObject struct { - EventType ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectEventType `json:"eventType,required"` - Outcome string `json:"outcome,required"` - RequestID string `json:"requestId,required"` - ScriptName string `json:"scriptName,required"` - Entrypoint string `json:"entrypoint"` - Event map[string]ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectEventUnion `json:"event"` - ExecutionModel ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectExecutionModel `json:"executionModel"` - ScriptVersion ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectScriptVersion `json:"scriptVersion"` - Truncated bool `json:"truncated"` - JSON observabilityTelemetryQueryResponseEventsEventsWorkersObjectJSON `json:"-"` + EventType ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectEventType `json:"eventType,required"` + RequestID string `json:"requestId,required"` + ScriptName string `json:"scriptName,required"` + DurableObjectID string `json:"durableObjectId"` + Entrypoint string `json:"entrypoint"` + Event map[string]ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectEventUnion `json:"event"` + ExecutionModel ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectExecutionModel `json:"executionModel"` + Outcome string `json:"outcome"` + ScriptVersion ObservabilityTelemetryQueryResponseEventsEventsWorkersObjectScriptVersion `json:"scriptVersion"` + Truncated bool `json:"truncated"` + JSON observabilityTelemetryQueryResponseEventsEventsWorkersObjectJSON `json:"-"` } // observabilityTelemetryQueryResponseEventsEventsWorkersObjectJSON contains the // JSON metadata for the struct // [ObservabilityTelemetryQueryResponseEventsEventsWorkersObject] type observabilityTelemetryQueryResponseEventsEventsWorkersObjectJSON struct { - EventType apijson.Field - Outcome apijson.Field - RequestID apijson.Field - ScriptName apijson.Field - Entrypoint apijson.Field - Event apijson.Field - ExecutionModel apijson.Field - ScriptVersion apijson.Field - Truncated apijson.Field - raw string - ExtraFields map[string]apijson.Field + EventType apijson.Field + RequestID apijson.Field + ScriptName apijson.Field + DurableObjectID apijson.Field + Entrypoint apijson.Field + Event apijson.Field + ExecutionModel apijson.Field + Outcome apijson.Field + ScriptVersion apijson.Field + Truncated apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *ObservabilityTelemetryQueryResponseEventsEventsWorkersObject) UnmarshalJSON(data []byte) (err error) { @@ -1939,6 +1961,9 @@ type ObservabilityTelemetryQueryResponseInvocation struct { Dataset string `json:"dataset,required"` Source interface{} `json:"source,required"` Timestamp int64 `json:"timestamp,required"` + // Cloudflare Containers event information enriches your logs so you can easily + // identify and debug issues. + Containers interface{} `json:"$containers"` // Cloudflare Workers event information enriches your logs so you can easily // identify and debug issues. Workers ObservabilityTelemetryQueryResponseInvocationsWorkers `json:"$workers"` @@ -1952,6 +1977,7 @@ type observabilityTelemetryQueryResponseInvocationJSON struct { Dataset apijson.Field Source apijson.Field Timestamp apijson.Field + Containers apijson.Field Workers apijson.Field raw string ExtraFields map[string]apijson.Field @@ -1993,6 +2019,7 @@ type ObservabilityTelemetryQueryResponseInvocationsMetadata struct { StatusCode int64 `json:"statusCode"` TraceDuration int64 `json:"traceDuration"` TraceID string `json:"traceId"` + TransactionName string `json:"transactionName"` Trigger string `json:"trigger"` Type string `json:"type"` URL string `json:"url"` @@ -2029,6 +2056,7 @@ type observabilityTelemetryQueryResponseInvocationsMetadataJSON struct { StatusCode apijson.Field TraceDuration apijson.Field TraceID apijson.Field + TransactionName apijson.Field Trigger apijson.Field Type apijson.Field URL apijson.Field @@ -2048,7 +2076,6 @@ func (r observabilityTelemetryQueryResponseInvocationsMetadataJSON) RawJSON() st // identify and debug issues. type ObservabilityTelemetryQueryResponseInvocationsWorkers struct { EventType ObservabilityTelemetryQueryResponseInvocationsWorkersEventType `json:"eventType,required"` - Outcome string `json:"outcome,required"` RequestID string `json:"requestId,required"` ScriptName string `json:"scriptName,required"` CPUTimeMs float64 `json:"cpuTimeMs"` @@ -2056,11 +2083,13 @@ type ObservabilityTelemetryQueryResponseInvocationsWorkers struct { // [[]ObservabilityTelemetryQueryResponseInvocationsWorkersObjectDiagnosticsChannelEvent]. DiagnosticsChannelEvents interface{} `json:"diagnosticsChannelEvents"` DispatchNamespace string `json:"dispatchNamespace"` + DurableObjectID string `json:"durableObjectId"` Entrypoint string `json:"entrypoint"` // This field can have the runtime type of // [map[string]ObservabilityTelemetryQueryResponseInvocationsWorkersObjectEventUnion]. Event interface{} `json:"event"` ExecutionModel ObservabilityTelemetryQueryResponseInvocationsWorkersExecutionModel `json:"executionModel"` + Outcome string `json:"outcome"` // This field can have the runtime type of // [ObservabilityTelemetryQueryResponseInvocationsWorkersObjectScriptVersion]. ScriptVersion interface{} `json:"scriptVersion"` @@ -2074,15 +2103,16 @@ type ObservabilityTelemetryQueryResponseInvocationsWorkers struct { // metadata for the struct [ObservabilityTelemetryQueryResponseInvocationsWorkers] type observabilityTelemetryQueryResponseInvocationsWorkersJSON struct { EventType apijson.Field - Outcome apijson.Field RequestID apijson.Field ScriptName apijson.Field CPUTimeMs apijson.Field DiagnosticsChannelEvents apijson.Field DispatchNamespace apijson.Field + DurableObjectID apijson.Field Entrypoint apijson.Field Event apijson.Field ExecutionModel apijson.Field + Outcome apijson.Field ScriptVersion apijson.Field Truncated apijson.Field WallTimeMs apijson.Field @@ -2138,33 +2168,35 @@ func init() { } type ObservabilityTelemetryQueryResponseInvocationsWorkersObject struct { - EventType ObservabilityTelemetryQueryResponseInvocationsWorkersObjectEventType `json:"eventType,required"` - Outcome string `json:"outcome,required"` - RequestID string `json:"requestId,required"` - ScriptName string `json:"scriptName,required"` - Entrypoint string `json:"entrypoint"` - Event map[string]ObservabilityTelemetryQueryResponseInvocationsWorkersObjectEventUnion `json:"event"` - ExecutionModel ObservabilityTelemetryQueryResponseInvocationsWorkersObjectExecutionModel `json:"executionModel"` - ScriptVersion ObservabilityTelemetryQueryResponseInvocationsWorkersObjectScriptVersion `json:"scriptVersion"` - Truncated bool `json:"truncated"` - JSON observabilityTelemetryQueryResponseInvocationsWorkersObjectJSON `json:"-"` + EventType ObservabilityTelemetryQueryResponseInvocationsWorkersObjectEventType `json:"eventType,required"` + RequestID string `json:"requestId,required"` + ScriptName string `json:"scriptName,required"` + DurableObjectID string `json:"durableObjectId"` + Entrypoint string `json:"entrypoint"` + Event map[string]ObservabilityTelemetryQueryResponseInvocationsWorkersObjectEventUnion `json:"event"` + ExecutionModel ObservabilityTelemetryQueryResponseInvocationsWorkersObjectExecutionModel `json:"executionModel"` + Outcome string `json:"outcome"` + ScriptVersion ObservabilityTelemetryQueryResponseInvocationsWorkersObjectScriptVersion `json:"scriptVersion"` + Truncated bool `json:"truncated"` + JSON observabilityTelemetryQueryResponseInvocationsWorkersObjectJSON `json:"-"` } // observabilityTelemetryQueryResponseInvocationsWorkersObjectJSON contains the // JSON metadata for the struct // [ObservabilityTelemetryQueryResponseInvocationsWorkersObject] type observabilityTelemetryQueryResponseInvocationsWorkersObjectJSON struct { - EventType apijson.Field - Outcome apijson.Field - RequestID apijson.Field - ScriptName apijson.Field - Entrypoint apijson.Field - Event apijson.Field - ExecutionModel apijson.Field - ScriptVersion apijson.Field - Truncated apijson.Field - raw string - ExtraFields map[string]apijson.Field + EventType apijson.Field + RequestID apijson.Field + ScriptName apijson.Field + DurableObjectID apijson.Field + Entrypoint apijson.Field + Event apijson.Field + ExecutionModel apijson.Field + Outcome apijson.Field + ScriptVersion apijson.Field + Truncated apijson.Field + raw string + ExtraFields map[string]apijson.Field } func (r *ObservabilityTelemetryQueryResponseInvocationsWorkersObject) UnmarshalJSON(data []byte) (err error) { @@ -2556,6 +2588,43 @@ func init() { ) } +type ObservabilityTelemetryQueryResponseTrace struct { + RootSpanName string `json:"rootSpanName,required"` + RootTransactionName string `json:"rootTransactionName,required"` + Service []string `json:"service,required"` + Spans float64 `json:"spans,required"` + TraceDurationMs float64 `json:"traceDurationMs,required"` + TraceEndMs float64 `json:"traceEndMs,required"` + TraceID string `json:"traceId,required"` + TraceStartMs float64 `json:"traceStartMs,required"` + Errors []string `json:"errors"` + JSON observabilityTelemetryQueryResponseTraceJSON `json:"-"` +} + +// observabilityTelemetryQueryResponseTraceJSON contains the JSON metadata for the +// struct [ObservabilityTelemetryQueryResponseTrace] +type observabilityTelemetryQueryResponseTraceJSON struct { + RootSpanName apijson.Field + RootTransactionName apijson.Field + Service apijson.Field + Spans apijson.Field + TraceDurationMs apijson.Field + TraceEndMs apijson.Field + TraceID apijson.Field + TraceStartMs apijson.Field + Errors apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ObservabilityTelemetryQueryResponseTrace) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r observabilityTelemetryQueryResponseTraceJSON) RawJSON() string { + return r.raw +} + type ObservabilityTelemetryValuesResponse struct { Dataset string `json:"dataset,required"` Key string `json:"key,required"` @@ -2632,12 +2701,13 @@ type ObservabilityTelemetryKeysParams struct { AccountID param.Field[string] `path:"account_id,required"` Datasets param.Field[[]string] `json:"datasets"` Filters param.Field[[]ObservabilityTelemetryKeysParamsFilter] `json:"filters"` + From param.Field[float64] `json:"from"` // Search for a specific substring in the keys. KeyNeedle param.Field[ObservabilityTelemetryKeysParamsKeyNeedle] `json:"keyNeedle"` Limit param.Field[float64] `json:"limit"` - // Search for a specific substring in the event. - Needle param.Field[ObservabilityTelemetryKeysParamsNeedle] `json:"needle"` - Timeframe param.Field[ObservabilityTelemetryKeysParamsTimeframe] `json:"timeframe"` + // Search for a specific substring in any of the events + Needle param.Field[ObservabilityTelemetryKeysParamsNeedle] `json:"needle"` + To param.Field[float64] `json:"to"` } func (r ObservabilityTelemetryKeysParams) MarshalJSON() (data []byte, err error) { @@ -2733,7 +2803,7 @@ type ObservabilityTelemetryKeysParamsKeyNeedleValueUnion interface { ImplementsObservabilityTelemetryKeysParamsKeyNeedleValueUnion() } -// Search for a specific substring in the event. +// Search for a specific substring in any of the events type ObservabilityTelemetryKeysParamsNeedle struct { Value param.Field[ObservabilityTelemetryKeysParamsNeedleValueUnion] `json:"value,required"` IsRegex param.Field[bool] `json:"isRegex"` @@ -2749,46 +2819,58 @@ type ObservabilityTelemetryKeysParamsNeedleValueUnion interface { ImplementsObservabilityTelemetryKeysParamsNeedleValueUnion() } -type ObservabilityTelemetryKeysParamsTimeframe struct { - From param.Field[float64] `json:"from,required"` - To param.Field[float64] `json:"to,required"` -} - -func (r ObservabilityTelemetryKeysParamsTimeframe) MarshalJSON() (data []byte, err error) { - return apijson.MarshalRoot(r) -} - type ObservabilityTelemetryQueryParams struct { - AccountID param.Field[string] `path:"account_id,required"` - QueryID param.Field[string] `json:"queryId,required"` - Timeframe param.Field[ObservabilityTelemetryQueryParamsTimeframe] `json:"timeframe,required"` - Chart param.Field[bool] `json:"chart"` - Compare param.Field[bool] `json:"compare"` - Dry param.Field[bool] `json:"dry"` - Granularity param.Field[float64] `json:"granularity"` - IgnoreSeries param.Field[bool] `json:"ignoreSeries"` - Limit param.Field[float64] `json:"limit"` - Offset param.Field[string] `json:"offset"` - OffsetBy param.Field[float64] `json:"offsetBy"` - OffsetDirection param.Field[string] `json:"offsetDirection"` - Parameters param.Field[ObservabilityTelemetryQueryParamsParameters] `json:"parameters"` - PatternType param.Field[ObservabilityTelemetryQueryParamsPatternType] `json:"patternType"` - View param.Field[ObservabilityTelemetryQueryParamsView] `json:"view"` + AccountID param.Field[string] `path:"account_id,required"` + // Unique identifier for the query to execute + QueryID param.Field[string] `json:"queryId,required"` + // Time range for the query execution + Timeframe param.Field[ObservabilityTelemetryQueryParamsTimeframe] `json:"timeframe,required"` + // Whether to include timeseties data in the response + Chart param.Field[bool] `json:"chart"` + // Whether to include comparison data with previous time periods + Compare param.Field[bool] `json:"compare"` + // Whether to perform a dry run without saving the results of the query. Useful for + // validation + Dry param.Field[bool] `json:"dry"` + // Time granularity for aggregating results (in milliseconds). Controls the + // bucketing of time-series data + Granularity param.Field[float64] `json:"granularity"` + // Whether to ignore time-series data in the results and return only aggregated + // values + IgnoreSeries param.Field[bool] `json:"ignoreSeries"` + // Maximum number of events to return. + Limit param.Field[float64] `json:"limit"` + // Cursor for pagination to retrieve the next set of results + Offset param.Field[string] `json:"offset"` + // Number of events to skip for pagination. Used in conjunction with offset + OffsetBy param.Field[float64] `json:"offsetBy"` + // Direction for offset-based pagination (e.g., 'next', 'prev') + OffsetDirection param.Field[string] `json:"offsetDirection"` + // Optional parameters to pass to the query execution + Parameters param.Field[ObservabilityTelemetryQueryParamsParameters] `json:"parameters"` + // Type of pattern to search for when using pattern-based views + PatternType param.Field[ObservabilityTelemetryQueryParamsPatternType] `json:"patternType"` + // View type for presenting the query results. + View param.Field[ObservabilityTelemetryQueryParamsView] `json:"view"` } func (r ObservabilityTelemetryQueryParams) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +// Time range for the query execution type ObservabilityTelemetryQueryParamsTimeframe struct { + // Start timestamp for the query timeframe (Unix timestamp in milliseconds) From param.Field[float64] `json:"from,required"` - To param.Field[float64] `json:"to,required"` + // End timestamp for the query timeframe (Unix timestamp in milliseconds) + To param.Field[float64] `json:"to,required"` } func (r ObservabilityTelemetryQueryParamsTimeframe) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +// Optional parameters to pass to the query execution type ObservabilityTelemetryQueryParamsParameters struct { // Create Calculations to compute as part of the query. Calculations param.Field[[]ObservabilityTelemetryQueryParamsParametersCalculation] `json:"calculations"` @@ -3081,6 +3163,7 @@ func (r ObservabilityTelemetryQueryParamsParametersOrderByOrder) IsKnown() bool return false } +// Type of pattern to search for when using pattern-based views type ObservabilityTelemetryQueryParamsPatternType string const ( @@ -3096,6 +3179,7 @@ func (r ObservabilityTelemetryQueryParamsPatternType) IsKnown() bool { return false } +// View type for presenting the query results. type ObservabilityTelemetryQueryParamsView string const ( diff --git a/workers/observabilitytelemetry_test.go b/workers/observabilitytelemetry_test.go index 84067560862..f9b5acbefa1 100644 --- a/workers/observabilitytelemetry_test.go +++ b/workers/observabilitytelemetry_test.go @@ -37,6 +37,7 @@ func TestObservabilityTelemetryKeysWithOptionalParams(t *testing.T) { Type: cloudflare.F(workers.ObservabilityTelemetryKeysParamsFiltersTypeString), Value: cloudflare.F[workers.ObservabilityTelemetryKeysParamsFiltersValueUnion](shared.UnionString("string")), }}), + From: cloudflare.F(0.000000), KeyNeedle: cloudflare.F(workers.ObservabilityTelemetryKeysParamsKeyNeedle{ Value: cloudflare.F[workers.ObservabilityTelemetryKeysParamsKeyNeedleValueUnion](shared.UnionString("string")), IsRegex: cloudflare.F(true), @@ -48,10 +49,7 @@ func TestObservabilityTelemetryKeysWithOptionalParams(t *testing.T) { IsRegex: cloudflare.F(true), MatchCase: cloudflare.F(true), }), - Timeframe: cloudflare.F(workers.ObservabilityTelemetryKeysParamsTimeframe{ - From: cloudflare.F(0.000000), - To: cloudflare.F(0.000000), - }), + To: cloudflare.F(0.000000), }) if err != nil { var apierr *cloudflare.Error @@ -87,7 +85,7 @@ func TestObservabilityTelemetryQueryWithOptionalParams(t *testing.T) { Dry: cloudflare.F(true), Granularity: cloudflare.F(0.000000), IgnoreSeries: cloudflare.F(true), - Limit: cloudflare.F(100.000000), + Limit: cloudflare.F(2000.000000), Offset: cloudflare.F("offset"), OffsetBy: cloudflare.F(0.000000), OffsetDirection: cloudflare.F("offsetDirection"), diff --git a/workers/scriptversion.go b/workers/scriptversion.go index 6dc3a24aef0..3e84cf8a885 100644 --- a/workers/scriptversion.go +++ b/workers/scriptversion.go @@ -123,12 +123,16 @@ func (r *ScriptVersionService) Get(ctx context.Context, scriptName string, versi } type ScriptVersionNewResponse struct { - Resources ScriptVersionNewResponseResources `json:"resources,required"` - ID string `json:"id"` - Metadata ScriptVersionNewResponseMetadata `json:"metadata"` - Number float64 `json:"number"` - StartupTimeMs int64 `json:"startup_time_ms"` - JSON scriptVersionNewResponseJSON `json:"-"` + Resources ScriptVersionNewResponseResources `json:"resources,required"` + // Unique identifier for the version. + ID string `json:"id"` + Metadata ScriptVersionNewResponseMetadata `json:"metadata"` + // Sequential version number. + Number float64 `json:"number"` + // Time in milliseconds spent on + // [Worker startup](https://developers.cloudflare.com/workers/platform/limits/#worker-startup-time). + StartupTimeMs int64 `json:"startup_time_ms"` + JSON scriptVersionNewResponseJSON `json:"-"` } // scriptVersionNewResponseJSON contains the JSON metadata for the struct @@ -155,8 +159,9 @@ type ScriptVersionNewResponseResources struct { // List of bindings attached to a Worker. You can find more about bindings on our // docs: // https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. - Bindings []ScriptVersionNewResponseResourcesBinding `json:"bindings"` - Script ScriptVersionNewResponseResourcesScript `json:"script"` + Bindings []ScriptVersionNewResponseResourcesBinding `json:"bindings"` + Script ScriptVersionNewResponseResourcesScript `json:"script"` + // Runtime configuration for the Worker. ScriptRuntime ScriptVersionNewResponseResourcesScriptRuntime `json:"script_runtime"` JSON scriptVersionNewResponseResourcesJSON `json:"-"` } @@ -2084,11 +2089,16 @@ func (r ScriptVersionNewResponseResourcesBindingsJurisdiction) IsKnown() bool { } type ScriptVersionNewResponseResourcesScript struct { - Etag string `json:"etag"` - Handlers []string `json:"handlers"` - LastDeployedFrom string `json:"last_deployed_from"` - NamedHandlers []ScriptVersionNewResponseResourcesScriptNamedHandler `json:"named_handlers"` - JSON scriptVersionNewResponseResourcesScriptJSON `json:"-"` + // Hashed script content + Etag string `json:"etag"` + // The names of handlers exported as part of the default export. + Handlers []string `json:"handlers"` + // The client most recently used to deploy this Worker. + LastDeployedFrom string `json:"last_deployed_from"` + // Named exports, such as Durable Object class implementations and named + // entrypoints. + NamedHandlers []ScriptVersionNewResponseResourcesScriptNamedHandler `json:"named_handlers"` + JSON scriptVersionNewResponseResourcesScriptJSON `json:"-"` } // scriptVersionNewResponseResourcesScriptJSON contains the JSON metadata for the @@ -2111,9 +2121,11 @@ func (r scriptVersionNewResponseResourcesScriptJSON) RawJSON() string { } type ScriptVersionNewResponseResourcesScriptNamedHandler struct { - Handlers []string `json:"handlers"` - Name string `json:"name"` - JSON scriptVersionNewResponseResourcesScriptNamedHandlerJSON `json:"-"` + // The names of handlers exported as part of the named export. + Handlers []string `json:"handlers"` + // The name of the exported class or entrypoint. + Name string `json:"name"` + JSON scriptVersionNewResponseResourcesScriptNamedHandlerJSON `json:"-"` } // scriptVersionNewResponseResourcesScriptNamedHandlerJSON contains the JSON @@ -2133,13 +2145,21 @@ func (r scriptVersionNewResponseResourcesScriptNamedHandlerJSON) RawJSON() strin return r.raw } +// Runtime configuration for the Worker. type ScriptVersionNewResponseResourcesScriptRuntime struct { - CompatibilityDate string `json:"compatibility_date"` - CompatibilityFlags []string `json:"compatibility_flags"` - Limits ScriptVersionNewResponseResourcesScriptRuntimeLimits `json:"limits"` - MigrationTag string `json:"migration_tag"` - UsageModel ScriptVersionNewResponseResourcesScriptRuntimeUsageModel `json:"usage_model"` - JSON scriptVersionNewResponseResourcesScriptRuntimeJSON `json:"-"` + // Date indicating targeted support in the Workers runtime. Backwards incompatible + // fixes to the runtime following this date will not affect this Worker. + CompatibilityDate string `json:"compatibility_date"` + // Flags that enable or disable certain features in the Workers runtime. + CompatibilityFlags []string `json:"compatibility_flags"` + // Resource limits for the Worker. + Limits ScriptVersionNewResponseResourcesScriptRuntimeLimits `json:"limits"` + // The tag of the Durable Object migration that was most recently applied for this + // Worker. + MigrationTag string `json:"migration_tag"` + // Usage model for the Worker invocations. + UsageModel ScriptVersionNewResponseResourcesScriptRuntimeUsageModel `json:"usage_model"` + JSON scriptVersionNewResponseResourcesScriptRuntimeJSON `json:"-"` } // scriptVersionNewResponseResourcesScriptRuntimeJSON contains the JSON metadata @@ -2162,7 +2182,9 @@ func (r scriptVersionNewResponseResourcesScriptRuntimeJSON) RawJSON() string { return r.raw } +// Resource limits for the Worker. type ScriptVersionNewResponseResourcesScriptRuntimeLimits struct { + // The amount of CPU time this Worker can use in milliseconds. CPUMs int64 `json:"cpu_ms"` JSON scriptVersionNewResponseResourcesScriptRuntimeLimitsJSON `json:"-"` } @@ -2183,6 +2205,7 @@ func (r scriptVersionNewResponseResourcesScriptRuntimeLimitsJSON) RawJSON() stri return r.raw } +// Usage model for the Worker invocations. type ScriptVersionNewResponseResourcesScriptRuntimeUsageModel string const ( @@ -2200,13 +2223,19 @@ func (r ScriptVersionNewResponseResourcesScriptRuntimeUsageModel) IsKnown() bool } type ScriptVersionNewResponseMetadata struct { - AuthorEmail string `json:"author_email"` - AuthorID string `json:"author_id"` - CreatedOn string `json:"created_on"` - HasPreview bool `json:"hasPreview"` - ModifiedOn string `json:"modified_on"` - Source ScriptVersionNewResponseMetadataSource `json:"source"` - JSON scriptVersionNewResponseMetadataJSON `json:"-"` + // Email of the user who created the version. + AuthorEmail string `json:"author_email"` + // Identifier of the user who created the version. + AuthorID string `json:"author_id"` + // When the version was created. + CreatedOn string `json:"created_on"` + // Whether the version can be previewed. + HasPreview bool `json:"hasPreview"` + // When the version was last modified. + ModifiedOn string `json:"modified_on"` + // The source of the version upload. + Source ScriptVersionNewResponseMetadataSource `json:"source"` + JSON scriptVersionNewResponseMetadataJSON `json:"-"` } // scriptVersionNewResponseMetadataJSON contains the JSON metadata for the struct @@ -2230,6 +2259,7 @@ func (r scriptVersionNewResponseMetadataJSON) RawJSON() string { return r.raw } +// The source of the version upload. type ScriptVersionNewResponseMetadataSource string const ( @@ -2254,10 +2284,12 @@ func (r ScriptVersionNewResponseMetadataSource) IsKnown() bool { } type ScriptVersionListResponse struct { + // Unique identifier for the version. ID string `json:"id"` Metadata ScriptVersionListResponseMetadata `json:"metadata"` - Number float64 `json:"number"` - JSON scriptVersionListResponseJSON `json:"-"` + // Sequential version number. + Number float64 `json:"number"` + JSON scriptVersionListResponseJSON `json:"-"` } // scriptVersionListResponseJSON contains the JSON metadata for the struct @@ -2279,13 +2311,19 @@ func (r scriptVersionListResponseJSON) RawJSON() string { } type ScriptVersionListResponseMetadata struct { - AuthorEmail string `json:"author_email"` - AuthorID string `json:"author_id"` - CreatedOn string `json:"created_on"` - HasPreview bool `json:"hasPreview"` - ModifiedOn string `json:"modified_on"` - Source ScriptVersionListResponseMetadataSource `json:"source"` - JSON scriptVersionListResponseMetadataJSON `json:"-"` + // Email of the user who created the version. + AuthorEmail string `json:"author_email"` + // Identifier of the user who created the version. + AuthorID string `json:"author_id"` + // When the version was created. + CreatedOn string `json:"created_on"` + // Whether the version can be previewed. + HasPreview bool `json:"hasPreview"` + // When the version was last modified. + ModifiedOn string `json:"modified_on"` + // The source of the version upload. + Source ScriptVersionListResponseMetadataSource `json:"source"` + JSON scriptVersionListResponseMetadataJSON `json:"-"` } // scriptVersionListResponseMetadataJSON contains the JSON metadata for the struct @@ -2309,6 +2347,7 @@ func (r scriptVersionListResponseMetadataJSON) RawJSON() string { return r.raw } +// The source of the version upload. type ScriptVersionListResponseMetadataSource string const ( @@ -2334,10 +2373,12 @@ func (r ScriptVersionListResponseMetadataSource) IsKnown() bool { type ScriptVersionGetResponse struct { Resources ScriptVersionGetResponseResources `json:"resources,required"` - ID string `json:"id"` - Metadata ScriptVersionGetResponseMetadata `json:"metadata"` - Number float64 `json:"number"` - JSON scriptVersionGetResponseJSON `json:"-"` + // Unique identifier for the version. + ID string `json:"id"` + Metadata ScriptVersionGetResponseMetadata `json:"metadata"` + // Sequential version number. + Number float64 `json:"number"` + JSON scriptVersionGetResponseJSON `json:"-"` } // scriptVersionGetResponseJSON contains the JSON metadata for the struct @@ -2363,8 +2404,9 @@ type ScriptVersionGetResponseResources struct { // List of bindings attached to a Worker. You can find more about bindings on our // docs: // https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. - Bindings []ScriptVersionGetResponseResourcesBinding `json:"bindings"` - Script ScriptVersionGetResponseResourcesScript `json:"script"` + Bindings []ScriptVersionGetResponseResourcesBinding `json:"bindings"` + Script ScriptVersionGetResponseResourcesScript `json:"script"` + // Runtime configuration for the Worker. ScriptRuntime ScriptVersionGetResponseResourcesScriptRuntime `json:"script_runtime"` JSON scriptVersionGetResponseResourcesJSON `json:"-"` } @@ -4292,11 +4334,16 @@ func (r ScriptVersionGetResponseResourcesBindingsJurisdiction) IsKnown() bool { } type ScriptVersionGetResponseResourcesScript struct { - Etag string `json:"etag"` - Handlers []string `json:"handlers"` - LastDeployedFrom string `json:"last_deployed_from"` - NamedHandlers []ScriptVersionGetResponseResourcesScriptNamedHandler `json:"named_handlers"` - JSON scriptVersionGetResponseResourcesScriptJSON `json:"-"` + // Hashed script content + Etag string `json:"etag"` + // The names of handlers exported as part of the default export. + Handlers []string `json:"handlers"` + // The client most recently used to deploy this Worker. + LastDeployedFrom string `json:"last_deployed_from"` + // Named exports, such as Durable Object class implementations and named + // entrypoints. + NamedHandlers []ScriptVersionGetResponseResourcesScriptNamedHandler `json:"named_handlers"` + JSON scriptVersionGetResponseResourcesScriptJSON `json:"-"` } // scriptVersionGetResponseResourcesScriptJSON contains the JSON metadata for the @@ -4319,9 +4366,11 @@ func (r scriptVersionGetResponseResourcesScriptJSON) RawJSON() string { } type ScriptVersionGetResponseResourcesScriptNamedHandler struct { - Handlers []string `json:"handlers"` - Name string `json:"name"` - JSON scriptVersionGetResponseResourcesScriptNamedHandlerJSON `json:"-"` + // The names of handlers exported as part of the named export. + Handlers []string `json:"handlers"` + // The name of the exported class or entrypoint. + Name string `json:"name"` + JSON scriptVersionGetResponseResourcesScriptNamedHandlerJSON `json:"-"` } // scriptVersionGetResponseResourcesScriptNamedHandlerJSON contains the JSON @@ -4341,13 +4390,21 @@ func (r scriptVersionGetResponseResourcesScriptNamedHandlerJSON) RawJSON() strin return r.raw } +// Runtime configuration for the Worker. type ScriptVersionGetResponseResourcesScriptRuntime struct { - CompatibilityDate string `json:"compatibility_date"` - CompatibilityFlags []string `json:"compatibility_flags"` - Limits ScriptVersionGetResponseResourcesScriptRuntimeLimits `json:"limits"` - MigrationTag string `json:"migration_tag"` - UsageModel ScriptVersionGetResponseResourcesScriptRuntimeUsageModel `json:"usage_model"` - JSON scriptVersionGetResponseResourcesScriptRuntimeJSON `json:"-"` + // Date indicating targeted support in the Workers runtime. Backwards incompatible + // fixes to the runtime following this date will not affect this Worker. + CompatibilityDate string `json:"compatibility_date"` + // Flags that enable or disable certain features in the Workers runtime. + CompatibilityFlags []string `json:"compatibility_flags"` + // Resource limits for the Worker. + Limits ScriptVersionGetResponseResourcesScriptRuntimeLimits `json:"limits"` + // The tag of the Durable Object migration that was most recently applied for this + // Worker. + MigrationTag string `json:"migration_tag"` + // Usage model for the Worker invocations. + UsageModel ScriptVersionGetResponseResourcesScriptRuntimeUsageModel `json:"usage_model"` + JSON scriptVersionGetResponseResourcesScriptRuntimeJSON `json:"-"` } // scriptVersionGetResponseResourcesScriptRuntimeJSON contains the JSON metadata @@ -4370,7 +4427,9 @@ func (r scriptVersionGetResponseResourcesScriptRuntimeJSON) RawJSON() string { return r.raw } +// Resource limits for the Worker. type ScriptVersionGetResponseResourcesScriptRuntimeLimits struct { + // The amount of CPU time this Worker can use in milliseconds. CPUMs int64 `json:"cpu_ms"` JSON scriptVersionGetResponseResourcesScriptRuntimeLimitsJSON `json:"-"` } @@ -4391,6 +4450,7 @@ func (r scriptVersionGetResponseResourcesScriptRuntimeLimitsJSON) RawJSON() stri return r.raw } +// Usage model for the Worker invocations. type ScriptVersionGetResponseResourcesScriptRuntimeUsageModel string const ( @@ -4408,13 +4468,19 @@ func (r ScriptVersionGetResponseResourcesScriptRuntimeUsageModel) IsKnown() bool } type ScriptVersionGetResponseMetadata struct { - AuthorEmail string `json:"author_email"` - AuthorID string `json:"author_id"` - CreatedOn string `json:"created_on"` - HasPreview bool `json:"hasPreview"` - ModifiedOn string `json:"modified_on"` - Source ScriptVersionGetResponseMetadataSource `json:"source"` - JSON scriptVersionGetResponseMetadataJSON `json:"-"` + // Email of the user who created the version. + AuthorEmail string `json:"author_email"` + // Identifier of the user who created the version. + AuthorID string `json:"author_id"` + // When the version was created. + CreatedOn string `json:"created_on"` + // Whether the version can be previewed. + HasPreview bool `json:"hasPreview"` + // When the version was last modified. + ModifiedOn string `json:"modified_on"` + // The source of the version upload. + Source ScriptVersionGetResponseMetadataSource `json:"source"` + JSON scriptVersionGetResponseMetadataJSON `json:"-"` } // scriptVersionGetResponseMetadataJSON contains the JSON metadata for the struct @@ -4438,6 +4504,7 @@ func (r scriptVersionGetResponseMetadataJSON) RawJSON() string { return r.raw } +// The source of the version upload. type ScriptVersionGetResponseMetadataSource string const ( diff --git a/zero_trust/deviceposture.go b/zero_trust/deviceposture.go index b9c1bc71c49..dcab2931f0a 100644 --- a/zero_trust/deviceposture.go +++ b/zero_trust/deviceposture.go @@ -406,6 +406,8 @@ type DeviceInput struct { Thumbprint string `json:"thumbprint"` // For more details on total score, refer to the Tanium documentation. TotalScore float64 `json:"total_score"` + // Number of days that the antivirus should be updated within. + UpdateWindowDays float64 `json:"update_window_days"` // Version of OS. Version string `json:"version"` // Version Operator. @@ -455,6 +457,7 @@ type deviceInputJSON struct { SubjectAlternativeNames apijson.Field Thumbprint apijson.Field TotalScore apijson.Field + UpdateWindowDays apijson.Field Version apijson.Field VersionOperator apijson.Field raw string @@ -483,7 +486,8 @@ func (r *DeviceInput) UnmarshalJSON(data []byte) (err error) { // [DeviceInputTeamsDevicesAccessSerialNumberListInputRequest], // [DiskEncryptionInput], [DeviceInputTeamsDevicesApplicationInputRequest], // [ClientCertificateInput], -// [DeviceInputTeamsDevicesClientCertificateV2InputRequest], [WorkspaceOneInput], +// [DeviceInputTeamsDevicesClientCertificateV2InputRequest], +// [DeviceInputTeamsDevicesAntivirusInputRequest], [WorkspaceOneInput], // [CrowdstrikeInput], [IntuneInput], [KolideInput], [TaniumInput], // [SentineloneS2sInput], [DeviceInputTeamsDevicesCustomS2sInputRequest]. func (r DeviceInput) AsUnion() DeviceInputUnion { @@ -498,7 +502,8 @@ func (r DeviceInput) AsUnion() DeviceInputUnion { // [DeviceInputTeamsDevicesAccessSerialNumberListInputRequest], // [DiskEncryptionInput], [DeviceInputTeamsDevicesApplicationInputRequest], // [ClientCertificateInput], -// [DeviceInputTeamsDevicesClientCertificateV2InputRequest], [WorkspaceOneInput], +// [DeviceInputTeamsDevicesClientCertificateV2InputRequest], +// [DeviceInputTeamsDevicesAntivirusInputRequest], [WorkspaceOneInput], // [CrowdstrikeInput], [IntuneInput], [KolideInput], [TaniumInput], // [SentineloneS2sInput] or [DeviceInputTeamsDevicesCustomS2sInputRequest]. type DeviceInputUnion interface { @@ -557,6 +562,10 @@ func init() { TypeFilter: gjson.JSON, Type: reflect.TypeOf(DeviceInputTeamsDevicesClientCertificateV2InputRequest{}), }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DeviceInputTeamsDevicesAntivirusInputRequest{}), + }, apijson.UnionVariant{ TypeFilter: gjson.JSON, Type: reflect.TypeOf(WorkspaceOneInput{}), @@ -830,6 +839,30 @@ func (r DeviceInputTeamsDevicesClientCertificateV2InputRequestLocationsTrustStor return false } +type DeviceInputTeamsDevicesAntivirusInputRequest struct { + // Number of days that the antivirus should be updated within. + UpdateWindowDays float64 `json:"update_window_days"` + JSON deviceInputTeamsDevicesAntivirusInputRequestJSON `json:"-"` +} + +// deviceInputTeamsDevicesAntivirusInputRequestJSON contains the JSON metadata for +// the struct [DeviceInputTeamsDevicesAntivirusInputRequest] +type deviceInputTeamsDevicesAntivirusInputRequestJSON struct { + UpdateWindowDays apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DeviceInputTeamsDevicesAntivirusInputRequest) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r deviceInputTeamsDevicesAntivirusInputRequestJSON) RawJSON() string { + return r.raw +} + +func (r DeviceInputTeamsDevicesAntivirusInputRequest) implementsDeviceInput() {} + type DeviceInputTeamsDevicesCustomS2sInputRequest struct { // Posture Integration ID. ConnectionID string `json:"connection_id,required"` @@ -1148,6 +1181,8 @@ type DeviceInputParam struct { Thumbprint param.Field[string] `json:"thumbprint"` // For more details on total score, refer to the Tanium documentation. TotalScore param.Field[float64] `json:"total_score"` + // Number of days that the antivirus should be updated within. + UpdateWindowDays param.Field[float64] `json:"update_window_days"` // Version of OS. Version param.Field[string] `json:"version"` // Version Operator. @@ -1171,6 +1206,7 @@ func (r DeviceInputParam) implementsDeviceInputUnionParam() {} // [zero_trust.DeviceInputTeamsDevicesApplicationInputRequestParam], // [zero_trust.ClientCertificateInputParam], // [zero_trust.DeviceInputTeamsDevicesClientCertificateV2InputRequestParam], +// [zero_trust.DeviceInputTeamsDevicesAntivirusInputRequestParam], // [zero_trust.WorkspaceOneInputParam], [zero_trust.CrowdstrikeInputParam], // [zero_trust.IntuneInputParam], [zero_trust.KolideInputParam], // [zero_trust.TaniumInputParam], [zero_trust.SentineloneS2sInputParam], @@ -1263,6 +1299,17 @@ func (r DeviceInputTeamsDevicesClientCertificateV2InputRequestLocationsParam) Ma return apijson.MarshalRoot(r) } +type DeviceInputTeamsDevicesAntivirusInputRequestParam struct { + // Number of days that the antivirus should be updated within. + UpdateWindowDays param.Field[float64] `json:"update_window_days"` +} + +func (r DeviceInputTeamsDevicesAntivirusInputRequestParam) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r DeviceInputTeamsDevicesAntivirusInputRequestParam) implementsDeviceInputUnionParam() {} + type DeviceInputTeamsDevicesCustomS2sInputRequestParam struct { // Posture Integration ID. ConnectionID param.Field[string] `json:"connection_id,required"` @@ -1388,6 +1435,7 @@ const ( DevicePostureRuleTypeDomainJoined DevicePostureRuleType = "domain_joined" DevicePostureRuleTypeClientCertificate DevicePostureRuleType = "client_certificate" DevicePostureRuleTypeClientCertificateV2 DevicePostureRuleType = "client_certificate_v2" + DevicePostureRuleTypeAntivirus DevicePostureRuleType = "antivirus" DevicePostureRuleTypeUniqueClientID DevicePostureRuleType = "unique_client_id" DevicePostureRuleTypeKolide DevicePostureRuleType = "kolide" DevicePostureRuleTypeTaniumS2s DevicePostureRuleType = "tanium_s2s" @@ -1400,7 +1448,7 @@ const ( func (r DevicePostureRuleType) IsKnown() bool { switch r { - case DevicePostureRuleTypeFile, DevicePostureRuleTypeApplication, DevicePostureRuleTypeTanium, DevicePostureRuleTypeGateway, DevicePostureRuleTypeWARP, DevicePostureRuleTypeDiskEncryption, DevicePostureRuleTypeSerialNumber, DevicePostureRuleTypeSentinelone, DevicePostureRuleTypeCarbonblack, DevicePostureRuleTypeFirewall, DevicePostureRuleTypeOSVersion, DevicePostureRuleTypeDomainJoined, DevicePostureRuleTypeClientCertificate, DevicePostureRuleTypeClientCertificateV2, DevicePostureRuleTypeUniqueClientID, DevicePostureRuleTypeKolide, DevicePostureRuleTypeTaniumS2s, DevicePostureRuleTypeCrowdstrikeS2s, DevicePostureRuleTypeIntune, DevicePostureRuleTypeWorkspaceOne, DevicePostureRuleTypeSentineloneS2s, DevicePostureRuleTypeCustomS2s: + case DevicePostureRuleTypeFile, DevicePostureRuleTypeApplication, DevicePostureRuleTypeTanium, DevicePostureRuleTypeGateway, DevicePostureRuleTypeWARP, DevicePostureRuleTypeDiskEncryption, DevicePostureRuleTypeSerialNumber, DevicePostureRuleTypeSentinelone, DevicePostureRuleTypeCarbonblack, DevicePostureRuleTypeFirewall, DevicePostureRuleTypeOSVersion, DevicePostureRuleTypeDomainJoined, DevicePostureRuleTypeClientCertificate, DevicePostureRuleTypeClientCertificateV2, DevicePostureRuleTypeAntivirus, DevicePostureRuleTypeUniqueClientID, DevicePostureRuleTypeKolide, DevicePostureRuleTypeTaniumS2s, DevicePostureRuleTypeCrowdstrikeS2s, DevicePostureRuleTypeIntune, DevicePostureRuleTypeWorkspaceOne, DevicePostureRuleTypeSentineloneS2s, DevicePostureRuleTypeCustomS2s: return true } return false @@ -2329,6 +2377,7 @@ const ( DevicePostureNewParamsTypeDomainJoined DevicePostureNewParamsType = "domain_joined" DevicePostureNewParamsTypeClientCertificate DevicePostureNewParamsType = "client_certificate" DevicePostureNewParamsTypeClientCertificateV2 DevicePostureNewParamsType = "client_certificate_v2" + DevicePostureNewParamsTypeAntivirus DevicePostureNewParamsType = "antivirus" DevicePostureNewParamsTypeUniqueClientID DevicePostureNewParamsType = "unique_client_id" DevicePostureNewParamsTypeKolide DevicePostureNewParamsType = "kolide" DevicePostureNewParamsTypeTaniumS2s DevicePostureNewParamsType = "tanium_s2s" @@ -2341,7 +2390,7 @@ const ( func (r DevicePostureNewParamsType) IsKnown() bool { switch r { - case DevicePostureNewParamsTypeFile, DevicePostureNewParamsTypeApplication, DevicePostureNewParamsTypeTanium, DevicePostureNewParamsTypeGateway, DevicePostureNewParamsTypeWARP, DevicePostureNewParamsTypeDiskEncryption, DevicePostureNewParamsTypeSerialNumber, DevicePostureNewParamsTypeSentinelone, DevicePostureNewParamsTypeCarbonblack, DevicePostureNewParamsTypeFirewall, DevicePostureNewParamsTypeOSVersion, DevicePostureNewParamsTypeDomainJoined, DevicePostureNewParamsTypeClientCertificate, DevicePostureNewParamsTypeClientCertificateV2, DevicePostureNewParamsTypeUniqueClientID, DevicePostureNewParamsTypeKolide, DevicePostureNewParamsTypeTaniumS2s, DevicePostureNewParamsTypeCrowdstrikeS2s, DevicePostureNewParamsTypeIntune, DevicePostureNewParamsTypeWorkspaceOne, DevicePostureNewParamsTypeSentineloneS2s, DevicePostureNewParamsTypeCustomS2s: + case DevicePostureNewParamsTypeFile, DevicePostureNewParamsTypeApplication, DevicePostureNewParamsTypeTanium, DevicePostureNewParamsTypeGateway, DevicePostureNewParamsTypeWARP, DevicePostureNewParamsTypeDiskEncryption, DevicePostureNewParamsTypeSerialNumber, DevicePostureNewParamsTypeSentinelone, DevicePostureNewParamsTypeCarbonblack, DevicePostureNewParamsTypeFirewall, DevicePostureNewParamsTypeOSVersion, DevicePostureNewParamsTypeDomainJoined, DevicePostureNewParamsTypeClientCertificate, DevicePostureNewParamsTypeClientCertificateV2, DevicePostureNewParamsTypeAntivirus, DevicePostureNewParamsTypeUniqueClientID, DevicePostureNewParamsTypeKolide, DevicePostureNewParamsTypeTaniumS2s, DevicePostureNewParamsTypeCrowdstrikeS2s, DevicePostureNewParamsTypeIntune, DevicePostureNewParamsTypeWorkspaceOne, DevicePostureNewParamsTypeSentineloneS2s, DevicePostureNewParamsTypeCustomS2s: return true } return false @@ -2432,6 +2481,7 @@ const ( DevicePostureUpdateParamsTypeDomainJoined DevicePostureUpdateParamsType = "domain_joined" DevicePostureUpdateParamsTypeClientCertificate DevicePostureUpdateParamsType = "client_certificate" DevicePostureUpdateParamsTypeClientCertificateV2 DevicePostureUpdateParamsType = "client_certificate_v2" + DevicePostureUpdateParamsTypeAntivirus DevicePostureUpdateParamsType = "antivirus" DevicePostureUpdateParamsTypeUniqueClientID DevicePostureUpdateParamsType = "unique_client_id" DevicePostureUpdateParamsTypeKolide DevicePostureUpdateParamsType = "kolide" DevicePostureUpdateParamsTypeTaniumS2s DevicePostureUpdateParamsType = "tanium_s2s" @@ -2444,7 +2494,7 @@ const ( func (r DevicePostureUpdateParamsType) IsKnown() bool { switch r { - case DevicePostureUpdateParamsTypeFile, DevicePostureUpdateParamsTypeApplication, DevicePostureUpdateParamsTypeTanium, DevicePostureUpdateParamsTypeGateway, DevicePostureUpdateParamsTypeWARP, DevicePostureUpdateParamsTypeDiskEncryption, DevicePostureUpdateParamsTypeSerialNumber, DevicePostureUpdateParamsTypeSentinelone, DevicePostureUpdateParamsTypeCarbonblack, DevicePostureUpdateParamsTypeFirewall, DevicePostureUpdateParamsTypeOSVersion, DevicePostureUpdateParamsTypeDomainJoined, DevicePostureUpdateParamsTypeClientCertificate, DevicePostureUpdateParamsTypeClientCertificateV2, DevicePostureUpdateParamsTypeUniqueClientID, DevicePostureUpdateParamsTypeKolide, DevicePostureUpdateParamsTypeTaniumS2s, DevicePostureUpdateParamsTypeCrowdstrikeS2s, DevicePostureUpdateParamsTypeIntune, DevicePostureUpdateParamsTypeWorkspaceOne, DevicePostureUpdateParamsTypeSentineloneS2s, DevicePostureUpdateParamsTypeCustomS2s: + case DevicePostureUpdateParamsTypeFile, DevicePostureUpdateParamsTypeApplication, DevicePostureUpdateParamsTypeTanium, DevicePostureUpdateParamsTypeGateway, DevicePostureUpdateParamsTypeWARP, DevicePostureUpdateParamsTypeDiskEncryption, DevicePostureUpdateParamsTypeSerialNumber, DevicePostureUpdateParamsTypeSentinelone, DevicePostureUpdateParamsTypeCarbonblack, DevicePostureUpdateParamsTypeFirewall, DevicePostureUpdateParamsTypeOSVersion, DevicePostureUpdateParamsTypeDomainJoined, DevicePostureUpdateParamsTypeClientCertificate, DevicePostureUpdateParamsTypeClientCertificateV2, DevicePostureUpdateParamsTypeAntivirus, DevicePostureUpdateParamsTypeUniqueClientID, DevicePostureUpdateParamsTypeKolide, DevicePostureUpdateParamsTypeTaniumS2s, DevicePostureUpdateParamsTypeCrowdstrikeS2s, DevicePostureUpdateParamsTypeIntune, DevicePostureUpdateParamsTypeWorkspaceOne, DevicePostureUpdateParamsTypeSentineloneS2s, DevicePostureUpdateParamsTypeCustomS2s: return true } return false diff --git a/zero_trust/devicesetting.go b/zero_trust/devicesetting.go index 3e696a123cc..6745f5b1ea4 100644 --- a/zero_trust/devicesetting.go +++ b/zero_trust/devicesetting.go @@ -107,6 +107,20 @@ type DeviceSettings struct { // Sets the time limit, in seconds, that a user can use an override code to bypass // WARP. DisableForTime float64 `json:"disable_for_time"` + // Controls whether the external emergency disconnect feature is enabled. + ExternalEmergencySignalEnabled bool `json:"external_emergency_signal_enabled"` + // The SHA256 fingerprint (64 hexadecimal characters) of the HTTPS server + // certificate for the external_emergency_signal_url. If provided, the WARP client + // will use this value to verify the server's identity. The device will ignore any + // response if the server's certificate fingerprint does not exactly match this + // value. + ExternalEmergencySignalFingerprint string `json:"external_emergency_signal_fingerprint"` + // The interval at which the WARP client fetches the emergency disconnect signal, + // formatted as a duration string (e.g., "5m", "2m30s", "1h"). Minimum 30 seconds. + ExternalEmergencySignalInterval string `json:"external_emergency_signal_interval"` + // The HTTPS URL from which to fetch the emergency disconnect signal. Must use + // HTTPS and have an IPv4 or IPv6 address as the host. + ExternalEmergencySignalURL string `json:"external_emergency_signal_url"` // Enable gateway proxy filtering on TCP. GatewayProxyEnabled bool `json:"gateway_proxy_enabled"` // Enable gateway proxy filtering on UDP. @@ -121,6 +135,10 @@ type DeviceSettings struct { // deviceSettingsJSON contains the JSON metadata for the struct [DeviceSettings] type deviceSettingsJSON struct { DisableForTime apijson.Field + ExternalEmergencySignalEnabled apijson.Field + ExternalEmergencySignalFingerprint apijson.Field + ExternalEmergencySignalInterval apijson.Field + ExternalEmergencySignalURL apijson.Field GatewayProxyEnabled apijson.Field GatewayUdpProxyEnabled apijson.Field RootCertificateInstallationEnabled apijson.Field @@ -141,6 +159,20 @@ type DeviceSettingsParam struct { // Sets the time limit, in seconds, that a user can use an override code to bypass // WARP. DisableForTime param.Field[float64] `json:"disable_for_time"` + // Controls whether the external emergency disconnect feature is enabled. + ExternalEmergencySignalEnabled param.Field[bool] `json:"external_emergency_signal_enabled"` + // The SHA256 fingerprint (64 hexadecimal characters) of the HTTPS server + // certificate for the external_emergency_signal_url. If provided, the WARP client + // will use this value to verify the server's identity. The device will ignore any + // response if the server's certificate fingerprint does not exactly match this + // value. + ExternalEmergencySignalFingerprint param.Field[string] `json:"external_emergency_signal_fingerprint"` + // The interval at which the WARP client fetches the emergency disconnect signal, + // formatted as a duration string (e.g., "5m", "2m30s", "1h"). Minimum 30 seconds. + ExternalEmergencySignalInterval param.Field[string] `json:"external_emergency_signal_interval"` + // The HTTPS URL from which to fetch the emergency disconnect signal. Must use + // HTTPS and have an IPv4 or IPv6 address as the host. + ExternalEmergencySignalURL param.Field[string] `json:"external_emergency_signal_url"` // Enable gateway proxy filtering on TCP. GatewayProxyEnabled param.Field[bool] `json:"gateway_proxy_enabled"` // Enable gateway proxy filtering on UDP. diff --git a/zero_trust/devicesetting_test.go b/zero_trust/devicesetting_test.go index 624104233f1..046d40cffcd 100644 --- a/zero_trust/devicesetting_test.go +++ b/zero_trust/devicesetting_test.go @@ -31,6 +31,10 @@ func TestDeviceSettingUpdateWithOptionalParams(t *testing.T) { AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), DeviceSettings: zero_trust.DeviceSettingsParam{ DisableForTime: cloudflare.F(0.000000), + ExternalEmergencySignalEnabled: cloudflare.F(true), + ExternalEmergencySignalFingerprint: cloudflare.F("abcd1234567890abcd1234567890abcd1234567890abcd1234567890abcd1234"), + ExternalEmergencySignalInterval: cloudflare.F("5m"), + ExternalEmergencySignalURL: cloudflare.F("https://192.0.2.1/signal"), GatewayProxyEnabled: cloudflare.F(true), GatewayUdpProxyEnabled: cloudflare.F(true), RootCertificateInstallationEnabled: cloudflare.F(true), @@ -88,6 +92,10 @@ func TestDeviceSettingEditWithOptionalParams(t *testing.T) { AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"), DeviceSettings: zero_trust.DeviceSettingsParam{ DisableForTime: cloudflare.F(0.000000), + ExternalEmergencySignalEnabled: cloudflare.F(true), + ExternalEmergencySignalFingerprint: cloudflare.F("abcd1234567890abcd1234567890abcd1234567890abcd1234567890abcd1234"), + ExternalEmergencySignalInterval: cloudflare.F("5m"), + ExternalEmergencySignalURL: cloudflare.F("https://192.0.2.1/signal"), GatewayProxyEnabled: cloudflare.F(true), GatewayUdpProxyEnabled: cloudflare.F(true), RootCertificateInstallationEnabled: cloudflare.F(true), diff --git a/zero_trust/dlpdataset.go b/zero_trust/dlpdataset.go index 00010717029..ee2825c1a49 100644 --- a/zero_trust/dlpdataset.go +++ b/zero_trust/dlpdataset.go @@ -41,7 +41,7 @@ func NewDLPDatasetService(opts ...option.RequestOption) (r *DLPDatasetService) { } // Create a new dataset -func (r *DLPDatasetService) New(ctx context.Context, params DLPDatasetNewParams, opts ...option.RequestOption) (res *DatasetCreation, err error) { +func (r *DLPDatasetService) New(ctx context.Context, params DLPDatasetNewParams, opts ...option.RequestOption) (res *DLPDatasetNewResponse, err error) { var env DLPDatasetNewResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { @@ -58,7 +58,7 @@ func (r *DLPDatasetService) New(ctx context.Context, params DLPDatasetNewParams, } // Update details about a dataset -func (r *DLPDatasetService) Update(ctx context.Context, datasetID string, params DLPDatasetUpdateParams, opts ...option.RequestOption) (res *Dataset, err error) { +func (r *DLPDatasetService) Update(ctx context.Context, datasetID string, params DLPDatasetUpdateParams, opts ...option.RequestOption) (res *DLPDatasetUpdateResponse, err error) { var env DLPDatasetUpdateResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { @@ -123,7 +123,7 @@ func (r *DLPDatasetService) Delete(ctx context.Context, datasetID string, body D } // Fetch a specific dataset -func (r *DLPDatasetService) Get(ctx context.Context, datasetID string, query DLPDatasetGetParams, opts ...option.RequestOption) (res *Dataset, err error) { +func (r *DLPDatasetService) Get(ctx context.Context, datasetID string, query DLPDatasetGetParams, opts ...option.RequestOption) (res *DLPDatasetGetResponse, err error) { var env DLPDatasetGetResponseEnvelope opts = slices.Concat(r.Options, opts) if query.AccountID.Value == "" { @@ -152,7 +152,7 @@ type Dataset struct { NumCells int64 `json:"num_cells,required"` Secret bool `json:"secret,required"` Status DatasetStatus `json:"status,required"` - // When the dataset was last updated. + // Stores when the dataset was last updated. // // This includes name or description changes as well as uploads. UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` @@ -296,23 +296,23 @@ func (r DatasetUploadsStatus) IsKnown() bool { return false } -type DatasetArray []Dataset - -type DatasetCreation struct { +type DLPDatasetNewResponse struct { Dataset Dataset `json:"dataset,required"` // Encoding version to use for dataset. EncodingVersion int64 `json:"encoding_version,required"` MaxCells int64 `json:"max_cells,required"` // The version to use when uploading the dataset. Version int64 `json:"version,required"` - // The secret to use for Exact Data Match datasets. This is not present in Custom - // Wordlists. - Secret string `json:"secret" format:"password"` - JSON datasetCreationJSON `json:"-"` + // The secret to use for Exact Data Match datasets. + // + // This is not present in Custom Wordlists. + Secret string `json:"secret" format:"password"` + JSON dlpDatasetNewResponseJSON `json:"-"` } -// datasetCreationJSON contains the JSON metadata for the struct [DatasetCreation] -type datasetCreationJSON struct { +// dlpDatasetNewResponseJSON contains the JSON metadata for the struct +// [DLPDatasetNewResponse] +type dlpDatasetNewResponseJSON struct { Dataset apijson.Field EncodingVersion apijson.Field MaxCells apijson.Field @@ -322,14 +322,326 @@ type datasetCreationJSON struct { ExtraFields map[string]apijson.Field } -func (r *DatasetCreation) UnmarshalJSON(data []byte) (err error) { +func (r *DLPDatasetNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpDatasetNewResponseJSON) RawJSON() string { + return r.raw +} + +type DLPDatasetUpdateResponse struct { + ID string `json:"id,required" format:"uuid"` + Columns []DLPDatasetUpdateResponseColumn `json:"columns,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + EncodingVersion int64 `json:"encoding_version,required"` + Name string `json:"name,required"` + NumCells int64 `json:"num_cells,required"` + Secret bool `json:"secret,required"` + Status DLPDatasetUpdateResponseStatus `json:"status,required"` + // Stores when the dataset was last updated. + // + // This includes name or description changes as well as uploads. + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Uploads []DLPDatasetUpdateResponseUpload `json:"uploads,required"` + CaseSensitive bool `json:"case_sensitive"` + // The description of the dataset. + Description string `json:"description,nullable"` + JSON dlpDatasetUpdateResponseJSON `json:"-"` +} + +// dlpDatasetUpdateResponseJSON contains the JSON metadata for the struct +// [DLPDatasetUpdateResponse] +type dlpDatasetUpdateResponseJSON struct { + ID apijson.Field + Columns apijson.Field + CreatedAt apijson.Field + EncodingVersion apijson.Field + Name apijson.Field + NumCells apijson.Field + Secret apijson.Field + Status apijson.Field + UpdatedAt apijson.Field + Uploads apijson.Field + CaseSensitive apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPDatasetUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpDatasetUpdateResponseJSON) RawJSON() string { + return r.raw +} + +type DLPDatasetUpdateResponseColumn struct { + EntryID string `json:"entry_id,required" format:"uuid"` + HeaderName string `json:"header_name,required"` + NumCells int64 `json:"num_cells,required"` + UploadStatus DLPDatasetUpdateResponseColumnsUploadStatus `json:"upload_status,required"` + JSON dlpDatasetUpdateResponseColumnJSON `json:"-"` +} + +// dlpDatasetUpdateResponseColumnJSON contains the JSON metadata for the struct +// [DLPDatasetUpdateResponseColumn] +type dlpDatasetUpdateResponseColumnJSON struct { + EntryID apijson.Field + HeaderName apijson.Field + NumCells apijson.Field + UploadStatus apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPDatasetUpdateResponseColumn) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpDatasetUpdateResponseColumnJSON) RawJSON() string { + return r.raw +} + +type DLPDatasetUpdateResponseColumnsUploadStatus string + +const ( + DLPDatasetUpdateResponseColumnsUploadStatusEmpty DLPDatasetUpdateResponseColumnsUploadStatus = "empty" + DLPDatasetUpdateResponseColumnsUploadStatusUploading DLPDatasetUpdateResponseColumnsUploadStatus = "uploading" + DLPDatasetUpdateResponseColumnsUploadStatusPending DLPDatasetUpdateResponseColumnsUploadStatus = "pending" + DLPDatasetUpdateResponseColumnsUploadStatusProcessing DLPDatasetUpdateResponseColumnsUploadStatus = "processing" + DLPDatasetUpdateResponseColumnsUploadStatusFailed DLPDatasetUpdateResponseColumnsUploadStatus = "failed" + DLPDatasetUpdateResponseColumnsUploadStatusComplete DLPDatasetUpdateResponseColumnsUploadStatus = "complete" +) + +func (r DLPDatasetUpdateResponseColumnsUploadStatus) IsKnown() bool { + switch r { + case DLPDatasetUpdateResponseColumnsUploadStatusEmpty, DLPDatasetUpdateResponseColumnsUploadStatusUploading, DLPDatasetUpdateResponseColumnsUploadStatusPending, DLPDatasetUpdateResponseColumnsUploadStatusProcessing, DLPDatasetUpdateResponseColumnsUploadStatusFailed, DLPDatasetUpdateResponseColumnsUploadStatusComplete: + return true + } + return false +} + +type DLPDatasetUpdateResponseStatus string + +const ( + DLPDatasetUpdateResponseStatusEmpty DLPDatasetUpdateResponseStatus = "empty" + DLPDatasetUpdateResponseStatusUploading DLPDatasetUpdateResponseStatus = "uploading" + DLPDatasetUpdateResponseStatusPending DLPDatasetUpdateResponseStatus = "pending" + DLPDatasetUpdateResponseStatusProcessing DLPDatasetUpdateResponseStatus = "processing" + DLPDatasetUpdateResponseStatusFailed DLPDatasetUpdateResponseStatus = "failed" + DLPDatasetUpdateResponseStatusComplete DLPDatasetUpdateResponseStatus = "complete" +) + +func (r DLPDatasetUpdateResponseStatus) IsKnown() bool { + switch r { + case DLPDatasetUpdateResponseStatusEmpty, DLPDatasetUpdateResponseStatusUploading, DLPDatasetUpdateResponseStatusPending, DLPDatasetUpdateResponseStatusProcessing, DLPDatasetUpdateResponseStatusFailed, DLPDatasetUpdateResponseStatusComplete: + return true + } + return false +} + +type DLPDatasetUpdateResponseUpload struct { + NumCells int64 `json:"num_cells,required"` + Status DLPDatasetUpdateResponseUploadsStatus `json:"status,required"` + Version int64 `json:"version,required"` + JSON dlpDatasetUpdateResponseUploadJSON `json:"-"` +} + +// dlpDatasetUpdateResponseUploadJSON contains the JSON metadata for the struct +// [DLPDatasetUpdateResponseUpload] +type dlpDatasetUpdateResponseUploadJSON struct { + NumCells apijson.Field + Status apijson.Field + Version apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPDatasetUpdateResponseUpload) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpDatasetUpdateResponseUploadJSON) RawJSON() string { + return r.raw +} + +type DLPDatasetUpdateResponseUploadsStatus string + +const ( + DLPDatasetUpdateResponseUploadsStatusEmpty DLPDatasetUpdateResponseUploadsStatus = "empty" + DLPDatasetUpdateResponseUploadsStatusUploading DLPDatasetUpdateResponseUploadsStatus = "uploading" + DLPDatasetUpdateResponseUploadsStatusPending DLPDatasetUpdateResponseUploadsStatus = "pending" + DLPDatasetUpdateResponseUploadsStatusProcessing DLPDatasetUpdateResponseUploadsStatus = "processing" + DLPDatasetUpdateResponseUploadsStatusFailed DLPDatasetUpdateResponseUploadsStatus = "failed" + DLPDatasetUpdateResponseUploadsStatusComplete DLPDatasetUpdateResponseUploadsStatus = "complete" +) + +func (r DLPDatasetUpdateResponseUploadsStatus) IsKnown() bool { + switch r { + case DLPDatasetUpdateResponseUploadsStatusEmpty, DLPDatasetUpdateResponseUploadsStatusUploading, DLPDatasetUpdateResponseUploadsStatusPending, DLPDatasetUpdateResponseUploadsStatusProcessing, DLPDatasetUpdateResponseUploadsStatusFailed, DLPDatasetUpdateResponseUploadsStatusComplete: + return true + } + return false +} + +type DLPDatasetGetResponse struct { + ID string `json:"id,required" format:"uuid"` + Columns []DLPDatasetGetResponseColumn `json:"columns,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + EncodingVersion int64 `json:"encoding_version,required"` + Name string `json:"name,required"` + NumCells int64 `json:"num_cells,required"` + Secret bool `json:"secret,required"` + Status DLPDatasetGetResponseStatus `json:"status,required"` + // Stores when the dataset was last updated. + // + // This includes name or description changes as well as uploads. + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Uploads []DLPDatasetGetResponseUpload `json:"uploads,required"` + CaseSensitive bool `json:"case_sensitive"` + // The description of the dataset. + Description string `json:"description,nullable"` + JSON dlpDatasetGetResponseJSON `json:"-"` +} + +// dlpDatasetGetResponseJSON contains the JSON metadata for the struct +// [DLPDatasetGetResponse] +type dlpDatasetGetResponseJSON struct { + ID apijson.Field + Columns apijson.Field + CreatedAt apijson.Field + EncodingVersion apijson.Field + Name apijson.Field + NumCells apijson.Field + Secret apijson.Field + Status apijson.Field + UpdatedAt apijson.Field + Uploads apijson.Field + CaseSensitive apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPDatasetGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpDatasetGetResponseJSON) RawJSON() string { + return r.raw +} + +type DLPDatasetGetResponseColumn struct { + EntryID string `json:"entry_id,required" format:"uuid"` + HeaderName string `json:"header_name,required"` + NumCells int64 `json:"num_cells,required"` + UploadStatus DLPDatasetGetResponseColumnsUploadStatus `json:"upload_status,required"` + JSON dlpDatasetGetResponseColumnJSON `json:"-"` +} + +// dlpDatasetGetResponseColumnJSON contains the JSON metadata for the struct +// [DLPDatasetGetResponseColumn] +type dlpDatasetGetResponseColumnJSON struct { + EntryID apijson.Field + HeaderName apijson.Field + NumCells apijson.Field + UploadStatus apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPDatasetGetResponseColumn) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r datasetCreationJSON) RawJSON() string { +func (r dlpDatasetGetResponseColumnJSON) RawJSON() string { return r.raw } +type DLPDatasetGetResponseColumnsUploadStatus string + +const ( + DLPDatasetGetResponseColumnsUploadStatusEmpty DLPDatasetGetResponseColumnsUploadStatus = "empty" + DLPDatasetGetResponseColumnsUploadStatusUploading DLPDatasetGetResponseColumnsUploadStatus = "uploading" + DLPDatasetGetResponseColumnsUploadStatusPending DLPDatasetGetResponseColumnsUploadStatus = "pending" + DLPDatasetGetResponseColumnsUploadStatusProcessing DLPDatasetGetResponseColumnsUploadStatus = "processing" + DLPDatasetGetResponseColumnsUploadStatusFailed DLPDatasetGetResponseColumnsUploadStatus = "failed" + DLPDatasetGetResponseColumnsUploadStatusComplete DLPDatasetGetResponseColumnsUploadStatus = "complete" +) + +func (r DLPDatasetGetResponseColumnsUploadStatus) IsKnown() bool { + switch r { + case DLPDatasetGetResponseColumnsUploadStatusEmpty, DLPDatasetGetResponseColumnsUploadStatusUploading, DLPDatasetGetResponseColumnsUploadStatusPending, DLPDatasetGetResponseColumnsUploadStatusProcessing, DLPDatasetGetResponseColumnsUploadStatusFailed, DLPDatasetGetResponseColumnsUploadStatusComplete: + return true + } + return false +} + +type DLPDatasetGetResponseStatus string + +const ( + DLPDatasetGetResponseStatusEmpty DLPDatasetGetResponseStatus = "empty" + DLPDatasetGetResponseStatusUploading DLPDatasetGetResponseStatus = "uploading" + DLPDatasetGetResponseStatusPending DLPDatasetGetResponseStatus = "pending" + DLPDatasetGetResponseStatusProcessing DLPDatasetGetResponseStatus = "processing" + DLPDatasetGetResponseStatusFailed DLPDatasetGetResponseStatus = "failed" + DLPDatasetGetResponseStatusComplete DLPDatasetGetResponseStatus = "complete" +) + +func (r DLPDatasetGetResponseStatus) IsKnown() bool { + switch r { + case DLPDatasetGetResponseStatusEmpty, DLPDatasetGetResponseStatusUploading, DLPDatasetGetResponseStatusPending, DLPDatasetGetResponseStatusProcessing, DLPDatasetGetResponseStatusFailed, DLPDatasetGetResponseStatusComplete: + return true + } + return false +} + +type DLPDatasetGetResponseUpload struct { + NumCells int64 `json:"num_cells,required"` + Status DLPDatasetGetResponseUploadsStatus `json:"status,required"` + Version int64 `json:"version,required"` + JSON dlpDatasetGetResponseUploadJSON `json:"-"` +} + +// dlpDatasetGetResponseUploadJSON contains the JSON metadata for the struct +// [DLPDatasetGetResponseUpload] +type dlpDatasetGetResponseUploadJSON struct { + NumCells apijson.Field + Status apijson.Field + Version apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPDatasetGetResponseUpload) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpDatasetGetResponseUploadJSON) RawJSON() string { + return r.raw +} + +type DLPDatasetGetResponseUploadsStatus string + +const ( + DLPDatasetGetResponseUploadsStatusEmpty DLPDatasetGetResponseUploadsStatus = "empty" + DLPDatasetGetResponseUploadsStatusUploading DLPDatasetGetResponseUploadsStatus = "uploading" + DLPDatasetGetResponseUploadsStatusPending DLPDatasetGetResponseUploadsStatus = "pending" + DLPDatasetGetResponseUploadsStatusProcessing DLPDatasetGetResponseUploadsStatus = "processing" + DLPDatasetGetResponseUploadsStatusFailed DLPDatasetGetResponseUploadsStatus = "failed" + DLPDatasetGetResponseUploadsStatusComplete DLPDatasetGetResponseUploadsStatus = "complete" +) + +func (r DLPDatasetGetResponseUploadsStatus) IsKnown() bool { + switch r { + case DLPDatasetGetResponseUploadsStatusEmpty, DLPDatasetGetResponseUploadsStatusUploading, DLPDatasetGetResponseUploadsStatusPending, DLPDatasetGetResponseUploadsStatusProcessing, DLPDatasetGetResponseUploadsStatusFailed, DLPDatasetGetResponseUploadsStatusComplete: + return true + } + return false +} + type DLPDatasetNewParams struct { AccountID param.Field[string] `path:"account_id,required"` Name param.Field[string] `json:"name,required"` @@ -361,7 +673,7 @@ type DLPDatasetNewResponseEnvelope struct { Messages []DLPDatasetNewResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPDatasetNewResponseEnvelopeSuccess `json:"success,required"` - Result DatasetCreation `json:"result"` + Result DLPDatasetNewResponse `json:"result"` JSON dlpDatasetNewResponseEnvelopeJSON `json:"-"` } @@ -516,7 +828,7 @@ type DLPDatasetUpdateResponseEnvelope struct { Messages []DLPDatasetUpdateResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPDatasetUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Dataset `json:"result"` + Result DLPDatasetUpdateResponse `json:"result"` JSON dlpDatasetUpdateResponseEnvelopeJSON `json:"-"` } @@ -667,7 +979,7 @@ type DLPDatasetGetResponseEnvelope struct { Messages []DLPDatasetGetResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPDatasetGetResponseEnvelopeSuccess `json:"success,required"` - Result Dataset `json:"result"` + Result DLPDatasetGetResponse `json:"result"` JSON dlpDatasetGetResponseEnvelopeJSON `json:"-"` } diff --git a/zero_trust/dlpdatasetupload.go b/zero_trust/dlpdatasetupload.go index 145fd43662a..7774141ce03 100644 --- a/zero_trust/dlpdatasetupload.go +++ b/zero_trust/dlpdatasetupload.go @@ -11,6 +11,7 @@ import ( "mime/multipart" "net/http" "slices" + "time" "github.com/cloudflare/cloudflare-go/v6/internal/apiform" "github.com/cloudflare/cloudflare-go/v6/internal/apijson" @@ -39,7 +40,7 @@ func NewDLPDatasetUploadService(opts ...option.RequestOption) (r *DLPDatasetUplo } // Prepare to upload a new version of a dataset -func (r *DLPDatasetUploadService) New(ctx context.Context, datasetID string, body DLPDatasetUploadNewParams, opts ...option.RequestOption) (res *NewVersion, err error) { +func (r *DLPDatasetUploadService) New(ctx context.Context, datasetID string, body DLPDatasetUploadNewParams, opts ...option.RequestOption) (res *DLPDatasetUploadNewResponse, err error) { var env DLPDatasetUploadNewResponseEnvelope opts = slices.Concat(r.Options, opts) if body.AccountID.Value == "" { @@ -63,7 +64,7 @@ func (r *DLPDatasetUploadService) New(ctx context.Context, datasetID string, bod // only be created in the Cloudflare dashboard. For other clients, this operation // can only be used for non-secret Custom Word Lists. The body must be a UTF-8 // encoded, newline (NL or CRNL) separated list of words to be matched. -func (r *DLPDatasetUploadService) Edit(ctx context.Context, datasetID string, version int64, dataset io.Reader, body DLPDatasetUploadEditParams, opts ...option.RequestOption) (res *Dataset, err error) { +func (r *DLPDatasetUploadService) Edit(ctx context.Context, datasetID string, version int64, dataset io.Reader, body DLPDatasetUploadEditParams, opts ...option.RequestOption) (res *DLPDatasetUploadEditResponse, err error) { var env DLPDatasetUploadEditResponseEnvelope opts = slices.Concat(r.Options, opts) opts = append([]option.RequestOption{option.WithRequestBody("application/octet-stream", dataset)}, opts...) @@ -84,18 +85,19 @@ func (r *DLPDatasetUploadService) Edit(ctx context.Context, datasetID string, ve return } -type NewVersion struct { - EncodingVersion int64 `json:"encoding_version,required"` - MaxCells int64 `json:"max_cells,required"` - Version int64 `json:"version,required"` - CaseSensitive bool `json:"case_sensitive"` - Columns []NewVersionColumn `json:"columns"` - Secret string `json:"secret" format:"password"` - JSON newVersionJSON `json:"-"` +type DLPDatasetUploadNewResponse struct { + EncodingVersion int64 `json:"encoding_version,required"` + MaxCells int64 `json:"max_cells,required"` + Version int64 `json:"version,required"` + CaseSensitive bool `json:"case_sensitive"` + Columns []DLPDatasetUploadNewResponseColumn `json:"columns"` + Secret string `json:"secret" format:"password"` + JSON dlpDatasetUploadNewResponseJSON `json:"-"` } -// newVersionJSON contains the JSON metadata for the struct [NewVersion] -type newVersionJSON struct { +// dlpDatasetUploadNewResponseJSON contains the JSON metadata for the struct +// [DLPDatasetUploadNewResponse] +type dlpDatasetUploadNewResponseJSON struct { EncodingVersion apijson.Field MaxCells apijson.Field Version apijson.Field @@ -106,25 +108,25 @@ type newVersionJSON struct { ExtraFields map[string]apijson.Field } -func (r *NewVersion) UnmarshalJSON(data []byte) (err error) { +func (r *DLPDatasetUploadNewResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r newVersionJSON) RawJSON() string { +func (r dlpDatasetUploadNewResponseJSON) RawJSON() string { return r.raw } -type NewVersionColumn struct { - EntryID string `json:"entry_id,required" format:"uuid"` - HeaderName string `json:"header_name,required"` - NumCells int64 `json:"num_cells,required"` - UploadStatus NewVersionColumnsUploadStatus `json:"upload_status,required"` - JSON newVersionColumnJSON `json:"-"` +type DLPDatasetUploadNewResponseColumn struct { + EntryID string `json:"entry_id,required" format:"uuid"` + HeaderName string `json:"header_name,required"` + NumCells int64 `json:"num_cells,required"` + UploadStatus DLPDatasetUploadNewResponseColumnsUploadStatus `json:"upload_status,required"` + JSON dlpDatasetUploadNewResponseColumnJSON `json:"-"` } -// newVersionColumnJSON contains the JSON metadata for the struct -// [NewVersionColumn] -type newVersionColumnJSON struct { +// dlpDatasetUploadNewResponseColumnJSON contains the JSON metadata for the struct +// [DLPDatasetUploadNewResponseColumn] +type dlpDatasetUploadNewResponseColumnJSON struct { EntryID apijson.Field HeaderName apijson.Field NumCells apijson.Field @@ -133,28 +135,184 @@ type newVersionColumnJSON struct { ExtraFields map[string]apijson.Field } -func (r *NewVersionColumn) UnmarshalJSON(data []byte) (err error) { +func (r *DLPDatasetUploadNewResponseColumn) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r newVersionColumnJSON) RawJSON() string { +func (r dlpDatasetUploadNewResponseColumnJSON) RawJSON() string { return r.raw } -type NewVersionColumnsUploadStatus string +type DLPDatasetUploadNewResponseColumnsUploadStatus string const ( - NewVersionColumnsUploadStatusEmpty NewVersionColumnsUploadStatus = "empty" - NewVersionColumnsUploadStatusUploading NewVersionColumnsUploadStatus = "uploading" - NewVersionColumnsUploadStatusPending NewVersionColumnsUploadStatus = "pending" - NewVersionColumnsUploadStatusProcessing NewVersionColumnsUploadStatus = "processing" - NewVersionColumnsUploadStatusFailed NewVersionColumnsUploadStatus = "failed" - NewVersionColumnsUploadStatusComplete NewVersionColumnsUploadStatus = "complete" + DLPDatasetUploadNewResponseColumnsUploadStatusEmpty DLPDatasetUploadNewResponseColumnsUploadStatus = "empty" + DLPDatasetUploadNewResponseColumnsUploadStatusUploading DLPDatasetUploadNewResponseColumnsUploadStatus = "uploading" + DLPDatasetUploadNewResponseColumnsUploadStatusPending DLPDatasetUploadNewResponseColumnsUploadStatus = "pending" + DLPDatasetUploadNewResponseColumnsUploadStatusProcessing DLPDatasetUploadNewResponseColumnsUploadStatus = "processing" + DLPDatasetUploadNewResponseColumnsUploadStatusFailed DLPDatasetUploadNewResponseColumnsUploadStatus = "failed" + DLPDatasetUploadNewResponseColumnsUploadStatusComplete DLPDatasetUploadNewResponseColumnsUploadStatus = "complete" ) -func (r NewVersionColumnsUploadStatus) IsKnown() bool { +func (r DLPDatasetUploadNewResponseColumnsUploadStatus) IsKnown() bool { switch r { - case NewVersionColumnsUploadStatusEmpty, NewVersionColumnsUploadStatusUploading, NewVersionColumnsUploadStatusPending, NewVersionColumnsUploadStatusProcessing, NewVersionColumnsUploadStatusFailed, NewVersionColumnsUploadStatusComplete: + case DLPDatasetUploadNewResponseColumnsUploadStatusEmpty, DLPDatasetUploadNewResponseColumnsUploadStatusUploading, DLPDatasetUploadNewResponseColumnsUploadStatusPending, DLPDatasetUploadNewResponseColumnsUploadStatusProcessing, DLPDatasetUploadNewResponseColumnsUploadStatusFailed, DLPDatasetUploadNewResponseColumnsUploadStatusComplete: + return true + } + return false +} + +type DLPDatasetUploadEditResponse struct { + ID string `json:"id,required" format:"uuid"` + Columns []DLPDatasetUploadEditResponseColumn `json:"columns,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + EncodingVersion int64 `json:"encoding_version,required"` + Name string `json:"name,required"` + NumCells int64 `json:"num_cells,required"` + Secret bool `json:"secret,required"` + Status DLPDatasetUploadEditResponseStatus `json:"status,required"` + // Stores when the dataset was last updated. + // + // This includes name or description changes as well as uploads. + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Uploads []DLPDatasetUploadEditResponseUpload `json:"uploads,required"` + CaseSensitive bool `json:"case_sensitive"` + // The description of the dataset. + Description string `json:"description,nullable"` + JSON dlpDatasetUploadEditResponseJSON `json:"-"` +} + +// dlpDatasetUploadEditResponseJSON contains the JSON metadata for the struct +// [DLPDatasetUploadEditResponse] +type dlpDatasetUploadEditResponseJSON struct { + ID apijson.Field + Columns apijson.Field + CreatedAt apijson.Field + EncodingVersion apijson.Field + Name apijson.Field + NumCells apijson.Field + Secret apijson.Field + Status apijson.Field + UpdatedAt apijson.Field + Uploads apijson.Field + CaseSensitive apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPDatasetUploadEditResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpDatasetUploadEditResponseJSON) RawJSON() string { + return r.raw +} + +type DLPDatasetUploadEditResponseColumn struct { + EntryID string `json:"entry_id,required" format:"uuid"` + HeaderName string `json:"header_name,required"` + NumCells int64 `json:"num_cells,required"` + UploadStatus DLPDatasetUploadEditResponseColumnsUploadStatus `json:"upload_status,required"` + JSON dlpDatasetUploadEditResponseColumnJSON `json:"-"` +} + +// dlpDatasetUploadEditResponseColumnJSON contains the JSON metadata for the struct +// [DLPDatasetUploadEditResponseColumn] +type dlpDatasetUploadEditResponseColumnJSON struct { + EntryID apijson.Field + HeaderName apijson.Field + NumCells apijson.Field + UploadStatus apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPDatasetUploadEditResponseColumn) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpDatasetUploadEditResponseColumnJSON) RawJSON() string { + return r.raw +} + +type DLPDatasetUploadEditResponseColumnsUploadStatus string + +const ( + DLPDatasetUploadEditResponseColumnsUploadStatusEmpty DLPDatasetUploadEditResponseColumnsUploadStatus = "empty" + DLPDatasetUploadEditResponseColumnsUploadStatusUploading DLPDatasetUploadEditResponseColumnsUploadStatus = "uploading" + DLPDatasetUploadEditResponseColumnsUploadStatusPending DLPDatasetUploadEditResponseColumnsUploadStatus = "pending" + DLPDatasetUploadEditResponseColumnsUploadStatusProcessing DLPDatasetUploadEditResponseColumnsUploadStatus = "processing" + DLPDatasetUploadEditResponseColumnsUploadStatusFailed DLPDatasetUploadEditResponseColumnsUploadStatus = "failed" + DLPDatasetUploadEditResponseColumnsUploadStatusComplete DLPDatasetUploadEditResponseColumnsUploadStatus = "complete" +) + +func (r DLPDatasetUploadEditResponseColumnsUploadStatus) IsKnown() bool { + switch r { + case DLPDatasetUploadEditResponseColumnsUploadStatusEmpty, DLPDatasetUploadEditResponseColumnsUploadStatusUploading, DLPDatasetUploadEditResponseColumnsUploadStatusPending, DLPDatasetUploadEditResponseColumnsUploadStatusProcessing, DLPDatasetUploadEditResponseColumnsUploadStatusFailed, DLPDatasetUploadEditResponseColumnsUploadStatusComplete: + return true + } + return false +} + +type DLPDatasetUploadEditResponseStatus string + +const ( + DLPDatasetUploadEditResponseStatusEmpty DLPDatasetUploadEditResponseStatus = "empty" + DLPDatasetUploadEditResponseStatusUploading DLPDatasetUploadEditResponseStatus = "uploading" + DLPDatasetUploadEditResponseStatusPending DLPDatasetUploadEditResponseStatus = "pending" + DLPDatasetUploadEditResponseStatusProcessing DLPDatasetUploadEditResponseStatus = "processing" + DLPDatasetUploadEditResponseStatusFailed DLPDatasetUploadEditResponseStatus = "failed" + DLPDatasetUploadEditResponseStatusComplete DLPDatasetUploadEditResponseStatus = "complete" +) + +func (r DLPDatasetUploadEditResponseStatus) IsKnown() bool { + switch r { + case DLPDatasetUploadEditResponseStatusEmpty, DLPDatasetUploadEditResponseStatusUploading, DLPDatasetUploadEditResponseStatusPending, DLPDatasetUploadEditResponseStatusProcessing, DLPDatasetUploadEditResponseStatusFailed, DLPDatasetUploadEditResponseStatusComplete: + return true + } + return false +} + +type DLPDatasetUploadEditResponseUpload struct { + NumCells int64 `json:"num_cells,required"` + Status DLPDatasetUploadEditResponseUploadsStatus `json:"status,required"` + Version int64 `json:"version,required"` + JSON dlpDatasetUploadEditResponseUploadJSON `json:"-"` +} + +// dlpDatasetUploadEditResponseUploadJSON contains the JSON metadata for the struct +// [DLPDatasetUploadEditResponseUpload] +type dlpDatasetUploadEditResponseUploadJSON struct { + NumCells apijson.Field + Status apijson.Field + Version apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPDatasetUploadEditResponseUpload) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpDatasetUploadEditResponseUploadJSON) RawJSON() string { + return r.raw +} + +type DLPDatasetUploadEditResponseUploadsStatus string + +const ( + DLPDatasetUploadEditResponseUploadsStatusEmpty DLPDatasetUploadEditResponseUploadsStatus = "empty" + DLPDatasetUploadEditResponseUploadsStatusUploading DLPDatasetUploadEditResponseUploadsStatus = "uploading" + DLPDatasetUploadEditResponseUploadsStatusPending DLPDatasetUploadEditResponseUploadsStatus = "pending" + DLPDatasetUploadEditResponseUploadsStatusProcessing DLPDatasetUploadEditResponseUploadsStatus = "processing" + DLPDatasetUploadEditResponseUploadsStatusFailed DLPDatasetUploadEditResponseUploadsStatus = "failed" + DLPDatasetUploadEditResponseUploadsStatusComplete DLPDatasetUploadEditResponseUploadsStatus = "complete" +) + +func (r DLPDatasetUploadEditResponseUploadsStatus) IsKnown() bool { + switch r { + case DLPDatasetUploadEditResponseUploadsStatusEmpty, DLPDatasetUploadEditResponseUploadsStatusUploading, DLPDatasetUploadEditResponseUploadsStatusPending, DLPDatasetUploadEditResponseUploadsStatusProcessing, DLPDatasetUploadEditResponseUploadsStatusFailed, DLPDatasetUploadEditResponseUploadsStatusComplete: return true } return false @@ -169,7 +327,7 @@ type DLPDatasetUploadNewResponseEnvelope struct { Messages []DLPDatasetUploadNewResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPDatasetUploadNewResponseEnvelopeSuccess `json:"success,required"` - Result NewVersion `json:"result"` + Result DLPDatasetUploadNewResponse `json:"result"` JSON dlpDatasetUploadNewResponseEnvelopeJSON `json:"-"` } @@ -327,7 +485,7 @@ type DLPDatasetUploadEditResponseEnvelope struct { Messages []DLPDatasetUploadEditResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPDatasetUploadEditResponseEnvelopeSuccess `json:"success,required"` - Result Dataset `json:"result"` + Result DLPDatasetUploadEditResponse `json:"result"` JSON dlpDatasetUploadEditResponseEnvelopeJSON `json:"-"` } diff --git a/zero_trust/dlpemailrule.go b/zero_trust/dlpemailrule.go index d46ca2c2db0..425d6d5bec0 100644 --- a/zero_trust/dlpemailrule.go +++ b/zero_trust/dlpemailrule.go @@ -165,7 +165,7 @@ func (r *DLPEmailRuleService) Get(ctx context.Context, ruleID string, query DLPE type DLPEmailRuleNewResponse struct { Action DLPEmailRuleNewResponseAction `json:"action,required"` - // Rule is triggered if all conditions match. + // Triggered if all conditions match. Conditions []DLPEmailRuleNewResponseCondition `json:"conditions,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Enabled bool `json:"enabled,required"` @@ -324,7 +324,7 @@ func (r DLPEmailRuleNewResponseConditionsValueArray) ImplementsDLPEmailRuleNewRe type DLPEmailRuleUpdateResponse struct { Action DLPEmailRuleUpdateResponseAction `json:"action,required"` - // Rule is triggered if all conditions match. + // Triggered if all conditions match. Conditions []DLPEmailRuleUpdateResponseCondition `json:"conditions,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Enabled bool `json:"enabled,required"` @@ -483,7 +483,7 @@ func (r DLPEmailRuleUpdateResponseConditionsValueArray) ImplementsDLPEmailRuleUp type DLPEmailRuleListResponse struct { Action DLPEmailRuleListResponseAction `json:"action,required"` - // Rule is triggered if all conditions match. + // Triggered if all conditions match. Conditions []DLPEmailRuleListResponseCondition `json:"conditions,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Enabled bool `json:"enabled,required"` @@ -642,7 +642,7 @@ func (r DLPEmailRuleListResponseConditionsValueArray) ImplementsDLPEmailRuleList type DLPEmailRuleDeleteResponse struct { Action DLPEmailRuleDeleteResponseAction `json:"action,required"` - // Rule is triggered if all conditions match. + // Triggered if all conditions match. Conditions []DLPEmailRuleDeleteResponseCondition `json:"conditions,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Enabled bool `json:"enabled,required"` @@ -801,7 +801,7 @@ func (r DLPEmailRuleDeleteResponseConditionsValueArray) ImplementsDLPEmailRuleDe type DLPEmailRuleBulkEditResponse struct { Action DLPEmailRuleBulkEditResponseAction `json:"action,required"` - // Rule is triggered if all conditions match. + // Triggered if all conditions match. Conditions []DLPEmailRuleBulkEditResponseCondition `json:"conditions,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Enabled bool `json:"enabled,required"` @@ -960,7 +960,7 @@ func (r DLPEmailRuleBulkEditResponseConditionsValueArray) ImplementsDLPEmailRule type DLPEmailRuleGetResponse struct { Action DLPEmailRuleGetResponseAction `json:"action,required"` - // Rule is triggered if all conditions match. + // Triggered if all conditions match. Conditions []DLPEmailRuleGetResponseCondition `json:"conditions,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Enabled bool `json:"enabled,required"` @@ -1120,7 +1120,7 @@ func (r DLPEmailRuleGetResponseConditionsValueArray) ImplementsDLPEmailRuleGetRe type DLPEmailRuleNewParams struct { AccountID param.Field[string] `path:"account_id,required"` Action param.Field[DLPEmailRuleNewParamsAction] `json:"action,required"` - // Rule is triggered if all conditions match. + // Triggered if all conditions match. Conditions param.Field[[]DLPEmailRuleNewParamsCondition] `json:"conditions,required"` Enabled param.Field[bool] `json:"enabled,required"` Name param.Field[string] `json:"name,required"` @@ -1350,7 +1350,7 @@ func (r DLPEmailRuleNewResponseEnvelopeSuccess) IsKnown() bool { type DLPEmailRuleUpdateParams struct { AccountID param.Field[string] `path:"account_id,required"` Action param.Field[DLPEmailRuleUpdateParamsAction] `json:"action,required"` - // Rule is triggered if all conditions match. + // Triggered if all conditions match. Conditions param.Field[[]DLPEmailRuleUpdateParamsCondition] `json:"conditions,required"` Enabled param.Field[bool] `json:"enabled,required"` Name param.Field[string] `json:"name,required"` diff --git a/zero_trust/dlpentry.go b/zero_trust/dlpentry.go index dbf5f950f78..106a5fa8940 100644 --- a/zero_trust/dlpentry.go +++ b/zero_trust/dlpentry.go @@ -193,7 +193,7 @@ type DLPEntryUpdateResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryUpdateResponsePredefinedEntryConfidence]. + // [DLPEntryUpdateResponsePredefinedConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` @@ -201,7 +201,7 @@ type DLPEntryUpdateResponse struct { Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryUpdateResponsePredefinedEntryVariant]. + // [DLPEntryUpdateResponsePredefinedVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -245,22 +245,18 @@ func (r *DLPEntryUpdateResponse) UnmarshalJSON(data []byte) (err error) { // AsUnion returns a [DLPEntryUpdateResponseUnion] interface which you can cast to // the specific types for more type safety. // -// Possible runtime types of the union are [DLPEntryUpdateResponseCustomEntry], -// [DLPEntryUpdateResponsePredefinedEntry], -// [DLPEntryUpdateResponseIntegrationEntry], -// [DLPEntryUpdateResponseExactDataEntry], -// [DLPEntryUpdateResponseDocumentFingerprintEntry], -// [DLPEntryUpdateResponseWordListEntry]. +// Possible runtime types of the union are [DLPEntryUpdateResponseCustom], +// [DLPEntryUpdateResponsePredefined], [DLPEntryUpdateResponseIntegration], +// [DLPEntryUpdateResponseExactData], [DLPEntryUpdateResponseDocumentFingerprint], +// [DLPEntryUpdateResponseWordList]. func (r DLPEntryUpdateResponse) AsUnion() DLPEntryUpdateResponseUnion { return r.union } -// Union satisfied by [DLPEntryUpdateResponseCustomEntry], -// [DLPEntryUpdateResponsePredefinedEntry], -// [DLPEntryUpdateResponseIntegrationEntry], -// [DLPEntryUpdateResponseExactDataEntry], -// [DLPEntryUpdateResponseDocumentFingerprintEntry] or -// [DLPEntryUpdateResponseWordListEntry]. +// Union satisfied by [DLPEntryUpdateResponseCustom], +// [DLPEntryUpdateResponsePredefined], [DLPEntryUpdateResponseIntegration], +// [DLPEntryUpdateResponseExactData], [DLPEntryUpdateResponseDocumentFingerprint] +// or [DLPEntryUpdateResponseWordList]. type DLPEntryUpdateResponseUnion interface { implementsDLPEntryUpdateResponse() } @@ -268,49 +264,55 @@ type DLPEntryUpdateResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryUpdateResponseUnion)(nil)).Elem(), - "", + "type", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryUpdateResponseCustomEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryUpdateResponseCustom{}), + DiscriminatorValue: "custom", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryUpdateResponsePredefinedEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryUpdateResponsePredefined{}), + DiscriminatorValue: "predefined", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryUpdateResponseIntegrationEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryUpdateResponseIntegration{}), + DiscriminatorValue: "integration", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryUpdateResponseExactDataEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryUpdateResponseExactData{}), + DiscriminatorValue: "exact_data", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryUpdateResponseDocumentFingerprintEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryUpdateResponseDocumentFingerprint{}), + DiscriminatorValue: "document_fingerprint", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryUpdateResponseWordListEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryUpdateResponseWordList{}), + DiscriminatorValue: "word_list", }, ) } -type DLPEntryUpdateResponseCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryUpdateResponseCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryUpdateResponseCustomEntryJSON `json:"-"` +type DLPEntryUpdateResponseCustom struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryUpdateResponseCustomType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryUpdateResponseCustomJSON `json:"-"` } -// dlpEntryUpdateResponseCustomEntryJSON contains the JSON metadata for the struct -// [DLPEntryUpdateResponseCustomEntry] -type dlpEntryUpdateResponseCustomEntryJSON struct { +// dlpEntryUpdateResponseCustomJSON contains the JSON metadata for the struct +// [DLPEntryUpdateResponseCustom] +type dlpEntryUpdateResponseCustomJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -323,44 +325,44 @@ type dlpEntryUpdateResponseCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryUpdateResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryUpdateResponseCustom) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryUpdateResponseCustomEntryJSON) RawJSON() string { +func (r dlpEntryUpdateResponseCustomJSON) RawJSON() string { return r.raw } -func (r DLPEntryUpdateResponseCustomEntry) implementsDLPEntryUpdateResponse() {} +func (r DLPEntryUpdateResponseCustom) implementsDLPEntryUpdateResponse() {} -type DLPEntryUpdateResponseCustomEntryType string +type DLPEntryUpdateResponseCustomType string const ( - DLPEntryUpdateResponseCustomEntryTypeCustom DLPEntryUpdateResponseCustomEntryType = "custom" + DLPEntryUpdateResponseCustomTypeCustom DLPEntryUpdateResponseCustomType = "custom" ) -func (r DLPEntryUpdateResponseCustomEntryType) IsKnown() bool { +func (r DLPEntryUpdateResponseCustomType) IsKnown() bool { switch r { - case DLPEntryUpdateResponseCustomEntryTypeCustom: + case DLPEntryUpdateResponseCustomTypeCustom: return true } return false } -type DLPEntryUpdateResponsePredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryUpdateResponsePredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryUpdateResponsePredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryUpdateResponsePredefinedEntryVariant `json:"variant"` - JSON dlpEntryUpdateResponsePredefinedEntryJSON `json:"-"` +type DLPEntryUpdateResponsePredefined struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryUpdateResponsePredefinedConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryUpdateResponsePredefinedType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPEntryUpdateResponsePredefinedVariant `json:"variant"` + JSON dlpEntryUpdateResponsePredefinedJSON `json:"-"` } -// dlpEntryUpdateResponsePredefinedEntryJSON contains the JSON metadata for the -// struct [DLPEntryUpdateResponsePredefinedEntry] -type dlpEntryUpdateResponsePredefinedEntryJSON struct { +// dlpEntryUpdateResponsePredefinedJSON contains the JSON metadata for the struct +// [DLPEntryUpdateResponsePredefined] +type dlpEntryUpdateResponsePredefinedJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -372,66 +374,66 @@ type dlpEntryUpdateResponsePredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryUpdateResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryUpdateResponsePredefined) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryUpdateResponsePredefinedEntryJSON) RawJSON() string { +func (r dlpEntryUpdateResponsePredefinedJSON) RawJSON() string { return r.raw } -func (r DLPEntryUpdateResponsePredefinedEntry) implementsDLPEntryUpdateResponse() {} +func (r DLPEntryUpdateResponsePredefined) implementsDLPEntryUpdateResponse() {} -type DLPEntryUpdateResponsePredefinedEntryConfidence struct { +type DLPEntryUpdateResponsePredefinedConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryUpdateResponsePredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryUpdateResponsePredefinedConfidenceJSON `json:"-"` } -// dlpEntryUpdateResponsePredefinedEntryConfidenceJSON contains the JSON metadata -// for the struct [DLPEntryUpdateResponsePredefinedEntryConfidence] -type dlpEntryUpdateResponsePredefinedEntryConfidenceJSON struct { +// dlpEntryUpdateResponsePredefinedConfidenceJSON contains the JSON metadata for +// the struct [DLPEntryUpdateResponsePredefinedConfidence] +type dlpEntryUpdateResponsePredefinedConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryUpdateResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryUpdateResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryUpdateResponsePredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpEntryUpdateResponsePredefinedConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryUpdateResponsePredefinedEntryType string +type DLPEntryUpdateResponsePredefinedType string const ( - DLPEntryUpdateResponsePredefinedEntryTypePredefined DLPEntryUpdateResponsePredefinedEntryType = "predefined" + DLPEntryUpdateResponsePredefinedTypePredefined DLPEntryUpdateResponsePredefinedType = "predefined" ) -func (r DLPEntryUpdateResponsePredefinedEntryType) IsKnown() bool { +func (r DLPEntryUpdateResponsePredefinedType) IsKnown() bool { switch r { - case DLPEntryUpdateResponsePredefinedEntryTypePredefined: + case DLPEntryUpdateResponsePredefinedTypePredefined: return true } return false } -type DLPEntryUpdateResponsePredefinedEntryVariant struct { - TopicType DLPEntryUpdateResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` - Type DLPEntryUpdateResponsePredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryUpdateResponsePredefinedEntryVariantJSON `json:"-"` +type DLPEntryUpdateResponsePredefinedVariant struct { + TopicType DLPEntryUpdateResponsePredefinedVariantTopicType `json:"topic_type,required"` + Type DLPEntryUpdateResponsePredefinedVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryUpdateResponsePredefinedVariantJSON `json:"-"` } -// dlpEntryUpdateResponsePredefinedEntryVariantJSON contains the JSON metadata for -// the struct [DLPEntryUpdateResponsePredefinedEntryVariant] -type dlpEntryUpdateResponsePredefinedEntryVariantJSON struct { +// dlpEntryUpdateResponsePredefinedVariantJSON contains the JSON metadata for the +// struct [DLPEntryUpdateResponsePredefinedVariant] +type dlpEntryUpdateResponsePredefinedVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -439,57 +441,57 @@ type dlpEntryUpdateResponsePredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryUpdateResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryUpdateResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryUpdateResponsePredefinedEntryVariantJSON) RawJSON() string { +func (r dlpEntryUpdateResponsePredefinedVariantJSON) RawJSON() string { return r.raw } -type DLPEntryUpdateResponsePredefinedEntryVariantTopicType string +type DLPEntryUpdateResponsePredefinedVariantTopicType string const ( - DLPEntryUpdateResponsePredefinedEntryVariantTopicTypeIntent DLPEntryUpdateResponsePredefinedEntryVariantTopicType = "Intent" - DLPEntryUpdateResponsePredefinedEntryVariantTopicTypeContent DLPEntryUpdateResponsePredefinedEntryVariantTopicType = "Content" + DLPEntryUpdateResponsePredefinedVariantTopicTypeIntent DLPEntryUpdateResponsePredefinedVariantTopicType = "Intent" + DLPEntryUpdateResponsePredefinedVariantTopicTypeContent DLPEntryUpdateResponsePredefinedVariantTopicType = "Content" ) -func (r DLPEntryUpdateResponsePredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPEntryUpdateResponsePredefinedVariantTopicType) IsKnown() bool { switch r { - case DLPEntryUpdateResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryUpdateResponsePredefinedEntryVariantTopicTypeContent: + case DLPEntryUpdateResponsePredefinedVariantTopicTypeIntent, DLPEntryUpdateResponsePredefinedVariantTopicTypeContent: return true } return false } -type DLPEntryUpdateResponsePredefinedEntryVariantType string +type DLPEntryUpdateResponsePredefinedVariantType string const ( - DLPEntryUpdateResponsePredefinedEntryVariantTypePromptTopic DLPEntryUpdateResponsePredefinedEntryVariantType = "PromptTopic" + DLPEntryUpdateResponsePredefinedVariantTypePromptTopic DLPEntryUpdateResponsePredefinedVariantType = "PromptTopic" ) -func (r DLPEntryUpdateResponsePredefinedEntryVariantType) IsKnown() bool { +func (r DLPEntryUpdateResponsePredefinedVariantType) IsKnown() bool { switch r { - case DLPEntryUpdateResponsePredefinedEntryVariantTypePromptTopic: + case DLPEntryUpdateResponsePredefinedVariantTypePromptTopic: return true } return false } -type DLPEntryUpdateResponseIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryUpdateResponseIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryUpdateResponseIntegrationEntryJSON `json:"-"` +type DLPEntryUpdateResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryUpdateResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryUpdateResponseIntegrationJSON `json:"-"` } -// dlpEntryUpdateResponseIntegrationEntryJSON contains the JSON metadata for the -// struct [DLPEntryUpdateResponseIntegrationEntry] -type dlpEntryUpdateResponseIntegrationEntryJSON struct { +// dlpEntryUpdateResponseIntegrationJSON contains the JSON metadata for the struct +// [DLPEntryUpdateResponseIntegration] +type dlpEntryUpdateResponseIntegrationJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -501,47 +503,47 @@ type dlpEntryUpdateResponseIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryUpdateResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryUpdateResponseIntegration) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryUpdateResponseIntegrationEntryJSON) RawJSON() string { +func (r dlpEntryUpdateResponseIntegrationJSON) RawJSON() string { return r.raw } -func (r DLPEntryUpdateResponseIntegrationEntry) implementsDLPEntryUpdateResponse() {} +func (r DLPEntryUpdateResponseIntegration) implementsDLPEntryUpdateResponse() {} -type DLPEntryUpdateResponseIntegrationEntryType string +type DLPEntryUpdateResponseIntegrationType string const ( - DLPEntryUpdateResponseIntegrationEntryTypeIntegration DLPEntryUpdateResponseIntegrationEntryType = "integration" + DLPEntryUpdateResponseIntegrationTypeIntegration DLPEntryUpdateResponseIntegrationType = "integration" ) -func (r DLPEntryUpdateResponseIntegrationEntryType) IsKnown() bool { +func (r DLPEntryUpdateResponseIntegrationType) IsKnown() bool { switch r { - case DLPEntryUpdateResponseIntegrationEntryTypeIntegration: + case DLPEntryUpdateResponseIntegrationTypeIntegration: return true } return false } -type DLPEntryUpdateResponseExactDataEntry struct { +type DLPEntryUpdateResponseExactData struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryUpdateResponseExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryUpdateResponseExactDataEntryJSON `json:"-"` -} - -// dlpEntryUpdateResponseExactDataEntryJSON contains the JSON metadata for the -// struct [DLPEntryUpdateResponseExactDataEntry] -type dlpEntryUpdateResponseExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryUpdateResponseExactDataType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryUpdateResponseExactDataJSON `json:"-"` +} + +// dlpEntryUpdateResponseExactDataJSON contains the JSON metadata for the struct +// [DLPEntryUpdateResponseExactData] +type dlpEntryUpdateResponseExactDataJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -554,43 +556,43 @@ type dlpEntryUpdateResponseExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryUpdateResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryUpdateResponseExactData) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryUpdateResponseExactDataEntryJSON) RawJSON() string { +func (r dlpEntryUpdateResponseExactDataJSON) RawJSON() string { return r.raw } -func (r DLPEntryUpdateResponseExactDataEntry) implementsDLPEntryUpdateResponse() {} +func (r DLPEntryUpdateResponseExactData) implementsDLPEntryUpdateResponse() {} -type DLPEntryUpdateResponseExactDataEntryType string +type DLPEntryUpdateResponseExactDataType string const ( - DLPEntryUpdateResponseExactDataEntryTypeExactData DLPEntryUpdateResponseExactDataEntryType = "exact_data" + DLPEntryUpdateResponseExactDataTypeExactData DLPEntryUpdateResponseExactDataType = "exact_data" ) -func (r DLPEntryUpdateResponseExactDataEntryType) IsKnown() bool { +func (r DLPEntryUpdateResponseExactDataType) IsKnown() bool { switch r { - case DLPEntryUpdateResponseExactDataEntryTypeExactData: + case DLPEntryUpdateResponseExactDataTypeExactData: return true } return false } -type DLPEntryUpdateResponseDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryUpdateResponseDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryUpdateResponseDocumentFingerprintEntryJSON `json:"-"` +type DLPEntryUpdateResponseDocumentFingerprint struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryUpdateResponseDocumentFingerprintType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryUpdateResponseDocumentFingerprintJSON `json:"-"` } -// dlpEntryUpdateResponseDocumentFingerprintEntryJSON contains the JSON metadata -// for the struct [DLPEntryUpdateResponseDocumentFingerprintEntry] -type dlpEntryUpdateResponseDocumentFingerprintEntryJSON struct { +// dlpEntryUpdateResponseDocumentFingerprintJSON contains the JSON metadata for the +// struct [DLPEntryUpdateResponseDocumentFingerprint] +type dlpEntryUpdateResponseDocumentFingerprintJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -601,45 +603,45 @@ type dlpEntryUpdateResponseDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryUpdateResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryUpdateResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryUpdateResponseDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpEntryUpdateResponseDocumentFingerprintJSON) RawJSON() string { return r.raw } -func (r DLPEntryUpdateResponseDocumentFingerprintEntry) implementsDLPEntryUpdateResponse() {} +func (r DLPEntryUpdateResponseDocumentFingerprint) implementsDLPEntryUpdateResponse() {} -type DLPEntryUpdateResponseDocumentFingerprintEntryType string +type DLPEntryUpdateResponseDocumentFingerprintType string const ( - DLPEntryUpdateResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryUpdateResponseDocumentFingerprintEntryType = "document_fingerprint" + DLPEntryUpdateResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryUpdateResponseDocumentFingerprintType = "document_fingerprint" ) -func (r DLPEntryUpdateResponseDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPEntryUpdateResponseDocumentFingerprintType) IsKnown() bool { switch r { - case DLPEntryUpdateResponseDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPEntryUpdateResponseDocumentFingerprintTypeDocumentFingerprint: return true } return false } -type DLPEntryUpdateResponseWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryUpdateResponseWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryUpdateResponseWordListEntryJSON `json:"-"` +type DLPEntryUpdateResponseWordList struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryUpdateResponseWordListType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryUpdateResponseWordListJSON `json:"-"` } -// dlpEntryUpdateResponseWordListEntryJSON contains the JSON metadata for the -// struct [DLPEntryUpdateResponseWordListEntry] -type dlpEntryUpdateResponseWordListEntryJSON struct { +// dlpEntryUpdateResponseWordListJSON contains the JSON metadata for the struct +// [DLPEntryUpdateResponseWordList] +type dlpEntryUpdateResponseWordListJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -652,25 +654,25 @@ type dlpEntryUpdateResponseWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryUpdateResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryUpdateResponseWordList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryUpdateResponseWordListEntryJSON) RawJSON() string { +func (r dlpEntryUpdateResponseWordListJSON) RawJSON() string { return r.raw } -func (r DLPEntryUpdateResponseWordListEntry) implementsDLPEntryUpdateResponse() {} +func (r DLPEntryUpdateResponseWordList) implementsDLPEntryUpdateResponse() {} -type DLPEntryUpdateResponseWordListEntryType string +type DLPEntryUpdateResponseWordListType string const ( - DLPEntryUpdateResponseWordListEntryTypeWordList DLPEntryUpdateResponseWordListEntryType = "word_list" + DLPEntryUpdateResponseWordListTypeWordList DLPEntryUpdateResponseWordListType = "word_list" ) -func (r DLPEntryUpdateResponseWordListEntryType) IsKnown() bool { +func (r DLPEntryUpdateResponseWordListType) IsKnown() bool { switch r { - case DLPEntryUpdateResponseWordListEntryTypeWordList: + case DLPEntryUpdateResponseWordListTypeWordList: return true } return false @@ -704,15 +706,14 @@ type DLPEntryListResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryListResponsePredefinedEntryConfidence]. + // [DLPEntryListResponsePredefinedConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` ProfileID string `json:"profile_id,nullable" format:"uuid"` Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` - // This field can have the runtime type of - // [DLPEntryListResponsePredefinedEntryVariant]. + // This field can have the runtime type of [DLPEntryListResponsePredefinedVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -756,20 +757,18 @@ func (r *DLPEntryListResponse) UnmarshalJSON(data []byte) (err error) { // AsUnion returns a [DLPEntryListResponseUnion] interface which you can cast to // the specific types for more type safety. // -// Possible runtime types of the union are [DLPEntryListResponseCustomEntry], -// [DLPEntryListResponsePredefinedEntry], [DLPEntryListResponseIntegrationEntry], -// [DLPEntryListResponseExactDataEntry], -// [DLPEntryListResponseDocumentFingerprintEntry], -// [DLPEntryListResponseWordListEntry]. +// Possible runtime types of the union are [DLPEntryListResponseCustom], +// [DLPEntryListResponsePredefined], [DLPEntryListResponseIntegration], +// [DLPEntryListResponseExactData], [DLPEntryListResponseDocumentFingerprint], +// [DLPEntryListResponseWordList]. func (r DLPEntryListResponse) AsUnion() DLPEntryListResponseUnion { return r.union } -// Union satisfied by [DLPEntryListResponseCustomEntry], -// [DLPEntryListResponsePredefinedEntry], [DLPEntryListResponseIntegrationEntry], -// [DLPEntryListResponseExactDataEntry], -// [DLPEntryListResponseDocumentFingerprintEntry] or -// [DLPEntryListResponseWordListEntry]. +// Union satisfied by [DLPEntryListResponseCustom], +// [DLPEntryListResponsePredefined], [DLPEntryListResponseIntegration], +// [DLPEntryListResponseExactData], [DLPEntryListResponseDocumentFingerprint] or +// [DLPEntryListResponseWordList]. type DLPEntryListResponseUnion interface { implementsDLPEntryListResponse() } @@ -777,49 +776,55 @@ type DLPEntryListResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryListResponseUnion)(nil)).Elem(), - "", + "type", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryListResponseCustomEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryListResponseCustom{}), + DiscriminatorValue: "custom", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryListResponsePredefinedEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryListResponsePredefined{}), + DiscriminatorValue: "predefined", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryListResponseIntegrationEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryListResponseIntegration{}), + DiscriminatorValue: "integration", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryListResponseExactDataEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryListResponseExactData{}), + DiscriminatorValue: "exact_data", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryListResponseDocumentFingerprintEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryListResponseDocumentFingerprint{}), + DiscriminatorValue: "document_fingerprint", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryListResponseWordListEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryListResponseWordList{}), + DiscriminatorValue: "word_list", }, ) } -type DLPEntryListResponseCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryListResponseCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryListResponseCustomEntryJSON `json:"-"` +type DLPEntryListResponseCustom struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryListResponseCustomType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryListResponseCustomJSON `json:"-"` } -// dlpEntryListResponseCustomEntryJSON contains the JSON metadata for the struct -// [DLPEntryListResponseCustomEntry] -type dlpEntryListResponseCustomEntryJSON struct { +// dlpEntryListResponseCustomJSON contains the JSON metadata for the struct +// [DLPEntryListResponseCustom] +type dlpEntryListResponseCustomJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -832,44 +837,44 @@ type dlpEntryListResponseCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryListResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryListResponseCustom) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryListResponseCustomEntryJSON) RawJSON() string { +func (r dlpEntryListResponseCustomJSON) RawJSON() string { return r.raw } -func (r DLPEntryListResponseCustomEntry) implementsDLPEntryListResponse() {} +func (r DLPEntryListResponseCustom) implementsDLPEntryListResponse() {} -type DLPEntryListResponseCustomEntryType string +type DLPEntryListResponseCustomType string const ( - DLPEntryListResponseCustomEntryTypeCustom DLPEntryListResponseCustomEntryType = "custom" + DLPEntryListResponseCustomTypeCustom DLPEntryListResponseCustomType = "custom" ) -func (r DLPEntryListResponseCustomEntryType) IsKnown() bool { +func (r DLPEntryListResponseCustomType) IsKnown() bool { switch r { - case DLPEntryListResponseCustomEntryTypeCustom: + case DLPEntryListResponseCustomTypeCustom: return true } return false } -type DLPEntryListResponsePredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryListResponsePredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryListResponsePredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryListResponsePredefinedEntryVariant `json:"variant"` - JSON dlpEntryListResponsePredefinedEntryJSON `json:"-"` +type DLPEntryListResponsePredefined struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryListResponsePredefinedConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryListResponsePredefinedType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPEntryListResponsePredefinedVariant `json:"variant"` + JSON dlpEntryListResponsePredefinedJSON `json:"-"` } -// dlpEntryListResponsePredefinedEntryJSON contains the JSON metadata for the -// struct [DLPEntryListResponsePredefinedEntry] -type dlpEntryListResponsePredefinedEntryJSON struct { +// dlpEntryListResponsePredefinedJSON contains the JSON metadata for the struct +// [DLPEntryListResponsePredefined] +type dlpEntryListResponsePredefinedJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -881,66 +886,66 @@ type dlpEntryListResponsePredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryListResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryListResponsePredefined) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryListResponsePredefinedEntryJSON) RawJSON() string { +func (r dlpEntryListResponsePredefinedJSON) RawJSON() string { return r.raw } -func (r DLPEntryListResponsePredefinedEntry) implementsDLPEntryListResponse() {} +func (r DLPEntryListResponsePredefined) implementsDLPEntryListResponse() {} -type DLPEntryListResponsePredefinedEntryConfidence struct { +type DLPEntryListResponsePredefinedConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryListResponsePredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryListResponsePredefinedConfidenceJSON `json:"-"` } -// dlpEntryListResponsePredefinedEntryConfidenceJSON contains the JSON metadata for -// the struct [DLPEntryListResponsePredefinedEntryConfidence] -type dlpEntryListResponsePredefinedEntryConfidenceJSON struct { +// dlpEntryListResponsePredefinedConfidenceJSON contains the JSON metadata for the +// struct [DLPEntryListResponsePredefinedConfidence] +type dlpEntryListResponsePredefinedConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryListResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryListResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryListResponsePredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpEntryListResponsePredefinedConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryListResponsePredefinedEntryType string +type DLPEntryListResponsePredefinedType string const ( - DLPEntryListResponsePredefinedEntryTypePredefined DLPEntryListResponsePredefinedEntryType = "predefined" + DLPEntryListResponsePredefinedTypePredefined DLPEntryListResponsePredefinedType = "predefined" ) -func (r DLPEntryListResponsePredefinedEntryType) IsKnown() bool { +func (r DLPEntryListResponsePredefinedType) IsKnown() bool { switch r { - case DLPEntryListResponsePredefinedEntryTypePredefined: + case DLPEntryListResponsePredefinedTypePredefined: return true } return false } -type DLPEntryListResponsePredefinedEntryVariant struct { - TopicType DLPEntryListResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` - Type DLPEntryListResponsePredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryListResponsePredefinedEntryVariantJSON `json:"-"` +type DLPEntryListResponsePredefinedVariant struct { + TopicType DLPEntryListResponsePredefinedVariantTopicType `json:"topic_type,required"` + Type DLPEntryListResponsePredefinedVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryListResponsePredefinedVariantJSON `json:"-"` } -// dlpEntryListResponsePredefinedEntryVariantJSON contains the JSON metadata for -// the struct [DLPEntryListResponsePredefinedEntryVariant] -type dlpEntryListResponsePredefinedEntryVariantJSON struct { +// dlpEntryListResponsePredefinedVariantJSON contains the JSON metadata for the +// struct [DLPEntryListResponsePredefinedVariant] +type dlpEntryListResponsePredefinedVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -948,57 +953,57 @@ type dlpEntryListResponsePredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryListResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryListResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryListResponsePredefinedEntryVariantJSON) RawJSON() string { +func (r dlpEntryListResponsePredefinedVariantJSON) RawJSON() string { return r.raw } -type DLPEntryListResponsePredefinedEntryVariantTopicType string +type DLPEntryListResponsePredefinedVariantTopicType string const ( - DLPEntryListResponsePredefinedEntryVariantTopicTypeIntent DLPEntryListResponsePredefinedEntryVariantTopicType = "Intent" - DLPEntryListResponsePredefinedEntryVariantTopicTypeContent DLPEntryListResponsePredefinedEntryVariantTopicType = "Content" + DLPEntryListResponsePredefinedVariantTopicTypeIntent DLPEntryListResponsePredefinedVariantTopicType = "Intent" + DLPEntryListResponsePredefinedVariantTopicTypeContent DLPEntryListResponsePredefinedVariantTopicType = "Content" ) -func (r DLPEntryListResponsePredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPEntryListResponsePredefinedVariantTopicType) IsKnown() bool { switch r { - case DLPEntryListResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryListResponsePredefinedEntryVariantTopicTypeContent: + case DLPEntryListResponsePredefinedVariantTopicTypeIntent, DLPEntryListResponsePredefinedVariantTopicTypeContent: return true } return false } -type DLPEntryListResponsePredefinedEntryVariantType string +type DLPEntryListResponsePredefinedVariantType string const ( - DLPEntryListResponsePredefinedEntryVariantTypePromptTopic DLPEntryListResponsePredefinedEntryVariantType = "PromptTopic" + DLPEntryListResponsePredefinedVariantTypePromptTopic DLPEntryListResponsePredefinedVariantType = "PromptTopic" ) -func (r DLPEntryListResponsePredefinedEntryVariantType) IsKnown() bool { +func (r DLPEntryListResponsePredefinedVariantType) IsKnown() bool { switch r { - case DLPEntryListResponsePredefinedEntryVariantTypePromptTopic: + case DLPEntryListResponsePredefinedVariantTypePromptTopic: return true } return false } -type DLPEntryListResponseIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryListResponseIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryListResponseIntegrationEntryJSON `json:"-"` +type DLPEntryListResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryListResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryListResponseIntegrationJSON `json:"-"` } -// dlpEntryListResponseIntegrationEntryJSON contains the JSON metadata for the -// struct [DLPEntryListResponseIntegrationEntry] -type dlpEntryListResponseIntegrationEntryJSON struct { +// dlpEntryListResponseIntegrationJSON contains the JSON metadata for the struct +// [DLPEntryListResponseIntegration] +type dlpEntryListResponseIntegrationJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1010,47 +1015,47 @@ type dlpEntryListResponseIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryListResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryListResponseIntegration) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryListResponseIntegrationEntryJSON) RawJSON() string { +func (r dlpEntryListResponseIntegrationJSON) RawJSON() string { return r.raw } -func (r DLPEntryListResponseIntegrationEntry) implementsDLPEntryListResponse() {} +func (r DLPEntryListResponseIntegration) implementsDLPEntryListResponse() {} -type DLPEntryListResponseIntegrationEntryType string +type DLPEntryListResponseIntegrationType string const ( - DLPEntryListResponseIntegrationEntryTypeIntegration DLPEntryListResponseIntegrationEntryType = "integration" + DLPEntryListResponseIntegrationTypeIntegration DLPEntryListResponseIntegrationType = "integration" ) -func (r DLPEntryListResponseIntegrationEntryType) IsKnown() bool { +func (r DLPEntryListResponseIntegrationType) IsKnown() bool { switch r { - case DLPEntryListResponseIntegrationEntryTypeIntegration: + case DLPEntryListResponseIntegrationTypeIntegration: return true } return false } -type DLPEntryListResponseExactDataEntry struct { +type DLPEntryListResponseExactData struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryListResponseExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryListResponseExactDataEntryJSON `json:"-"` -} - -// dlpEntryListResponseExactDataEntryJSON contains the JSON metadata for the struct -// [DLPEntryListResponseExactDataEntry] -type dlpEntryListResponseExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryListResponseExactDataType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryListResponseExactDataJSON `json:"-"` +} + +// dlpEntryListResponseExactDataJSON contains the JSON metadata for the struct +// [DLPEntryListResponseExactData] +type dlpEntryListResponseExactDataJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -1063,43 +1068,43 @@ type dlpEntryListResponseExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryListResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryListResponseExactData) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryListResponseExactDataEntryJSON) RawJSON() string { +func (r dlpEntryListResponseExactDataJSON) RawJSON() string { return r.raw } -func (r DLPEntryListResponseExactDataEntry) implementsDLPEntryListResponse() {} +func (r DLPEntryListResponseExactData) implementsDLPEntryListResponse() {} -type DLPEntryListResponseExactDataEntryType string +type DLPEntryListResponseExactDataType string const ( - DLPEntryListResponseExactDataEntryTypeExactData DLPEntryListResponseExactDataEntryType = "exact_data" + DLPEntryListResponseExactDataTypeExactData DLPEntryListResponseExactDataType = "exact_data" ) -func (r DLPEntryListResponseExactDataEntryType) IsKnown() bool { +func (r DLPEntryListResponseExactDataType) IsKnown() bool { switch r { - case DLPEntryListResponseExactDataEntryTypeExactData: + case DLPEntryListResponseExactDataTypeExactData: return true } return false } -type DLPEntryListResponseDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryListResponseDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryListResponseDocumentFingerprintEntryJSON `json:"-"` +type DLPEntryListResponseDocumentFingerprint struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryListResponseDocumentFingerprintType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryListResponseDocumentFingerprintJSON `json:"-"` } -// dlpEntryListResponseDocumentFingerprintEntryJSON contains the JSON metadata for -// the struct [DLPEntryListResponseDocumentFingerprintEntry] -type dlpEntryListResponseDocumentFingerprintEntryJSON struct { +// dlpEntryListResponseDocumentFingerprintJSON contains the JSON metadata for the +// struct [DLPEntryListResponseDocumentFingerprint] +type dlpEntryListResponseDocumentFingerprintJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1110,45 +1115,45 @@ type dlpEntryListResponseDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryListResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryListResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryListResponseDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpEntryListResponseDocumentFingerprintJSON) RawJSON() string { return r.raw } -func (r DLPEntryListResponseDocumentFingerprintEntry) implementsDLPEntryListResponse() {} +func (r DLPEntryListResponseDocumentFingerprint) implementsDLPEntryListResponse() {} -type DLPEntryListResponseDocumentFingerprintEntryType string +type DLPEntryListResponseDocumentFingerprintType string const ( - DLPEntryListResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryListResponseDocumentFingerprintEntryType = "document_fingerprint" + DLPEntryListResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryListResponseDocumentFingerprintType = "document_fingerprint" ) -func (r DLPEntryListResponseDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPEntryListResponseDocumentFingerprintType) IsKnown() bool { switch r { - case DLPEntryListResponseDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPEntryListResponseDocumentFingerprintTypeDocumentFingerprint: return true } return false } -type DLPEntryListResponseWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryListResponseWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryListResponseWordListEntryJSON `json:"-"` +type DLPEntryListResponseWordList struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryListResponseWordListType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryListResponseWordListJSON `json:"-"` } -// dlpEntryListResponseWordListEntryJSON contains the JSON metadata for the struct -// [DLPEntryListResponseWordListEntry] -type dlpEntryListResponseWordListEntryJSON struct { +// dlpEntryListResponseWordListJSON contains the JSON metadata for the struct +// [DLPEntryListResponseWordList] +type dlpEntryListResponseWordListJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1161,25 +1166,25 @@ type dlpEntryListResponseWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryListResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryListResponseWordList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryListResponseWordListEntryJSON) RawJSON() string { +func (r dlpEntryListResponseWordListJSON) RawJSON() string { return r.raw } -func (r DLPEntryListResponseWordListEntry) implementsDLPEntryListResponse() {} +func (r DLPEntryListResponseWordList) implementsDLPEntryListResponse() {} -type DLPEntryListResponseWordListEntryType string +type DLPEntryListResponseWordListType string const ( - DLPEntryListResponseWordListEntryTypeWordList DLPEntryListResponseWordListEntryType = "word_list" + DLPEntryListResponseWordListTypeWordList DLPEntryListResponseWordListType = "word_list" ) -func (r DLPEntryListResponseWordListEntryType) IsKnown() bool { +func (r DLPEntryListResponseWordListType) IsKnown() bool { switch r { - case DLPEntryListResponseWordListEntryTypeWordList: + case DLPEntryListResponseWordListTypeWordList: return true } return false @@ -1215,15 +1220,14 @@ type DLPEntryGetResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryGetResponsePredefinedEntryConfidence]. + // [DLPEntryGetResponsePredefinedConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` ProfileID string `json:"profile_id,nullable" format:"uuid"` Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` - // This field can have the runtime type of - // [DLPEntryGetResponsePredefinedEntryVariant]. + // This field can have the runtime type of [DLPEntryGetResponsePredefinedVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -1267,20 +1271,17 @@ func (r *DLPEntryGetResponse) UnmarshalJSON(data []byte) (err error) { // AsUnion returns a [DLPEntryGetResponseUnion] interface which you can cast to the // specific types for more type safety. // -// Possible runtime types of the union are [DLPEntryGetResponseCustomEntry], -// [DLPEntryGetResponsePredefinedEntry], [DLPEntryGetResponseIntegrationEntry], -// [DLPEntryGetResponseExactDataEntry], -// [DLPEntryGetResponseDocumentFingerprintEntry], -// [DLPEntryGetResponseWordListEntry]. +// Possible runtime types of the union are [DLPEntryGetResponseCustom], +// [DLPEntryGetResponsePredefined], [DLPEntryGetResponseIntegration], +// [DLPEntryGetResponseExactData], [DLPEntryGetResponseDocumentFingerprint], +// [DLPEntryGetResponseWordList]. func (r DLPEntryGetResponse) AsUnion() DLPEntryGetResponseUnion { return r.union } -// Union satisfied by [DLPEntryGetResponseCustomEntry], -// [DLPEntryGetResponsePredefinedEntry], [DLPEntryGetResponseIntegrationEntry], -// [DLPEntryGetResponseExactDataEntry], -// [DLPEntryGetResponseDocumentFingerprintEntry] or -// [DLPEntryGetResponseWordListEntry]. +// Union satisfied by [DLPEntryGetResponseCustom], [DLPEntryGetResponsePredefined], +// [DLPEntryGetResponseIntegration], [DLPEntryGetResponseExactData], +// [DLPEntryGetResponseDocumentFingerprint] or [DLPEntryGetResponseWordList]. type DLPEntryGetResponseUnion interface { implementsDLPEntryGetResponse() } @@ -1288,49 +1289,55 @@ type DLPEntryGetResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryGetResponseUnion)(nil)).Elem(), - "", + "type", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseCustomEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseCustom{}), + DiscriminatorValue: "custom", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponsePredefinedEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponsePredefined{}), + DiscriminatorValue: "predefined", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseIntegrationEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseIntegration{}), + DiscriminatorValue: "integration", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseExactDataEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseExactData{}), + DiscriminatorValue: "exact_data", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseDocumentFingerprintEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseDocumentFingerprint{}), + DiscriminatorValue: "document_fingerprint", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseWordListEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseWordList{}), + DiscriminatorValue: "word_list", }, ) } -type DLPEntryGetResponseCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryGetResponseCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryGetResponseCustomEntryJSON `json:"-"` +type DLPEntryGetResponseCustom struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryGetResponseCustomType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryGetResponseCustomJSON `json:"-"` } -// dlpEntryGetResponseCustomEntryJSON contains the JSON metadata for the struct -// [DLPEntryGetResponseCustomEntry] -type dlpEntryGetResponseCustomEntryJSON struct { +// dlpEntryGetResponseCustomJSON contains the JSON metadata for the struct +// [DLPEntryGetResponseCustom] +type dlpEntryGetResponseCustomJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1343,44 +1350,44 @@ type dlpEntryGetResponseCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseCustom) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseCustomEntryJSON) RawJSON() string { +func (r dlpEntryGetResponseCustomJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseCustomEntry) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseCustom) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseCustomEntryType string +type DLPEntryGetResponseCustomType string const ( - DLPEntryGetResponseCustomEntryTypeCustom DLPEntryGetResponseCustomEntryType = "custom" + DLPEntryGetResponseCustomTypeCustom DLPEntryGetResponseCustomType = "custom" ) -func (r DLPEntryGetResponseCustomEntryType) IsKnown() bool { +func (r DLPEntryGetResponseCustomType) IsKnown() bool { switch r { - case DLPEntryGetResponseCustomEntryTypeCustom: + case DLPEntryGetResponseCustomTypeCustom: return true } return false } -type DLPEntryGetResponsePredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryGetResponsePredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryGetResponsePredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryGetResponsePredefinedEntryVariant `json:"variant"` - JSON dlpEntryGetResponsePredefinedEntryJSON `json:"-"` +type DLPEntryGetResponsePredefined struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryGetResponsePredefinedConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryGetResponsePredefinedType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPEntryGetResponsePredefinedVariant `json:"variant"` + JSON dlpEntryGetResponsePredefinedJSON `json:"-"` } -// dlpEntryGetResponsePredefinedEntryJSON contains the JSON metadata for the struct -// [DLPEntryGetResponsePredefinedEntry] -type dlpEntryGetResponsePredefinedEntryJSON struct { +// dlpEntryGetResponsePredefinedJSON contains the JSON metadata for the struct +// [DLPEntryGetResponsePredefined] +type dlpEntryGetResponsePredefinedJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -1392,66 +1399,66 @@ type dlpEntryGetResponsePredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponsePredefinedEntryJSON) RawJSON() string { +func (r dlpEntryGetResponsePredefinedJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponsePredefinedEntry) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponsePredefined) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponsePredefinedEntryConfidence struct { +type DLPEntryGetResponsePredefinedConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryGetResponsePredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryGetResponsePredefinedConfidenceJSON `json:"-"` } -// dlpEntryGetResponsePredefinedEntryConfidenceJSON contains the JSON metadata for -// the struct [DLPEntryGetResponsePredefinedEntryConfidence] -type dlpEntryGetResponsePredefinedEntryConfidenceJSON struct { +// dlpEntryGetResponsePredefinedConfidenceJSON contains the JSON metadata for the +// struct [DLPEntryGetResponsePredefinedConfidence] +type dlpEntryGetResponsePredefinedConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponsePredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpEntryGetResponsePredefinedConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryGetResponsePredefinedEntryType string +type DLPEntryGetResponsePredefinedType string const ( - DLPEntryGetResponsePredefinedEntryTypePredefined DLPEntryGetResponsePredefinedEntryType = "predefined" + DLPEntryGetResponsePredefinedTypePredefined DLPEntryGetResponsePredefinedType = "predefined" ) -func (r DLPEntryGetResponsePredefinedEntryType) IsKnown() bool { +func (r DLPEntryGetResponsePredefinedType) IsKnown() bool { switch r { - case DLPEntryGetResponsePredefinedEntryTypePredefined: + case DLPEntryGetResponsePredefinedTypePredefined: return true } return false } -type DLPEntryGetResponsePredefinedEntryVariant struct { - TopicType DLPEntryGetResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` - Type DLPEntryGetResponsePredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryGetResponsePredefinedEntryVariantJSON `json:"-"` +type DLPEntryGetResponsePredefinedVariant struct { + TopicType DLPEntryGetResponsePredefinedVariantTopicType `json:"topic_type,required"` + Type DLPEntryGetResponsePredefinedVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryGetResponsePredefinedVariantJSON `json:"-"` } -// dlpEntryGetResponsePredefinedEntryVariantJSON contains the JSON metadata for the -// struct [DLPEntryGetResponsePredefinedEntryVariant] -type dlpEntryGetResponsePredefinedEntryVariantJSON struct { +// dlpEntryGetResponsePredefinedVariantJSON contains the JSON metadata for the +// struct [DLPEntryGetResponsePredefinedVariant] +type dlpEntryGetResponsePredefinedVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -1459,57 +1466,57 @@ type dlpEntryGetResponsePredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponsePredefinedEntryVariantJSON) RawJSON() string { +func (r dlpEntryGetResponsePredefinedVariantJSON) RawJSON() string { return r.raw } -type DLPEntryGetResponsePredefinedEntryVariantTopicType string +type DLPEntryGetResponsePredefinedVariantTopicType string const ( - DLPEntryGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryGetResponsePredefinedEntryVariantTopicType = "Intent" - DLPEntryGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryGetResponsePredefinedEntryVariantTopicType = "Content" + DLPEntryGetResponsePredefinedVariantTopicTypeIntent DLPEntryGetResponsePredefinedVariantTopicType = "Intent" + DLPEntryGetResponsePredefinedVariantTopicTypeContent DLPEntryGetResponsePredefinedVariantTopicType = "Content" ) -func (r DLPEntryGetResponsePredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPEntryGetResponsePredefinedVariantTopicType) IsKnown() bool { switch r { - case DLPEntryGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryGetResponsePredefinedEntryVariantTopicTypeContent: + case DLPEntryGetResponsePredefinedVariantTopicTypeIntent, DLPEntryGetResponsePredefinedVariantTopicTypeContent: return true } return false } -type DLPEntryGetResponsePredefinedEntryVariantType string +type DLPEntryGetResponsePredefinedVariantType string const ( - DLPEntryGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryGetResponsePredefinedEntryVariantType = "PromptTopic" + DLPEntryGetResponsePredefinedVariantTypePromptTopic DLPEntryGetResponsePredefinedVariantType = "PromptTopic" ) -func (r DLPEntryGetResponsePredefinedEntryVariantType) IsKnown() bool { +func (r DLPEntryGetResponsePredefinedVariantType) IsKnown() bool { switch r { - case DLPEntryGetResponsePredefinedEntryVariantTypePromptTopic: + case DLPEntryGetResponsePredefinedVariantTypePromptTopic: return true } return false } -type DLPEntryGetResponseIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryGetResponseIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryGetResponseIntegrationEntryJSON `json:"-"` +type DLPEntryGetResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryGetResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryGetResponseIntegrationJSON `json:"-"` } -// dlpEntryGetResponseIntegrationEntryJSON contains the JSON metadata for the -// struct [DLPEntryGetResponseIntegrationEntry] -type dlpEntryGetResponseIntegrationEntryJSON struct { +// dlpEntryGetResponseIntegrationJSON contains the JSON metadata for the struct +// [DLPEntryGetResponseIntegration] +type dlpEntryGetResponseIntegrationJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1521,47 +1528,47 @@ type dlpEntryGetResponseIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseIntegrationEntryJSON) RawJSON() string { +func (r dlpEntryGetResponseIntegrationJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseIntegrationEntry) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseIntegration) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseIntegrationEntryType string +type DLPEntryGetResponseIntegrationType string const ( - DLPEntryGetResponseIntegrationEntryTypeIntegration DLPEntryGetResponseIntegrationEntryType = "integration" + DLPEntryGetResponseIntegrationTypeIntegration DLPEntryGetResponseIntegrationType = "integration" ) -func (r DLPEntryGetResponseIntegrationEntryType) IsKnown() bool { +func (r DLPEntryGetResponseIntegrationType) IsKnown() bool { switch r { - case DLPEntryGetResponseIntegrationEntryTypeIntegration: + case DLPEntryGetResponseIntegrationTypeIntegration: return true } return false } -type DLPEntryGetResponseExactDataEntry struct { +type DLPEntryGetResponseExactData struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryGetResponseExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryGetResponseExactDataEntryJSON `json:"-"` -} - -// dlpEntryGetResponseExactDataEntryJSON contains the JSON metadata for the struct -// [DLPEntryGetResponseExactDataEntry] -type dlpEntryGetResponseExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryGetResponseExactDataType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryGetResponseExactDataJSON `json:"-"` +} + +// dlpEntryGetResponseExactDataJSON contains the JSON metadata for the struct +// [DLPEntryGetResponseExactData] +type dlpEntryGetResponseExactDataJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -1574,43 +1581,43 @@ type dlpEntryGetResponseExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseExactData) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseExactDataEntryJSON) RawJSON() string { +func (r dlpEntryGetResponseExactDataJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseExactDataEntry) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseExactData) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseExactDataEntryType string +type DLPEntryGetResponseExactDataType string const ( - DLPEntryGetResponseExactDataEntryTypeExactData DLPEntryGetResponseExactDataEntryType = "exact_data" + DLPEntryGetResponseExactDataTypeExactData DLPEntryGetResponseExactDataType = "exact_data" ) -func (r DLPEntryGetResponseExactDataEntryType) IsKnown() bool { +func (r DLPEntryGetResponseExactDataType) IsKnown() bool { switch r { - case DLPEntryGetResponseExactDataEntryTypeExactData: + case DLPEntryGetResponseExactDataTypeExactData: return true } return false } -type DLPEntryGetResponseDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryGetResponseDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryGetResponseDocumentFingerprintEntryJSON `json:"-"` +type DLPEntryGetResponseDocumentFingerprint struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryGetResponseDocumentFingerprintType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryGetResponseDocumentFingerprintJSON `json:"-"` } -// dlpEntryGetResponseDocumentFingerprintEntryJSON contains the JSON metadata for -// the struct [DLPEntryGetResponseDocumentFingerprintEntry] -type dlpEntryGetResponseDocumentFingerprintEntryJSON struct { +// dlpEntryGetResponseDocumentFingerprintJSON contains the JSON metadata for the +// struct [DLPEntryGetResponseDocumentFingerprint] +type dlpEntryGetResponseDocumentFingerprintJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1621,45 +1628,45 @@ type dlpEntryGetResponseDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpEntryGetResponseDocumentFingerprintJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseDocumentFingerprintEntry) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseDocumentFingerprint) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseDocumentFingerprintEntryType string +type DLPEntryGetResponseDocumentFingerprintType string const ( - DLPEntryGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryGetResponseDocumentFingerprintEntryType = "document_fingerprint" + DLPEntryGetResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryGetResponseDocumentFingerprintType = "document_fingerprint" ) -func (r DLPEntryGetResponseDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPEntryGetResponseDocumentFingerprintType) IsKnown() bool { switch r { - case DLPEntryGetResponseDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPEntryGetResponseDocumentFingerprintTypeDocumentFingerprint: return true } return false } -type DLPEntryGetResponseWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryGetResponseWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryGetResponseWordListEntryJSON `json:"-"` +type DLPEntryGetResponseWordList struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryGetResponseWordListType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryGetResponseWordListJSON `json:"-"` } -// dlpEntryGetResponseWordListEntryJSON contains the JSON metadata for the struct -// [DLPEntryGetResponseWordListEntry] -type dlpEntryGetResponseWordListEntryJSON struct { +// dlpEntryGetResponseWordListJSON contains the JSON metadata for the struct +// [DLPEntryGetResponseWordList] +type dlpEntryGetResponseWordListJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1672,25 +1679,25 @@ type dlpEntryGetResponseWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseWordList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseWordListEntryJSON) RawJSON() string { +func (r dlpEntryGetResponseWordListJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseWordListEntry) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseWordList) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseWordListEntryType string +type DLPEntryGetResponseWordListType string const ( - DLPEntryGetResponseWordListEntryTypeWordList DLPEntryGetResponseWordListEntryType = "word_list" + DLPEntryGetResponseWordListTypeWordList DLPEntryGetResponseWordListType = "word_list" ) -func (r DLPEntryGetResponseWordListEntryType) IsKnown() bool { +func (r DLPEntryGetResponseWordListType) IsKnown() bool { switch r { - case DLPEntryGetResponseWordListEntryTypeWordList: + case DLPEntryGetResponseWordListTypeWordList: return true } return false diff --git a/zero_trust/dlpentrycustom.go b/zero_trust/dlpentrycustom.go index 4f4c2e52972..6891656994c 100644 --- a/zero_trust/dlpentrycustom.go +++ b/zero_trust/dlpentrycustom.go @@ -220,7 +220,7 @@ type DLPEntryCustomListResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryCustomListResponsePredefinedEntryConfidence]. + // [DLPEntryCustomListResponsePredefinedConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` @@ -228,7 +228,7 @@ type DLPEntryCustomListResponse struct { Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryCustomListResponsePredefinedEntryVariant]. + // [DLPEntryCustomListResponsePredefinedVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -272,22 +272,20 @@ func (r *DLPEntryCustomListResponse) UnmarshalJSON(data []byte) (err error) { // AsUnion returns a [DLPEntryCustomListResponseUnion] interface which you can cast // to the specific types for more type safety. // -// Possible runtime types of the union are [DLPEntryCustomListResponseCustomEntry], -// [DLPEntryCustomListResponsePredefinedEntry], -// [DLPEntryCustomListResponseIntegrationEntry], -// [DLPEntryCustomListResponseExactDataEntry], -// [DLPEntryCustomListResponseDocumentFingerprintEntry], -// [DLPEntryCustomListResponseWordListEntry]. +// Possible runtime types of the union are [DLPEntryCustomListResponseCustom], +// [DLPEntryCustomListResponsePredefined], [DLPEntryCustomListResponseIntegration], +// [DLPEntryCustomListResponseExactData], +// [DLPEntryCustomListResponseDocumentFingerprint], +// [DLPEntryCustomListResponseWordList]. func (r DLPEntryCustomListResponse) AsUnion() DLPEntryCustomListResponseUnion { return r.union } -// Union satisfied by [DLPEntryCustomListResponseCustomEntry], -// [DLPEntryCustomListResponsePredefinedEntry], -// [DLPEntryCustomListResponseIntegrationEntry], -// [DLPEntryCustomListResponseExactDataEntry], -// [DLPEntryCustomListResponseDocumentFingerprintEntry] or -// [DLPEntryCustomListResponseWordListEntry]. +// Union satisfied by [DLPEntryCustomListResponseCustom], +// [DLPEntryCustomListResponsePredefined], [DLPEntryCustomListResponseIntegration], +// [DLPEntryCustomListResponseExactData], +// [DLPEntryCustomListResponseDocumentFingerprint] or +// [DLPEntryCustomListResponseWordList]. type DLPEntryCustomListResponseUnion interface { implementsDLPEntryCustomListResponse() } @@ -295,49 +293,55 @@ type DLPEntryCustomListResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryCustomListResponseUnion)(nil)).Elem(), - "", + "type", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomListResponseCustomEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomListResponseCustom{}), + DiscriminatorValue: "custom", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomListResponsePredefinedEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomListResponsePredefined{}), + DiscriminatorValue: "predefined", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomListResponseIntegrationEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomListResponseIntegration{}), + DiscriminatorValue: "integration", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomListResponseExactDataEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomListResponseExactData{}), + DiscriminatorValue: "exact_data", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomListResponseDocumentFingerprintEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomListResponseDocumentFingerprint{}), + DiscriminatorValue: "document_fingerprint", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomListResponseWordListEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomListResponseWordList{}), + DiscriminatorValue: "word_list", }, ) } -type DLPEntryCustomListResponseCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryCustomListResponseCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryCustomListResponseCustomEntryJSON `json:"-"` +type DLPEntryCustomListResponseCustom struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryCustomListResponseCustomType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryCustomListResponseCustomJSON `json:"-"` } -// dlpEntryCustomListResponseCustomEntryJSON contains the JSON metadata for the -// struct [DLPEntryCustomListResponseCustomEntry] -type dlpEntryCustomListResponseCustomEntryJSON struct { +// dlpEntryCustomListResponseCustomJSON contains the JSON metadata for the struct +// [DLPEntryCustomListResponseCustom] +type dlpEntryCustomListResponseCustomJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -350,44 +354,44 @@ type dlpEntryCustomListResponseCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomListResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomListResponseCustom) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomListResponseCustomEntryJSON) RawJSON() string { +func (r dlpEntryCustomListResponseCustomJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomListResponseCustomEntry) implementsDLPEntryCustomListResponse() {} +func (r DLPEntryCustomListResponseCustom) implementsDLPEntryCustomListResponse() {} -type DLPEntryCustomListResponseCustomEntryType string +type DLPEntryCustomListResponseCustomType string const ( - DLPEntryCustomListResponseCustomEntryTypeCustom DLPEntryCustomListResponseCustomEntryType = "custom" + DLPEntryCustomListResponseCustomTypeCustom DLPEntryCustomListResponseCustomType = "custom" ) -func (r DLPEntryCustomListResponseCustomEntryType) IsKnown() bool { +func (r DLPEntryCustomListResponseCustomType) IsKnown() bool { switch r { - case DLPEntryCustomListResponseCustomEntryTypeCustom: + case DLPEntryCustomListResponseCustomTypeCustom: return true } return false } -type DLPEntryCustomListResponsePredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryCustomListResponsePredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomListResponsePredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryCustomListResponsePredefinedEntryVariant `json:"variant"` - JSON dlpEntryCustomListResponsePredefinedEntryJSON `json:"-"` +type DLPEntryCustomListResponsePredefined struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryCustomListResponsePredefinedConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomListResponsePredefinedType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPEntryCustomListResponsePredefinedVariant `json:"variant"` + JSON dlpEntryCustomListResponsePredefinedJSON `json:"-"` } -// dlpEntryCustomListResponsePredefinedEntryJSON contains the JSON metadata for the -// struct [DLPEntryCustomListResponsePredefinedEntry] -type dlpEntryCustomListResponsePredefinedEntryJSON struct { +// dlpEntryCustomListResponsePredefinedJSON contains the JSON metadata for the +// struct [DLPEntryCustomListResponsePredefined] +type dlpEntryCustomListResponsePredefinedJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -399,66 +403,66 @@ type dlpEntryCustomListResponsePredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomListResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomListResponsePredefined) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomListResponsePredefinedEntryJSON) RawJSON() string { +func (r dlpEntryCustomListResponsePredefinedJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomListResponsePredefinedEntry) implementsDLPEntryCustomListResponse() {} +func (r DLPEntryCustomListResponsePredefined) implementsDLPEntryCustomListResponse() {} -type DLPEntryCustomListResponsePredefinedEntryConfidence struct { +type DLPEntryCustomListResponsePredefinedConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryCustomListResponsePredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryCustomListResponsePredefinedConfidenceJSON `json:"-"` } -// dlpEntryCustomListResponsePredefinedEntryConfidenceJSON contains the JSON -// metadata for the struct [DLPEntryCustomListResponsePredefinedEntryConfidence] -type dlpEntryCustomListResponsePredefinedEntryConfidenceJSON struct { +// dlpEntryCustomListResponsePredefinedConfidenceJSON contains the JSON metadata +// for the struct [DLPEntryCustomListResponsePredefinedConfidence] +type dlpEntryCustomListResponsePredefinedConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomListResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomListResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomListResponsePredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpEntryCustomListResponsePredefinedConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryCustomListResponsePredefinedEntryType string +type DLPEntryCustomListResponsePredefinedType string const ( - DLPEntryCustomListResponsePredefinedEntryTypePredefined DLPEntryCustomListResponsePredefinedEntryType = "predefined" + DLPEntryCustomListResponsePredefinedTypePredefined DLPEntryCustomListResponsePredefinedType = "predefined" ) -func (r DLPEntryCustomListResponsePredefinedEntryType) IsKnown() bool { +func (r DLPEntryCustomListResponsePredefinedType) IsKnown() bool { switch r { - case DLPEntryCustomListResponsePredefinedEntryTypePredefined: + case DLPEntryCustomListResponsePredefinedTypePredefined: return true } return false } -type DLPEntryCustomListResponsePredefinedEntryVariant struct { - TopicType DLPEntryCustomListResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` - Type DLPEntryCustomListResponsePredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryCustomListResponsePredefinedEntryVariantJSON `json:"-"` +type DLPEntryCustomListResponsePredefinedVariant struct { + TopicType DLPEntryCustomListResponsePredefinedVariantTopicType `json:"topic_type,required"` + Type DLPEntryCustomListResponsePredefinedVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryCustomListResponsePredefinedVariantJSON `json:"-"` } -// dlpEntryCustomListResponsePredefinedEntryVariantJSON contains the JSON metadata -// for the struct [DLPEntryCustomListResponsePredefinedEntryVariant] -type dlpEntryCustomListResponsePredefinedEntryVariantJSON struct { +// dlpEntryCustomListResponsePredefinedVariantJSON contains the JSON metadata for +// the struct [DLPEntryCustomListResponsePredefinedVariant] +type dlpEntryCustomListResponsePredefinedVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -466,57 +470,57 @@ type dlpEntryCustomListResponsePredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomListResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomListResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomListResponsePredefinedEntryVariantJSON) RawJSON() string { +func (r dlpEntryCustomListResponsePredefinedVariantJSON) RawJSON() string { return r.raw } -type DLPEntryCustomListResponsePredefinedEntryVariantTopicType string +type DLPEntryCustomListResponsePredefinedVariantTopicType string const ( - DLPEntryCustomListResponsePredefinedEntryVariantTopicTypeIntent DLPEntryCustomListResponsePredefinedEntryVariantTopicType = "Intent" - DLPEntryCustomListResponsePredefinedEntryVariantTopicTypeContent DLPEntryCustomListResponsePredefinedEntryVariantTopicType = "Content" + DLPEntryCustomListResponsePredefinedVariantTopicTypeIntent DLPEntryCustomListResponsePredefinedVariantTopicType = "Intent" + DLPEntryCustomListResponsePredefinedVariantTopicTypeContent DLPEntryCustomListResponsePredefinedVariantTopicType = "Content" ) -func (r DLPEntryCustomListResponsePredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPEntryCustomListResponsePredefinedVariantTopicType) IsKnown() bool { switch r { - case DLPEntryCustomListResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryCustomListResponsePredefinedEntryVariantTopicTypeContent: + case DLPEntryCustomListResponsePredefinedVariantTopicTypeIntent, DLPEntryCustomListResponsePredefinedVariantTopicTypeContent: return true } return false } -type DLPEntryCustomListResponsePredefinedEntryVariantType string +type DLPEntryCustomListResponsePredefinedVariantType string const ( - DLPEntryCustomListResponsePredefinedEntryVariantTypePromptTopic DLPEntryCustomListResponsePredefinedEntryVariantType = "PromptTopic" + DLPEntryCustomListResponsePredefinedVariantTypePromptTopic DLPEntryCustomListResponsePredefinedVariantType = "PromptTopic" ) -func (r DLPEntryCustomListResponsePredefinedEntryVariantType) IsKnown() bool { +func (r DLPEntryCustomListResponsePredefinedVariantType) IsKnown() bool { switch r { - case DLPEntryCustomListResponsePredefinedEntryVariantTypePromptTopic: + case DLPEntryCustomListResponsePredefinedVariantTypePromptTopic: return true } return false } -type DLPEntryCustomListResponseIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomListResponseIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryCustomListResponseIntegrationEntryJSON `json:"-"` +type DLPEntryCustomListResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomListResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryCustomListResponseIntegrationJSON `json:"-"` } -// dlpEntryCustomListResponseIntegrationEntryJSON contains the JSON metadata for -// the struct [DLPEntryCustomListResponseIntegrationEntry] -type dlpEntryCustomListResponseIntegrationEntryJSON struct { +// dlpEntryCustomListResponseIntegrationJSON contains the JSON metadata for the +// struct [DLPEntryCustomListResponseIntegration] +type dlpEntryCustomListResponseIntegrationJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -528,47 +532,47 @@ type dlpEntryCustomListResponseIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomListResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomListResponseIntegration) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomListResponseIntegrationEntryJSON) RawJSON() string { +func (r dlpEntryCustomListResponseIntegrationJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomListResponseIntegrationEntry) implementsDLPEntryCustomListResponse() {} +func (r DLPEntryCustomListResponseIntegration) implementsDLPEntryCustomListResponse() {} -type DLPEntryCustomListResponseIntegrationEntryType string +type DLPEntryCustomListResponseIntegrationType string const ( - DLPEntryCustomListResponseIntegrationEntryTypeIntegration DLPEntryCustomListResponseIntegrationEntryType = "integration" + DLPEntryCustomListResponseIntegrationTypeIntegration DLPEntryCustomListResponseIntegrationType = "integration" ) -func (r DLPEntryCustomListResponseIntegrationEntryType) IsKnown() bool { +func (r DLPEntryCustomListResponseIntegrationType) IsKnown() bool { switch r { - case DLPEntryCustomListResponseIntegrationEntryTypeIntegration: + case DLPEntryCustomListResponseIntegrationTypeIntegration: return true } return false } -type DLPEntryCustomListResponseExactDataEntry struct { +type DLPEntryCustomListResponseExactData struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryCustomListResponseExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryCustomListResponseExactDataEntryJSON `json:"-"` -} - -// dlpEntryCustomListResponseExactDataEntryJSON contains the JSON metadata for the -// struct [DLPEntryCustomListResponseExactDataEntry] -type dlpEntryCustomListResponseExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryCustomListResponseExactDataType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryCustomListResponseExactDataJSON `json:"-"` +} + +// dlpEntryCustomListResponseExactDataJSON contains the JSON metadata for the +// struct [DLPEntryCustomListResponseExactData] +type dlpEntryCustomListResponseExactDataJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -581,43 +585,43 @@ type dlpEntryCustomListResponseExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomListResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomListResponseExactData) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomListResponseExactDataEntryJSON) RawJSON() string { +func (r dlpEntryCustomListResponseExactDataJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomListResponseExactDataEntry) implementsDLPEntryCustomListResponse() {} +func (r DLPEntryCustomListResponseExactData) implementsDLPEntryCustomListResponse() {} -type DLPEntryCustomListResponseExactDataEntryType string +type DLPEntryCustomListResponseExactDataType string const ( - DLPEntryCustomListResponseExactDataEntryTypeExactData DLPEntryCustomListResponseExactDataEntryType = "exact_data" + DLPEntryCustomListResponseExactDataTypeExactData DLPEntryCustomListResponseExactDataType = "exact_data" ) -func (r DLPEntryCustomListResponseExactDataEntryType) IsKnown() bool { +func (r DLPEntryCustomListResponseExactDataType) IsKnown() bool { switch r { - case DLPEntryCustomListResponseExactDataEntryTypeExactData: + case DLPEntryCustomListResponseExactDataTypeExactData: return true } return false } -type DLPEntryCustomListResponseDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomListResponseDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryCustomListResponseDocumentFingerprintEntryJSON `json:"-"` +type DLPEntryCustomListResponseDocumentFingerprint struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomListResponseDocumentFingerprintType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryCustomListResponseDocumentFingerprintJSON `json:"-"` } -// dlpEntryCustomListResponseDocumentFingerprintEntryJSON contains the JSON -// metadata for the struct [DLPEntryCustomListResponseDocumentFingerprintEntry] -type dlpEntryCustomListResponseDocumentFingerprintEntryJSON struct { +// dlpEntryCustomListResponseDocumentFingerprintJSON contains the JSON metadata for +// the struct [DLPEntryCustomListResponseDocumentFingerprint] +type dlpEntryCustomListResponseDocumentFingerprintJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -628,45 +632,45 @@ type dlpEntryCustomListResponseDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomListResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomListResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomListResponseDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpEntryCustomListResponseDocumentFingerprintJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomListResponseDocumentFingerprintEntry) implementsDLPEntryCustomListResponse() {} +func (r DLPEntryCustomListResponseDocumentFingerprint) implementsDLPEntryCustomListResponse() {} -type DLPEntryCustomListResponseDocumentFingerprintEntryType string +type DLPEntryCustomListResponseDocumentFingerprintType string const ( - DLPEntryCustomListResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryCustomListResponseDocumentFingerprintEntryType = "document_fingerprint" + DLPEntryCustomListResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryCustomListResponseDocumentFingerprintType = "document_fingerprint" ) -func (r DLPEntryCustomListResponseDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPEntryCustomListResponseDocumentFingerprintType) IsKnown() bool { switch r { - case DLPEntryCustomListResponseDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPEntryCustomListResponseDocumentFingerprintTypeDocumentFingerprint: return true } return false } -type DLPEntryCustomListResponseWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomListResponseWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryCustomListResponseWordListEntryJSON `json:"-"` +type DLPEntryCustomListResponseWordList struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomListResponseWordListType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryCustomListResponseWordListJSON `json:"-"` } -// dlpEntryCustomListResponseWordListEntryJSON contains the JSON metadata for the -// struct [DLPEntryCustomListResponseWordListEntry] -type dlpEntryCustomListResponseWordListEntryJSON struct { +// dlpEntryCustomListResponseWordListJSON contains the JSON metadata for the struct +// [DLPEntryCustomListResponseWordList] +type dlpEntryCustomListResponseWordListJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -679,25 +683,25 @@ type dlpEntryCustomListResponseWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomListResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomListResponseWordList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomListResponseWordListEntryJSON) RawJSON() string { +func (r dlpEntryCustomListResponseWordListJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomListResponseWordListEntry) implementsDLPEntryCustomListResponse() {} +func (r DLPEntryCustomListResponseWordList) implementsDLPEntryCustomListResponse() {} -type DLPEntryCustomListResponseWordListEntryType string +type DLPEntryCustomListResponseWordListType string const ( - DLPEntryCustomListResponseWordListEntryTypeWordList DLPEntryCustomListResponseWordListEntryType = "word_list" + DLPEntryCustomListResponseWordListTypeWordList DLPEntryCustomListResponseWordListType = "word_list" ) -func (r DLPEntryCustomListResponseWordListEntryType) IsKnown() bool { +func (r DLPEntryCustomListResponseWordListType) IsKnown() bool { switch r { - case DLPEntryCustomListResponseWordListEntryTypeWordList: + case DLPEntryCustomListResponseWordListTypeWordList: return true } return false @@ -733,7 +737,7 @@ type DLPEntryCustomGetResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryCustomGetResponsePredefinedEntryConfidence]. + // [DLPEntryCustomGetResponsePredefinedConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` @@ -741,7 +745,7 @@ type DLPEntryCustomGetResponse struct { Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryCustomGetResponsePredefinedEntryVariant]. + // [DLPEntryCustomGetResponsePredefinedVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -785,22 +789,20 @@ func (r *DLPEntryCustomGetResponse) UnmarshalJSON(data []byte) (err error) { // AsUnion returns a [DLPEntryCustomGetResponseUnion] interface which you can cast // to the specific types for more type safety. // -// Possible runtime types of the union are [DLPEntryCustomGetResponseCustomEntry], -// [DLPEntryCustomGetResponsePredefinedEntry], -// [DLPEntryCustomGetResponseIntegrationEntry], -// [DLPEntryCustomGetResponseExactDataEntry], -// [DLPEntryCustomGetResponseDocumentFingerprintEntry], -// [DLPEntryCustomGetResponseWordListEntry]. +// Possible runtime types of the union are [DLPEntryCustomGetResponseCustom], +// [DLPEntryCustomGetResponsePredefined], [DLPEntryCustomGetResponseIntegration], +// [DLPEntryCustomGetResponseExactData], +// [DLPEntryCustomGetResponseDocumentFingerprint], +// [DLPEntryCustomGetResponseWordList]. func (r DLPEntryCustomGetResponse) AsUnion() DLPEntryCustomGetResponseUnion { return r.union } -// Union satisfied by [DLPEntryCustomGetResponseCustomEntry], -// [DLPEntryCustomGetResponsePredefinedEntry], -// [DLPEntryCustomGetResponseIntegrationEntry], -// [DLPEntryCustomGetResponseExactDataEntry], -// [DLPEntryCustomGetResponseDocumentFingerprintEntry] or -// [DLPEntryCustomGetResponseWordListEntry]. +// Union satisfied by [DLPEntryCustomGetResponseCustom], +// [DLPEntryCustomGetResponsePredefined], [DLPEntryCustomGetResponseIntegration], +// [DLPEntryCustomGetResponseExactData], +// [DLPEntryCustomGetResponseDocumentFingerprint] or +// [DLPEntryCustomGetResponseWordList]. type DLPEntryCustomGetResponseUnion interface { implementsDLPEntryCustomGetResponse() } @@ -808,49 +810,55 @@ type DLPEntryCustomGetResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryCustomGetResponseUnion)(nil)).Elem(), - "", + "type", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseCustomEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseCustom{}), + DiscriminatorValue: "custom", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponsePredefinedEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponsePredefined{}), + DiscriminatorValue: "predefined", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseIntegrationEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseIntegration{}), + DiscriminatorValue: "integration", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseExactDataEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseExactData{}), + DiscriminatorValue: "exact_data", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseDocumentFingerprintEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseDocumentFingerprint{}), + DiscriminatorValue: "document_fingerprint", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseWordListEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseWordList{}), + DiscriminatorValue: "word_list", }, ) } -type DLPEntryCustomGetResponseCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryCustomGetResponseCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryCustomGetResponseCustomEntryJSON `json:"-"` +type DLPEntryCustomGetResponseCustom struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryCustomGetResponseCustomType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryCustomGetResponseCustomJSON `json:"-"` } -// dlpEntryCustomGetResponseCustomEntryJSON contains the JSON metadata for the -// struct [DLPEntryCustomGetResponseCustomEntry] -type dlpEntryCustomGetResponseCustomEntryJSON struct { +// dlpEntryCustomGetResponseCustomJSON contains the JSON metadata for the struct +// [DLPEntryCustomGetResponseCustom] +type dlpEntryCustomGetResponseCustomJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -863,44 +871,44 @@ type dlpEntryCustomGetResponseCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseCustom) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseCustomEntryJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseCustomJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseCustomEntry) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseCustom) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseCustomEntryType string +type DLPEntryCustomGetResponseCustomType string const ( - DLPEntryCustomGetResponseCustomEntryTypeCustom DLPEntryCustomGetResponseCustomEntryType = "custom" + DLPEntryCustomGetResponseCustomTypeCustom DLPEntryCustomGetResponseCustomType = "custom" ) -func (r DLPEntryCustomGetResponseCustomEntryType) IsKnown() bool { +func (r DLPEntryCustomGetResponseCustomType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseCustomEntryTypeCustom: + case DLPEntryCustomGetResponseCustomTypeCustom: return true } return false } -type DLPEntryCustomGetResponsePredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryCustomGetResponsePredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomGetResponsePredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryCustomGetResponsePredefinedEntryVariant `json:"variant"` - JSON dlpEntryCustomGetResponsePredefinedEntryJSON `json:"-"` +type DLPEntryCustomGetResponsePredefined struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryCustomGetResponsePredefinedConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomGetResponsePredefinedType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPEntryCustomGetResponsePredefinedVariant `json:"variant"` + JSON dlpEntryCustomGetResponsePredefinedJSON `json:"-"` } -// dlpEntryCustomGetResponsePredefinedEntryJSON contains the JSON metadata for the -// struct [DLPEntryCustomGetResponsePredefinedEntry] -type dlpEntryCustomGetResponsePredefinedEntryJSON struct { +// dlpEntryCustomGetResponsePredefinedJSON contains the JSON metadata for the +// struct [DLPEntryCustomGetResponsePredefined] +type dlpEntryCustomGetResponsePredefinedJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -912,66 +920,66 @@ type dlpEntryCustomGetResponsePredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponsePredefinedEntryJSON) RawJSON() string { +func (r dlpEntryCustomGetResponsePredefinedJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponsePredefinedEntry) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponsePredefined) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponsePredefinedEntryConfidence struct { +type DLPEntryCustomGetResponsePredefinedConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryCustomGetResponsePredefinedConfidenceJSON `json:"-"` } -// dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON contains the JSON -// metadata for the struct [DLPEntryCustomGetResponsePredefinedEntryConfidence] -type dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON struct { +// dlpEntryCustomGetResponsePredefinedConfidenceJSON contains the JSON metadata for +// the struct [DLPEntryCustomGetResponsePredefinedConfidence] +type dlpEntryCustomGetResponsePredefinedConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpEntryCustomGetResponsePredefinedConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryCustomGetResponsePredefinedEntryType string +type DLPEntryCustomGetResponsePredefinedType string const ( - DLPEntryCustomGetResponsePredefinedEntryTypePredefined DLPEntryCustomGetResponsePredefinedEntryType = "predefined" + DLPEntryCustomGetResponsePredefinedTypePredefined DLPEntryCustomGetResponsePredefinedType = "predefined" ) -func (r DLPEntryCustomGetResponsePredefinedEntryType) IsKnown() bool { +func (r DLPEntryCustomGetResponsePredefinedType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponsePredefinedEntryTypePredefined: + case DLPEntryCustomGetResponsePredefinedTypePredefined: return true } return false } -type DLPEntryCustomGetResponsePredefinedEntryVariant struct { - TopicType DLPEntryCustomGetResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` - Type DLPEntryCustomGetResponsePredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryCustomGetResponsePredefinedEntryVariantJSON `json:"-"` +type DLPEntryCustomGetResponsePredefinedVariant struct { + TopicType DLPEntryCustomGetResponsePredefinedVariantTopicType `json:"topic_type,required"` + Type DLPEntryCustomGetResponsePredefinedVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryCustomGetResponsePredefinedVariantJSON `json:"-"` } -// dlpEntryCustomGetResponsePredefinedEntryVariantJSON contains the JSON metadata -// for the struct [DLPEntryCustomGetResponsePredefinedEntryVariant] -type dlpEntryCustomGetResponsePredefinedEntryVariantJSON struct { +// dlpEntryCustomGetResponsePredefinedVariantJSON contains the JSON metadata for +// the struct [DLPEntryCustomGetResponsePredefinedVariant] +type dlpEntryCustomGetResponsePredefinedVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -979,57 +987,57 @@ type dlpEntryCustomGetResponsePredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponsePredefinedEntryVariantJSON) RawJSON() string { +func (r dlpEntryCustomGetResponsePredefinedVariantJSON) RawJSON() string { return r.raw } -type DLPEntryCustomGetResponsePredefinedEntryVariantTopicType string +type DLPEntryCustomGetResponsePredefinedVariantTopicType string const ( - DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryCustomGetResponsePredefinedEntryVariantTopicType = "Intent" - DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryCustomGetResponsePredefinedEntryVariantTopicType = "Content" + DLPEntryCustomGetResponsePredefinedVariantTopicTypeIntent DLPEntryCustomGetResponsePredefinedVariantTopicType = "Intent" + DLPEntryCustomGetResponsePredefinedVariantTopicTypeContent DLPEntryCustomGetResponsePredefinedVariantTopicType = "Content" ) -func (r DLPEntryCustomGetResponsePredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPEntryCustomGetResponsePredefinedVariantTopicType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeContent: + case DLPEntryCustomGetResponsePredefinedVariantTopicTypeIntent, DLPEntryCustomGetResponsePredefinedVariantTopicTypeContent: return true } return false } -type DLPEntryCustomGetResponsePredefinedEntryVariantType string +type DLPEntryCustomGetResponsePredefinedVariantType string const ( - DLPEntryCustomGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryCustomGetResponsePredefinedEntryVariantType = "PromptTopic" + DLPEntryCustomGetResponsePredefinedVariantTypePromptTopic DLPEntryCustomGetResponsePredefinedVariantType = "PromptTopic" ) -func (r DLPEntryCustomGetResponsePredefinedEntryVariantType) IsKnown() bool { +func (r DLPEntryCustomGetResponsePredefinedVariantType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponsePredefinedEntryVariantTypePromptTopic: + case DLPEntryCustomGetResponsePredefinedVariantTypePromptTopic: return true } return false } -type DLPEntryCustomGetResponseIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomGetResponseIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryCustomGetResponseIntegrationEntryJSON `json:"-"` +type DLPEntryCustomGetResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomGetResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryCustomGetResponseIntegrationJSON `json:"-"` } -// dlpEntryCustomGetResponseIntegrationEntryJSON contains the JSON metadata for the -// struct [DLPEntryCustomGetResponseIntegrationEntry] -type dlpEntryCustomGetResponseIntegrationEntryJSON struct { +// dlpEntryCustomGetResponseIntegrationJSON contains the JSON metadata for the +// struct [DLPEntryCustomGetResponseIntegration] +type dlpEntryCustomGetResponseIntegrationJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1041,47 +1049,47 @@ type dlpEntryCustomGetResponseIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseIntegrationEntryJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseIntegrationJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseIntegrationEntry) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseIntegration) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseIntegrationEntryType string +type DLPEntryCustomGetResponseIntegrationType string const ( - DLPEntryCustomGetResponseIntegrationEntryTypeIntegration DLPEntryCustomGetResponseIntegrationEntryType = "integration" + DLPEntryCustomGetResponseIntegrationTypeIntegration DLPEntryCustomGetResponseIntegrationType = "integration" ) -func (r DLPEntryCustomGetResponseIntegrationEntryType) IsKnown() bool { +func (r DLPEntryCustomGetResponseIntegrationType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseIntegrationEntryTypeIntegration: + case DLPEntryCustomGetResponseIntegrationTypeIntegration: return true } return false } -type DLPEntryCustomGetResponseExactDataEntry struct { +type DLPEntryCustomGetResponseExactData struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryCustomGetResponseExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryCustomGetResponseExactDataEntryJSON `json:"-"` -} - -// dlpEntryCustomGetResponseExactDataEntryJSON contains the JSON metadata for the -// struct [DLPEntryCustomGetResponseExactDataEntry] -type dlpEntryCustomGetResponseExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryCustomGetResponseExactDataType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryCustomGetResponseExactDataJSON `json:"-"` +} + +// dlpEntryCustomGetResponseExactDataJSON contains the JSON metadata for the struct +// [DLPEntryCustomGetResponseExactData] +type dlpEntryCustomGetResponseExactDataJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -1094,43 +1102,43 @@ type dlpEntryCustomGetResponseExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseExactData) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseExactDataEntryJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseExactDataJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseExactDataEntry) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseExactData) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseExactDataEntryType string +type DLPEntryCustomGetResponseExactDataType string const ( - DLPEntryCustomGetResponseExactDataEntryTypeExactData DLPEntryCustomGetResponseExactDataEntryType = "exact_data" + DLPEntryCustomGetResponseExactDataTypeExactData DLPEntryCustomGetResponseExactDataType = "exact_data" ) -func (r DLPEntryCustomGetResponseExactDataEntryType) IsKnown() bool { +func (r DLPEntryCustomGetResponseExactDataType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseExactDataEntryTypeExactData: + case DLPEntryCustomGetResponseExactDataTypeExactData: return true } return false } -type DLPEntryCustomGetResponseDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomGetResponseDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryCustomGetResponseDocumentFingerprintEntryJSON `json:"-"` +type DLPEntryCustomGetResponseDocumentFingerprint struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomGetResponseDocumentFingerprintType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryCustomGetResponseDocumentFingerprintJSON `json:"-"` } -// dlpEntryCustomGetResponseDocumentFingerprintEntryJSON contains the JSON metadata -// for the struct [DLPEntryCustomGetResponseDocumentFingerprintEntry] -type dlpEntryCustomGetResponseDocumentFingerprintEntryJSON struct { +// dlpEntryCustomGetResponseDocumentFingerprintJSON contains the JSON metadata for +// the struct [DLPEntryCustomGetResponseDocumentFingerprint] +type dlpEntryCustomGetResponseDocumentFingerprintJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1141,45 +1149,45 @@ type dlpEntryCustomGetResponseDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseDocumentFingerprintJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseDocumentFingerprintEntry) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseDocumentFingerprint) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseDocumentFingerprintEntryType string +type DLPEntryCustomGetResponseDocumentFingerprintType string const ( - DLPEntryCustomGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryCustomGetResponseDocumentFingerprintEntryType = "document_fingerprint" + DLPEntryCustomGetResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryCustomGetResponseDocumentFingerprintType = "document_fingerprint" ) -func (r DLPEntryCustomGetResponseDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPEntryCustomGetResponseDocumentFingerprintType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPEntryCustomGetResponseDocumentFingerprintTypeDocumentFingerprint: return true } return false } -type DLPEntryCustomGetResponseWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomGetResponseWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryCustomGetResponseWordListEntryJSON `json:"-"` +type DLPEntryCustomGetResponseWordList struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomGetResponseWordListType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryCustomGetResponseWordListJSON `json:"-"` } -// dlpEntryCustomGetResponseWordListEntryJSON contains the JSON metadata for the -// struct [DLPEntryCustomGetResponseWordListEntry] -type dlpEntryCustomGetResponseWordListEntryJSON struct { +// dlpEntryCustomGetResponseWordListJSON contains the JSON metadata for the struct +// [DLPEntryCustomGetResponseWordList] +type dlpEntryCustomGetResponseWordListJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1192,25 +1200,25 @@ type dlpEntryCustomGetResponseWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseWordList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseWordListEntryJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseWordListJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseWordListEntry) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseWordList) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseWordListEntryType string +type DLPEntryCustomGetResponseWordListType string const ( - DLPEntryCustomGetResponseWordListEntryTypeWordList DLPEntryCustomGetResponseWordListEntryType = "word_list" + DLPEntryCustomGetResponseWordListTypeWordList DLPEntryCustomGetResponseWordListType = "word_list" ) -func (r DLPEntryCustomGetResponseWordListEntryType) IsKnown() bool { +func (r DLPEntryCustomGetResponseWordListType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseWordListEntryTypeWordList: + case DLPEntryCustomGetResponseWordListTypeWordList: return true } return false diff --git a/zero_trust/dlpentryintegration.go b/zero_trust/dlpentryintegration.go index 9da59a5983f..bd6f5e19cab 100644 --- a/zero_trust/dlpentryintegration.go +++ b/zero_trust/dlpentryintegration.go @@ -39,7 +39,7 @@ func NewDLPEntryIntegrationService(opts ...option.RequestOption) (r *DLPEntryInt } // Integration entries can't be created, this will update an existing integration -// entry This is needed for our generated terraform API +// entry. This is needed for our generated terraform API. func (r *DLPEntryIntegrationService) New(ctx context.Context, params DLPEntryIntegrationNewParams, opts ...option.RequestOption) (res *DLPEntryIntegrationNewResponse, err error) { var env DLPEntryIntegrationNewResponseEnvelope opts = slices.Concat(r.Options, opts) @@ -105,7 +105,7 @@ func (r *DLPEntryIntegrationService) ListAutoPaging(ctx context.Context, query D } // This is a no-op as integration entires can't be deleted but is needed for our -// generated terraform API +// generated terraform API. func (r *DLPEntryIntegrationService) Delete(ctx context.Context, entryID string, body DLPEntryIntegrationDeleteParams, opts ...option.RequestOption) (res *DLPEntryIntegrationDeleteResponse, err error) { var env DLPEntryIntegrationDeleteResponseEnvelope opts = slices.Concat(r.Options, opts) @@ -218,7 +218,7 @@ type DLPEntryIntegrationListResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryIntegrationListResponsePredefinedEntryConfidence]. + // [DLPEntryIntegrationListResponsePredefinedConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` @@ -226,7 +226,7 @@ type DLPEntryIntegrationListResponse struct { Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryIntegrationListResponsePredefinedEntryVariant]. + // [DLPEntryIntegrationListResponsePredefinedVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -270,23 +270,22 @@ func (r *DLPEntryIntegrationListResponse) UnmarshalJSON(data []byte) (err error) // AsUnion returns a [DLPEntryIntegrationListResponseUnion] interface which you can // cast to the specific types for more type safety. // -// Possible runtime types of the union are -// [DLPEntryIntegrationListResponseCustomEntry], -// [DLPEntryIntegrationListResponsePredefinedEntry], -// [DLPEntryIntegrationListResponseIntegrationEntry], -// [DLPEntryIntegrationListResponseExactDataEntry], -// [DLPEntryIntegrationListResponseDocumentFingerprintEntry], -// [DLPEntryIntegrationListResponseWordListEntry]. +// Possible runtime types of the union are [DLPEntryIntegrationListResponseCustom], +// [DLPEntryIntegrationListResponsePredefined], +// [DLPEntryIntegrationListResponseIntegration], +// [DLPEntryIntegrationListResponseExactData], +// [DLPEntryIntegrationListResponseDocumentFingerprint], +// [DLPEntryIntegrationListResponseWordList]. func (r DLPEntryIntegrationListResponse) AsUnion() DLPEntryIntegrationListResponseUnion { return r.union } -// Union satisfied by [DLPEntryIntegrationListResponseCustomEntry], -// [DLPEntryIntegrationListResponsePredefinedEntry], -// [DLPEntryIntegrationListResponseIntegrationEntry], -// [DLPEntryIntegrationListResponseExactDataEntry], -// [DLPEntryIntegrationListResponseDocumentFingerprintEntry] or -// [DLPEntryIntegrationListResponseWordListEntry]. +// Union satisfied by [DLPEntryIntegrationListResponseCustom], +// [DLPEntryIntegrationListResponsePredefined], +// [DLPEntryIntegrationListResponseIntegration], +// [DLPEntryIntegrationListResponseExactData], +// [DLPEntryIntegrationListResponseDocumentFingerprint] or +// [DLPEntryIntegrationListResponseWordList]. type DLPEntryIntegrationListResponseUnion interface { implementsDLPEntryIntegrationListResponse() } @@ -294,49 +293,55 @@ type DLPEntryIntegrationListResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryIntegrationListResponseUnion)(nil)).Elem(), - "", + "type", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationListResponseCustomEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationListResponseCustom{}), + DiscriminatorValue: "custom", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationListResponsePredefinedEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationListResponsePredefined{}), + DiscriminatorValue: "predefined", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationListResponseIntegrationEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationListResponseIntegration{}), + DiscriminatorValue: "integration", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationListResponseExactDataEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationListResponseExactData{}), + DiscriminatorValue: "exact_data", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationListResponseDocumentFingerprintEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationListResponseDocumentFingerprint{}), + DiscriminatorValue: "document_fingerprint", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationListResponseWordListEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationListResponseWordList{}), + DiscriminatorValue: "word_list", }, ) } -type DLPEntryIntegrationListResponseCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryIntegrationListResponseCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryIntegrationListResponseCustomEntryJSON `json:"-"` +type DLPEntryIntegrationListResponseCustom struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryIntegrationListResponseCustomType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryIntegrationListResponseCustomJSON `json:"-"` } -// dlpEntryIntegrationListResponseCustomEntryJSON contains the JSON metadata for -// the struct [DLPEntryIntegrationListResponseCustomEntry] -type dlpEntryIntegrationListResponseCustomEntryJSON struct { +// dlpEntryIntegrationListResponseCustomJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationListResponseCustom] +type dlpEntryIntegrationListResponseCustomJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -349,44 +354,44 @@ type dlpEntryIntegrationListResponseCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationListResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationListResponseCustom) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationListResponseCustomEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationListResponseCustomJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationListResponseCustomEntry) implementsDLPEntryIntegrationListResponse() {} +func (r DLPEntryIntegrationListResponseCustom) implementsDLPEntryIntegrationListResponse() {} -type DLPEntryIntegrationListResponseCustomEntryType string +type DLPEntryIntegrationListResponseCustomType string const ( - DLPEntryIntegrationListResponseCustomEntryTypeCustom DLPEntryIntegrationListResponseCustomEntryType = "custom" + DLPEntryIntegrationListResponseCustomTypeCustom DLPEntryIntegrationListResponseCustomType = "custom" ) -func (r DLPEntryIntegrationListResponseCustomEntryType) IsKnown() bool { +func (r DLPEntryIntegrationListResponseCustomType) IsKnown() bool { switch r { - case DLPEntryIntegrationListResponseCustomEntryTypeCustom: + case DLPEntryIntegrationListResponseCustomTypeCustom: return true } return false } -type DLPEntryIntegrationListResponsePredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryIntegrationListResponsePredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationListResponsePredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryIntegrationListResponsePredefinedEntryVariant `json:"variant"` - JSON dlpEntryIntegrationListResponsePredefinedEntryJSON `json:"-"` +type DLPEntryIntegrationListResponsePredefined struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryIntegrationListResponsePredefinedConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationListResponsePredefinedType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPEntryIntegrationListResponsePredefinedVariant `json:"variant"` + JSON dlpEntryIntegrationListResponsePredefinedJSON `json:"-"` } -// dlpEntryIntegrationListResponsePredefinedEntryJSON contains the JSON metadata -// for the struct [DLPEntryIntegrationListResponsePredefinedEntry] -type dlpEntryIntegrationListResponsePredefinedEntryJSON struct { +// dlpEntryIntegrationListResponsePredefinedJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationListResponsePredefined] +type dlpEntryIntegrationListResponsePredefinedJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -398,67 +403,66 @@ type dlpEntryIntegrationListResponsePredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationListResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationListResponsePredefined) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationListResponsePredefinedEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationListResponsePredefinedJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationListResponsePredefinedEntry) implementsDLPEntryIntegrationListResponse() {} +func (r DLPEntryIntegrationListResponsePredefined) implementsDLPEntryIntegrationListResponse() {} -type DLPEntryIntegrationListResponsePredefinedEntryConfidence struct { +type DLPEntryIntegrationListResponsePredefinedConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryIntegrationListResponsePredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryIntegrationListResponsePredefinedConfidenceJSON `json:"-"` } -// dlpEntryIntegrationListResponsePredefinedEntryConfidenceJSON contains the JSON -// metadata for the struct -// [DLPEntryIntegrationListResponsePredefinedEntryConfidence] -type dlpEntryIntegrationListResponsePredefinedEntryConfidenceJSON struct { +// dlpEntryIntegrationListResponsePredefinedConfidenceJSON contains the JSON +// metadata for the struct [DLPEntryIntegrationListResponsePredefinedConfidence] +type dlpEntryIntegrationListResponsePredefinedConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationListResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationListResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationListResponsePredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpEntryIntegrationListResponsePredefinedConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryIntegrationListResponsePredefinedEntryType string +type DLPEntryIntegrationListResponsePredefinedType string const ( - DLPEntryIntegrationListResponsePredefinedEntryTypePredefined DLPEntryIntegrationListResponsePredefinedEntryType = "predefined" + DLPEntryIntegrationListResponsePredefinedTypePredefined DLPEntryIntegrationListResponsePredefinedType = "predefined" ) -func (r DLPEntryIntegrationListResponsePredefinedEntryType) IsKnown() bool { +func (r DLPEntryIntegrationListResponsePredefinedType) IsKnown() bool { switch r { - case DLPEntryIntegrationListResponsePredefinedEntryTypePredefined: + case DLPEntryIntegrationListResponsePredefinedTypePredefined: return true } return false } -type DLPEntryIntegrationListResponsePredefinedEntryVariant struct { - TopicType DLPEntryIntegrationListResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` - Type DLPEntryIntegrationListResponsePredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryIntegrationListResponsePredefinedEntryVariantJSON `json:"-"` +type DLPEntryIntegrationListResponsePredefinedVariant struct { + TopicType DLPEntryIntegrationListResponsePredefinedVariantTopicType `json:"topic_type,required"` + Type DLPEntryIntegrationListResponsePredefinedVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryIntegrationListResponsePredefinedVariantJSON `json:"-"` } -// dlpEntryIntegrationListResponsePredefinedEntryVariantJSON contains the JSON -// metadata for the struct [DLPEntryIntegrationListResponsePredefinedEntryVariant] -type dlpEntryIntegrationListResponsePredefinedEntryVariantJSON struct { +// dlpEntryIntegrationListResponsePredefinedVariantJSON contains the JSON metadata +// for the struct [DLPEntryIntegrationListResponsePredefinedVariant] +type dlpEntryIntegrationListResponsePredefinedVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -466,57 +470,57 @@ type dlpEntryIntegrationListResponsePredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationListResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationListResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationListResponsePredefinedEntryVariantJSON) RawJSON() string { +func (r dlpEntryIntegrationListResponsePredefinedVariantJSON) RawJSON() string { return r.raw } -type DLPEntryIntegrationListResponsePredefinedEntryVariantTopicType string +type DLPEntryIntegrationListResponsePredefinedVariantTopicType string const ( - DLPEntryIntegrationListResponsePredefinedEntryVariantTopicTypeIntent DLPEntryIntegrationListResponsePredefinedEntryVariantTopicType = "Intent" - DLPEntryIntegrationListResponsePredefinedEntryVariantTopicTypeContent DLPEntryIntegrationListResponsePredefinedEntryVariantTopicType = "Content" + DLPEntryIntegrationListResponsePredefinedVariantTopicTypeIntent DLPEntryIntegrationListResponsePredefinedVariantTopicType = "Intent" + DLPEntryIntegrationListResponsePredefinedVariantTopicTypeContent DLPEntryIntegrationListResponsePredefinedVariantTopicType = "Content" ) -func (r DLPEntryIntegrationListResponsePredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPEntryIntegrationListResponsePredefinedVariantTopicType) IsKnown() bool { switch r { - case DLPEntryIntegrationListResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryIntegrationListResponsePredefinedEntryVariantTopicTypeContent: + case DLPEntryIntegrationListResponsePredefinedVariantTopicTypeIntent, DLPEntryIntegrationListResponsePredefinedVariantTopicTypeContent: return true } return false } -type DLPEntryIntegrationListResponsePredefinedEntryVariantType string +type DLPEntryIntegrationListResponsePredefinedVariantType string const ( - DLPEntryIntegrationListResponsePredefinedEntryVariantTypePromptTopic DLPEntryIntegrationListResponsePredefinedEntryVariantType = "PromptTopic" + DLPEntryIntegrationListResponsePredefinedVariantTypePromptTopic DLPEntryIntegrationListResponsePredefinedVariantType = "PromptTopic" ) -func (r DLPEntryIntegrationListResponsePredefinedEntryVariantType) IsKnown() bool { +func (r DLPEntryIntegrationListResponsePredefinedVariantType) IsKnown() bool { switch r { - case DLPEntryIntegrationListResponsePredefinedEntryVariantTypePromptTopic: + case DLPEntryIntegrationListResponsePredefinedVariantTypePromptTopic: return true } return false } -type DLPEntryIntegrationListResponseIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationListResponseIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryIntegrationListResponseIntegrationEntryJSON `json:"-"` +type DLPEntryIntegrationListResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationListResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryIntegrationListResponseIntegrationJSON `json:"-"` } -// dlpEntryIntegrationListResponseIntegrationEntryJSON contains the JSON metadata -// for the struct [DLPEntryIntegrationListResponseIntegrationEntry] -type dlpEntryIntegrationListResponseIntegrationEntryJSON struct { +// dlpEntryIntegrationListResponseIntegrationJSON contains the JSON metadata for +// the struct [DLPEntryIntegrationListResponseIntegration] +type dlpEntryIntegrationListResponseIntegrationJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -528,48 +532,47 @@ type dlpEntryIntegrationListResponseIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationListResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationListResponseIntegration) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationListResponseIntegrationEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationListResponseIntegrationJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationListResponseIntegrationEntry) implementsDLPEntryIntegrationListResponse() { -} +func (r DLPEntryIntegrationListResponseIntegration) implementsDLPEntryIntegrationListResponse() {} -type DLPEntryIntegrationListResponseIntegrationEntryType string +type DLPEntryIntegrationListResponseIntegrationType string const ( - DLPEntryIntegrationListResponseIntegrationEntryTypeIntegration DLPEntryIntegrationListResponseIntegrationEntryType = "integration" + DLPEntryIntegrationListResponseIntegrationTypeIntegration DLPEntryIntegrationListResponseIntegrationType = "integration" ) -func (r DLPEntryIntegrationListResponseIntegrationEntryType) IsKnown() bool { +func (r DLPEntryIntegrationListResponseIntegrationType) IsKnown() bool { switch r { - case DLPEntryIntegrationListResponseIntegrationEntryTypeIntegration: + case DLPEntryIntegrationListResponseIntegrationTypeIntegration: return true } return false } -type DLPEntryIntegrationListResponseExactDataEntry struct { +type DLPEntryIntegrationListResponseExactData struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryIntegrationListResponseExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryIntegrationListResponseExactDataEntryJSON `json:"-"` -} - -// dlpEntryIntegrationListResponseExactDataEntryJSON contains the JSON metadata for -// the struct [DLPEntryIntegrationListResponseExactDataEntry] -type dlpEntryIntegrationListResponseExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryIntegrationListResponseExactDataType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryIntegrationListResponseExactDataJSON `json:"-"` +} + +// dlpEntryIntegrationListResponseExactDataJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationListResponseExactData] +type dlpEntryIntegrationListResponseExactDataJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -582,44 +585,43 @@ type dlpEntryIntegrationListResponseExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationListResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationListResponseExactData) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationListResponseExactDataEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationListResponseExactDataJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationListResponseExactDataEntry) implementsDLPEntryIntegrationListResponse() {} +func (r DLPEntryIntegrationListResponseExactData) implementsDLPEntryIntegrationListResponse() {} -type DLPEntryIntegrationListResponseExactDataEntryType string +type DLPEntryIntegrationListResponseExactDataType string const ( - DLPEntryIntegrationListResponseExactDataEntryTypeExactData DLPEntryIntegrationListResponseExactDataEntryType = "exact_data" + DLPEntryIntegrationListResponseExactDataTypeExactData DLPEntryIntegrationListResponseExactDataType = "exact_data" ) -func (r DLPEntryIntegrationListResponseExactDataEntryType) IsKnown() bool { +func (r DLPEntryIntegrationListResponseExactDataType) IsKnown() bool { switch r { - case DLPEntryIntegrationListResponseExactDataEntryTypeExactData: + case DLPEntryIntegrationListResponseExactDataTypeExactData: return true } return false } -type DLPEntryIntegrationListResponseDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationListResponseDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryIntegrationListResponseDocumentFingerprintEntryJSON `json:"-"` +type DLPEntryIntegrationListResponseDocumentFingerprint struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationListResponseDocumentFingerprintType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryIntegrationListResponseDocumentFingerprintJSON `json:"-"` } -// dlpEntryIntegrationListResponseDocumentFingerprintEntryJSON contains the JSON -// metadata for the struct -// [DLPEntryIntegrationListResponseDocumentFingerprintEntry] -type dlpEntryIntegrationListResponseDocumentFingerprintEntryJSON struct { +// dlpEntryIntegrationListResponseDocumentFingerprintJSON contains the JSON +// metadata for the struct [DLPEntryIntegrationListResponseDocumentFingerprint] +type dlpEntryIntegrationListResponseDocumentFingerprintJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -630,46 +632,46 @@ type dlpEntryIntegrationListResponseDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationListResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationListResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationListResponseDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationListResponseDocumentFingerprintJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationListResponseDocumentFingerprintEntry) implementsDLPEntryIntegrationListResponse() { +func (r DLPEntryIntegrationListResponseDocumentFingerprint) implementsDLPEntryIntegrationListResponse() { } -type DLPEntryIntegrationListResponseDocumentFingerprintEntryType string +type DLPEntryIntegrationListResponseDocumentFingerprintType string const ( - DLPEntryIntegrationListResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryIntegrationListResponseDocumentFingerprintEntryType = "document_fingerprint" + DLPEntryIntegrationListResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryIntegrationListResponseDocumentFingerprintType = "document_fingerprint" ) -func (r DLPEntryIntegrationListResponseDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPEntryIntegrationListResponseDocumentFingerprintType) IsKnown() bool { switch r { - case DLPEntryIntegrationListResponseDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPEntryIntegrationListResponseDocumentFingerprintTypeDocumentFingerprint: return true } return false } -type DLPEntryIntegrationListResponseWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationListResponseWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryIntegrationListResponseWordListEntryJSON `json:"-"` +type DLPEntryIntegrationListResponseWordList struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationListResponseWordListType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryIntegrationListResponseWordListJSON `json:"-"` } -// dlpEntryIntegrationListResponseWordListEntryJSON contains the JSON metadata for -// the struct [DLPEntryIntegrationListResponseWordListEntry] -type dlpEntryIntegrationListResponseWordListEntryJSON struct { +// dlpEntryIntegrationListResponseWordListJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationListResponseWordList] +type dlpEntryIntegrationListResponseWordListJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -682,25 +684,25 @@ type dlpEntryIntegrationListResponseWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationListResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationListResponseWordList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationListResponseWordListEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationListResponseWordListJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationListResponseWordListEntry) implementsDLPEntryIntegrationListResponse() {} +func (r DLPEntryIntegrationListResponseWordList) implementsDLPEntryIntegrationListResponse() {} -type DLPEntryIntegrationListResponseWordListEntryType string +type DLPEntryIntegrationListResponseWordListType string const ( - DLPEntryIntegrationListResponseWordListEntryTypeWordList DLPEntryIntegrationListResponseWordListEntryType = "word_list" + DLPEntryIntegrationListResponseWordListTypeWordList DLPEntryIntegrationListResponseWordListType = "word_list" ) -func (r DLPEntryIntegrationListResponseWordListEntryType) IsKnown() bool { +func (r DLPEntryIntegrationListResponseWordListType) IsKnown() bool { switch r { - case DLPEntryIntegrationListResponseWordListEntryTypeWordList: + case DLPEntryIntegrationListResponseWordListTypeWordList: return true } return false @@ -736,7 +738,7 @@ type DLPEntryIntegrationGetResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryIntegrationGetResponsePredefinedEntryConfidence]. + // [DLPEntryIntegrationGetResponsePredefinedConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` @@ -744,7 +746,7 @@ type DLPEntryIntegrationGetResponse struct { Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryIntegrationGetResponsePredefinedEntryVariant]. + // [DLPEntryIntegrationGetResponsePredefinedVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -788,23 +790,22 @@ func (r *DLPEntryIntegrationGetResponse) UnmarshalJSON(data []byte) (err error) // AsUnion returns a [DLPEntryIntegrationGetResponseUnion] interface which you can // cast to the specific types for more type safety. // -// Possible runtime types of the union are -// [DLPEntryIntegrationGetResponseCustomEntry], -// [DLPEntryIntegrationGetResponsePredefinedEntry], -// [DLPEntryIntegrationGetResponseIntegrationEntry], -// [DLPEntryIntegrationGetResponseExactDataEntry], -// [DLPEntryIntegrationGetResponseDocumentFingerprintEntry], -// [DLPEntryIntegrationGetResponseWordListEntry]. +// Possible runtime types of the union are [DLPEntryIntegrationGetResponseCustom], +// [DLPEntryIntegrationGetResponsePredefined], +// [DLPEntryIntegrationGetResponseIntegration], +// [DLPEntryIntegrationGetResponseExactData], +// [DLPEntryIntegrationGetResponseDocumentFingerprint], +// [DLPEntryIntegrationGetResponseWordList]. func (r DLPEntryIntegrationGetResponse) AsUnion() DLPEntryIntegrationGetResponseUnion { return r.union } -// Union satisfied by [DLPEntryIntegrationGetResponseCustomEntry], -// [DLPEntryIntegrationGetResponsePredefinedEntry], -// [DLPEntryIntegrationGetResponseIntegrationEntry], -// [DLPEntryIntegrationGetResponseExactDataEntry], -// [DLPEntryIntegrationGetResponseDocumentFingerprintEntry] or -// [DLPEntryIntegrationGetResponseWordListEntry]. +// Union satisfied by [DLPEntryIntegrationGetResponseCustom], +// [DLPEntryIntegrationGetResponsePredefined], +// [DLPEntryIntegrationGetResponseIntegration], +// [DLPEntryIntegrationGetResponseExactData], +// [DLPEntryIntegrationGetResponseDocumentFingerprint] or +// [DLPEntryIntegrationGetResponseWordList]. type DLPEntryIntegrationGetResponseUnion interface { implementsDLPEntryIntegrationGetResponse() } @@ -812,49 +813,55 @@ type DLPEntryIntegrationGetResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryIntegrationGetResponseUnion)(nil)).Elem(), - "", + "type", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseCustomEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseCustom{}), + DiscriminatorValue: "custom", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponsePredefinedEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponsePredefined{}), + DiscriminatorValue: "predefined", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseIntegrationEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseIntegration{}), + DiscriminatorValue: "integration", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseExactDataEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseExactData{}), + DiscriminatorValue: "exact_data", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseDocumentFingerprintEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseDocumentFingerprint{}), + DiscriminatorValue: "document_fingerprint", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseWordListEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseWordList{}), + DiscriminatorValue: "word_list", }, ) } -type DLPEntryIntegrationGetResponseCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryIntegrationGetResponseCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryIntegrationGetResponseCustomEntryJSON `json:"-"` +type DLPEntryIntegrationGetResponseCustom struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryIntegrationGetResponseCustomType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryIntegrationGetResponseCustomJSON `json:"-"` } -// dlpEntryIntegrationGetResponseCustomEntryJSON contains the JSON metadata for the -// struct [DLPEntryIntegrationGetResponseCustomEntry] -type dlpEntryIntegrationGetResponseCustomEntryJSON struct { +// dlpEntryIntegrationGetResponseCustomJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationGetResponseCustom] +type dlpEntryIntegrationGetResponseCustomJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -867,44 +874,44 @@ type dlpEntryIntegrationGetResponseCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseCustom) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseCustomEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseCustomJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseCustomEntry) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponseCustom) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponseCustomEntryType string +type DLPEntryIntegrationGetResponseCustomType string const ( - DLPEntryIntegrationGetResponseCustomEntryTypeCustom DLPEntryIntegrationGetResponseCustomEntryType = "custom" + DLPEntryIntegrationGetResponseCustomTypeCustom DLPEntryIntegrationGetResponseCustomType = "custom" ) -func (r DLPEntryIntegrationGetResponseCustomEntryType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseCustomType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseCustomEntryTypeCustom: + case DLPEntryIntegrationGetResponseCustomTypeCustom: return true } return false } -type DLPEntryIntegrationGetResponsePredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryIntegrationGetResponsePredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationGetResponsePredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryIntegrationGetResponsePredefinedEntryVariant `json:"variant"` - JSON dlpEntryIntegrationGetResponsePredefinedEntryJSON `json:"-"` +type DLPEntryIntegrationGetResponsePredefined struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryIntegrationGetResponsePredefinedConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationGetResponsePredefinedType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPEntryIntegrationGetResponsePredefinedVariant `json:"variant"` + JSON dlpEntryIntegrationGetResponsePredefinedJSON `json:"-"` } -// dlpEntryIntegrationGetResponsePredefinedEntryJSON contains the JSON metadata for -// the struct [DLPEntryIntegrationGetResponsePredefinedEntry] -type dlpEntryIntegrationGetResponsePredefinedEntryJSON struct { +// dlpEntryIntegrationGetResponsePredefinedJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationGetResponsePredefined] +type dlpEntryIntegrationGetResponsePredefinedJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -916,67 +923,66 @@ type dlpEntryIntegrationGetResponsePredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponsePredefinedEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponsePredefinedJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponsePredefinedEntry) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponsePredefined) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponsePredefinedEntryConfidence struct { +type DLPEntryIntegrationGetResponsePredefinedConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryIntegrationGetResponsePredefinedConfidenceJSON `json:"-"` } -// dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON contains the JSON -// metadata for the struct -// [DLPEntryIntegrationGetResponsePredefinedEntryConfidence] -type dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON struct { +// dlpEntryIntegrationGetResponsePredefinedConfidenceJSON contains the JSON +// metadata for the struct [DLPEntryIntegrationGetResponsePredefinedConfidence] +type dlpEntryIntegrationGetResponsePredefinedConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponsePredefinedConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryIntegrationGetResponsePredefinedEntryType string +type DLPEntryIntegrationGetResponsePredefinedType string const ( - DLPEntryIntegrationGetResponsePredefinedEntryTypePredefined DLPEntryIntegrationGetResponsePredefinedEntryType = "predefined" + DLPEntryIntegrationGetResponsePredefinedTypePredefined DLPEntryIntegrationGetResponsePredefinedType = "predefined" ) -func (r DLPEntryIntegrationGetResponsePredefinedEntryType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponsePredefinedType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponsePredefinedEntryTypePredefined: + case DLPEntryIntegrationGetResponsePredefinedTypePredefined: return true } return false } -type DLPEntryIntegrationGetResponsePredefinedEntryVariant struct { - TopicType DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` - Type DLPEntryIntegrationGetResponsePredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON `json:"-"` +type DLPEntryIntegrationGetResponsePredefinedVariant struct { + TopicType DLPEntryIntegrationGetResponsePredefinedVariantTopicType `json:"topic_type,required"` + Type DLPEntryIntegrationGetResponsePredefinedVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryIntegrationGetResponsePredefinedVariantJSON `json:"-"` } -// dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON contains the JSON -// metadata for the struct [DLPEntryIntegrationGetResponsePredefinedEntryVariant] -type dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON struct { +// dlpEntryIntegrationGetResponsePredefinedVariantJSON contains the JSON metadata +// for the struct [DLPEntryIntegrationGetResponsePredefinedVariant] +type dlpEntryIntegrationGetResponsePredefinedVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -984,57 +990,57 @@ type dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponsePredefinedVariantJSON) RawJSON() string { return r.raw } -type DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType string +type DLPEntryIntegrationGetResponsePredefinedVariantTopicType string const ( - DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType = "Intent" - DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType = "Content" + DLPEntryIntegrationGetResponsePredefinedVariantTopicTypeIntent DLPEntryIntegrationGetResponsePredefinedVariantTopicType = "Intent" + DLPEntryIntegrationGetResponsePredefinedVariantTopicTypeContent DLPEntryIntegrationGetResponsePredefinedVariantTopicType = "Content" ) -func (r DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponsePredefinedVariantTopicType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeContent: + case DLPEntryIntegrationGetResponsePredefinedVariantTopicTypeIntent, DLPEntryIntegrationGetResponsePredefinedVariantTopicTypeContent: return true } return false } -type DLPEntryIntegrationGetResponsePredefinedEntryVariantType string +type DLPEntryIntegrationGetResponsePredefinedVariantType string const ( - DLPEntryIntegrationGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryIntegrationGetResponsePredefinedEntryVariantType = "PromptTopic" + DLPEntryIntegrationGetResponsePredefinedVariantTypePromptTopic DLPEntryIntegrationGetResponsePredefinedVariantType = "PromptTopic" ) -func (r DLPEntryIntegrationGetResponsePredefinedEntryVariantType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponsePredefinedVariantType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponsePredefinedEntryVariantTypePromptTopic: + case DLPEntryIntegrationGetResponsePredefinedVariantTypePromptTopic: return true } return false } -type DLPEntryIntegrationGetResponseIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationGetResponseIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryIntegrationGetResponseIntegrationEntryJSON `json:"-"` +type DLPEntryIntegrationGetResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationGetResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryIntegrationGetResponseIntegrationJSON `json:"-"` } -// dlpEntryIntegrationGetResponseIntegrationEntryJSON contains the JSON metadata -// for the struct [DLPEntryIntegrationGetResponseIntegrationEntry] -type dlpEntryIntegrationGetResponseIntegrationEntryJSON struct { +// dlpEntryIntegrationGetResponseIntegrationJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationGetResponseIntegration] +type dlpEntryIntegrationGetResponseIntegrationJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1046,47 +1052,47 @@ type dlpEntryIntegrationGetResponseIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseIntegrationEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseIntegrationJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseIntegrationEntry) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponseIntegration) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponseIntegrationEntryType string +type DLPEntryIntegrationGetResponseIntegrationType string const ( - DLPEntryIntegrationGetResponseIntegrationEntryTypeIntegration DLPEntryIntegrationGetResponseIntegrationEntryType = "integration" + DLPEntryIntegrationGetResponseIntegrationTypeIntegration DLPEntryIntegrationGetResponseIntegrationType = "integration" ) -func (r DLPEntryIntegrationGetResponseIntegrationEntryType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseIntegrationType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseIntegrationEntryTypeIntegration: + case DLPEntryIntegrationGetResponseIntegrationTypeIntegration: return true } return false } -type DLPEntryIntegrationGetResponseExactDataEntry struct { +type DLPEntryIntegrationGetResponseExactData struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryIntegrationGetResponseExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryIntegrationGetResponseExactDataEntryJSON `json:"-"` -} - -// dlpEntryIntegrationGetResponseExactDataEntryJSON contains the JSON metadata for -// the struct [DLPEntryIntegrationGetResponseExactDataEntry] -type dlpEntryIntegrationGetResponseExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryIntegrationGetResponseExactDataType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryIntegrationGetResponseExactDataJSON `json:"-"` +} + +// dlpEntryIntegrationGetResponseExactDataJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationGetResponseExactData] +type dlpEntryIntegrationGetResponseExactDataJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -1099,43 +1105,43 @@ type dlpEntryIntegrationGetResponseExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseExactData) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseExactDataEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseExactDataJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseExactDataEntry) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponseExactData) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponseExactDataEntryType string +type DLPEntryIntegrationGetResponseExactDataType string const ( - DLPEntryIntegrationGetResponseExactDataEntryTypeExactData DLPEntryIntegrationGetResponseExactDataEntryType = "exact_data" + DLPEntryIntegrationGetResponseExactDataTypeExactData DLPEntryIntegrationGetResponseExactDataType = "exact_data" ) -func (r DLPEntryIntegrationGetResponseExactDataEntryType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseExactDataType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseExactDataEntryTypeExactData: + case DLPEntryIntegrationGetResponseExactDataTypeExactData: return true } return false } -type DLPEntryIntegrationGetResponseDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationGetResponseDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON `json:"-"` +type DLPEntryIntegrationGetResponseDocumentFingerprint struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationGetResponseDocumentFingerprintType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryIntegrationGetResponseDocumentFingerprintJSON `json:"-"` } -// dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON contains the JSON -// metadata for the struct [DLPEntryIntegrationGetResponseDocumentFingerprintEntry] -type dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON struct { +// dlpEntryIntegrationGetResponseDocumentFingerprintJSON contains the JSON metadata +// for the struct [DLPEntryIntegrationGetResponseDocumentFingerprint] +type dlpEntryIntegrationGetResponseDocumentFingerprintJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1146,46 +1152,46 @@ type dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseDocumentFingerprintJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseDocumentFingerprintEntry) implementsDLPEntryIntegrationGetResponse() { +func (r DLPEntryIntegrationGetResponseDocumentFingerprint) implementsDLPEntryIntegrationGetResponse() { } -type DLPEntryIntegrationGetResponseDocumentFingerprintEntryType string +type DLPEntryIntegrationGetResponseDocumentFingerprintType string const ( - DLPEntryIntegrationGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryIntegrationGetResponseDocumentFingerprintEntryType = "document_fingerprint" + DLPEntryIntegrationGetResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryIntegrationGetResponseDocumentFingerprintType = "document_fingerprint" ) -func (r DLPEntryIntegrationGetResponseDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseDocumentFingerprintType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPEntryIntegrationGetResponseDocumentFingerprintTypeDocumentFingerprint: return true } return false } -type DLPEntryIntegrationGetResponseWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationGetResponseWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryIntegrationGetResponseWordListEntryJSON `json:"-"` +type DLPEntryIntegrationGetResponseWordList struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationGetResponseWordListType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryIntegrationGetResponseWordListJSON `json:"-"` } -// dlpEntryIntegrationGetResponseWordListEntryJSON contains the JSON metadata for -// the struct [DLPEntryIntegrationGetResponseWordListEntry] -type dlpEntryIntegrationGetResponseWordListEntryJSON struct { +// dlpEntryIntegrationGetResponseWordListJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationGetResponseWordList] +type dlpEntryIntegrationGetResponseWordListJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1198,25 +1204,25 @@ type dlpEntryIntegrationGetResponseWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseWordList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseWordListEntryJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseWordListJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseWordListEntry) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponseWordList) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponseWordListEntryType string +type DLPEntryIntegrationGetResponseWordListType string const ( - DLPEntryIntegrationGetResponseWordListEntryTypeWordList DLPEntryIntegrationGetResponseWordListEntryType = "word_list" + DLPEntryIntegrationGetResponseWordListTypeWordList DLPEntryIntegrationGetResponseWordListType = "word_list" ) -func (r DLPEntryIntegrationGetResponseWordListEntryType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseWordListType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseWordListEntryTypeWordList: + case DLPEntryIntegrationGetResponseWordListTypeWordList: return true } return false @@ -1245,8 +1251,8 @@ type DLPEntryIntegrationNewParams struct { AccountID param.Field[string] `path:"account_id,required"` Enabled param.Field[bool] `json:"enabled,required"` EntryID param.Field[string] `json:"entry_id,required" format:"uuid"` - // This field is not actually used as the owning profile for a predefined entry is - // already set to a predefined profile + // This field is not used as the owning profile. For predefined entries it is + // already set to a predefined profile. ProfileID param.Field[string] `json:"profile_id" format:"uuid"` } diff --git a/zero_trust/dlpentrypredefined.go b/zero_trust/dlpentrypredefined.go index f47fa303d80..b994f804864 100644 --- a/zero_trust/dlpentrypredefined.go +++ b/zero_trust/dlpentrypredefined.go @@ -39,7 +39,7 @@ func NewDLPEntryPredefinedService(opts ...option.RequestOption) (r *DLPEntryPred } // Predefined entries can't be created, this will update an existing predefined -// entry This is needed for our generated terraform API +// entry. This is needed for our generated terraform API. func (r *DLPEntryPredefinedService) New(ctx context.Context, params DLPEntryPredefinedNewParams, opts ...option.RequestOption) (res *DLPEntryPredefinedNewResponse, err error) { var env DLPEntryPredefinedNewResponseEnvelope opts = slices.Concat(r.Options, opts) @@ -105,7 +105,7 @@ func (r *DLPEntryPredefinedService) ListAutoPaging(ctx context.Context, query DL } // This is a no-op as predefined entires can't be deleted but is needed for our -// generated terraform API +// generated terraform API. func (r *DLPEntryPredefinedService) Delete(ctx context.Context, entryID string, body DLPEntryPredefinedDeleteParams, opts ...option.RequestOption) (res *DLPEntryPredefinedDeleteResponse, err error) { var env DLPEntryPredefinedDeleteResponseEnvelope opts = slices.Concat(r.Options, opts) @@ -378,7 +378,7 @@ type DLPEntryPredefinedListResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryPredefinedListResponsePredefinedEntryConfidence]. + // [DLPEntryPredefinedListResponsePredefinedConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` @@ -386,7 +386,7 @@ type DLPEntryPredefinedListResponse struct { Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryPredefinedListResponsePredefinedEntryVariant]. + // [DLPEntryPredefinedListResponsePredefinedVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -430,23 +430,22 @@ func (r *DLPEntryPredefinedListResponse) UnmarshalJSON(data []byte) (err error) // AsUnion returns a [DLPEntryPredefinedListResponseUnion] interface which you can // cast to the specific types for more type safety. // -// Possible runtime types of the union are -// [DLPEntryPredefinedListResponseCustomEntry], -// [DLPEntryPredefinedListResponsePredefinedEntry], -// [DLPEntryPredefinedListResponseIntegrationEntry], -// [DLPEntryPredefinedListResponseExactDataEntry], -// [DLPEntryPredefinedListResponseDocumentFingerprintEntry], -// [DLPEntryPredefinedListResponseWordListEntry]. +// Possible runtime types of the union are [DLPEntryPredefinedListResponseCustom], +// [DLPEntryPredefinedListResponsePredefined], +// [DLPEntryPredefinedListResponseIntegration], +// [DLPEntryPredefinedListResponseExactData], +// [DLPEntryPredefinedListResponseDocumentFingerprint], +// [DLPEntryPredefinedListResponseWordList]. func (r DLPEntryPredefinedListResponse) AsUnion() DLPEntryPredefinedListResponseUnion { return r.union } -// Union satisfied by [DLPEntryPredefinedListResponseCustomEntry], -// [DLPEntryPredefinedListResponsePredefinedEntry], -// [DLPEntryPredefinedListResponseIntegrationEntry], -// [DLPEntryPredefinedListResponseExactDataEntry], -// [DLPEntryPredefinedListResponseDocumentFingerprintEntry] or -// [DLPEntryPredefinedListResponseWordListEntry]. +// Union satisfied by [DLPEntryPredefinedListResponseCustom], +// [DLPEntryPredefinedListResponsePredefined], +// [DLPEntryPredefinedListResponseIntegration], +// [DLPEntryPredefinedListResponseExactData], +// [DLPEntryPredefinedListResponseDocumentFingerprint] or +// [DLPEntryPredefinedListResponseWordList]. type DLPEntryPredefinedListResponseUnion interface { implementsDLPEntryPredefinedListResponse() } @@ -454,49 +453,55 @@ type DLPEntryPredefinedListResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryPredefinedListResponseUnion)(nil)).Elem(), - "", + "type", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedListResponseCustomEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedListResponseCustom{}), + DiscriminatorValue: "custom", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedListResponsePredefinedEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedListResponsePredefined{}), + DiscriminatorValue: "predefined", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedListResponseIntegrationEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedListResponseIntegration{}), + DiscriminatorValue: "integration", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedListResponseExactDataEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedListResponseExactData{}), + DiscriminatorValue: "exact_data", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedListResponseDocumentFingerprintEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedListResponseDocumentFingerprint{}), + DiscriminatorValue: "document_fingerprint", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedListResponseWordListEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedListResponseWordList{}), + DiscriminatorValue: "word_list", }, ) } -type DLPEntryPredefinedListResponseCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryPredefinedListResponseCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryPredefinedListResponseCustomEntryJSON `json:"-"` +type DLPEntryPredefinedListResponseCustom struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryPredefinedListResponseCustomType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryPredefinedListResponseCustomJSON `json:"-"` } -// dlpEntryPredefinedListResponseCustomEntryJSON contains the JSON metadata for the -// struct [DLPEntryPredefinedListResponseCustomEntry] -type dlpEntryPredefinedListResponseCustomEntryJSON struct { +// dlpEntryPredefinedListResponseCustomJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedListResponseCustom] +type dlpEntryPredefinedListResponseCustomJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -509,44 +514,44 @@ type dlpEntryPredefinedListResponseCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedListResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedListResponseCustom) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedListResponseCustomEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedListResponseCustomJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedListResponseCustomEntry) implementsDLPEntryPredefinedListResponse() {} +func (r DLPEntryPredefinedListResponseCustom) implementsDLPEntryPredefinedListResponse() {} -type DLPEntryPredefinedListResponseCustomEntryType string +type DLPEntryPredefinedListResponseCustomType string const ( - DLPEntryPredefinedListResponseCustomEntryTypeCustom DLPEntryPredefinedListResponseCustomEntryType = "custom" + DLPEntryPredefinedListResponseCustomTypeCustom DLPEntryPredefinedListResponseCustomType = "custom" ) -func (r DLPEntryPredefinedListResponseCustomEntryType) IsKnown() bool { +func (r DLPEntryPredefinedListResponseCustomType) IsKnown() bool { switch r { - case DLPEntryPredefinedListResponseCustomEntryTypeCustom: + case DLPEntryPredefinedListResponseCustomTypeCustom: return true } return false } -type DLPEntryPredefinedListResponsePredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryPredefinedListResponsePredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedListResponsePredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryPredefinedListResponsePredefinedEntryVariant `json:"variant"` - JSON dlpEntryPredefinedListResponsePredefinedEntryJSON `json:"-"` +type DLPEntryPredefinedListResponsePredefined struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryPredefinedListResponsePredefinedConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedListResponsePredefinedType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPEntryPredefinedListResponsePredefinedVariant `json:"variant"` + JSON dlpEntryPredefinedListResponsePredefinedJSON `json:"-"` } -// dlpEntryPredefinedListResponsePredefinedEntryJSON contains the JSON metadata for -// the struct [DLPEntryPredefinedListResponsePredefinedEntry] -type dlpEntryPredefinedListResponsePredefinedEntryJSON struct { +// dlpEntryPredefinedListResponsePredefinedJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedListResponsePredefined] +type dlpEntryPredefinedListResponsePredefinedJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -558,67 +563,66 @@ type dlpEntryPredefinedListResponsePredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedListResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedListResponsePredefined) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedListResponsePredefinedEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedListResponsePredefinedJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedListResponsePredefinedEntry) implementsDLPEntryPredefinedListResponse() {} +func (r DLPEntryPredefinedListResponsePredefined) implementsDLPEntryPredefinedListResponse() {} -type DLPEntryPredefinedListResponsePredefinedEntryConfidence struct { +type DLPEntryPredefinedListResponsePredefinedConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryPredefinedListResponsePredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryPredefinedListResponsePredefinedConfidenceJSON `json:"-"` } -// dlpEntryPredefinedListResponsePredefinedEntryConfidenceJSON contains the JSON -// metadata for the struct -// [DLPEntryPredefinedListResponsePredefinedEntryConfidence] -type dlpEntryPredefinedListResponsePredefinedEntryConfidenceJSON struct { +// dlpEntryPredefinedListResponsePredefinedConfidenceJSON contains the JSON +// metadata for the struct [DLPEntryPredefinedListResponsePredefinedConfidence] +type dlpEntryPredefinedListResponsePredefinedConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedListResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedListResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedListResponsePredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpEntryPredefinedListResponsePredefinedConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryPredefinedListResponsePredefinedEntryType string +type DLPEntryPredefinedListResponsePredefinedType string const ( - DLPEntryPredefinedListResponsePredefinedEntryTypePredefined DLPEntryPredefinedListResponsePredefinedEntryType = "predefined" + DLPEntryPredefinedListResponsePredefinedTypePredefined DLPEntryPredefinedListResponsePredefinedType = "predefined" ) -func (r DLPEntryPredefinedListResponsePredefinedEntryType) IsKnown() bool { +func (r DLPEntryPredefinedListResponsePredefinedType) IsKnown() bool { switch r { - case DLPEntryPredefinedListResponsePredefinedEntryTypePredefined: + case DLPEntryPredefinedListResponsePredefinedTypePredefined: return true } return false } -type DLPEntryPredefinedListResponsePredefinedEntryVariant struct { - TopicType DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` - Type DLPEntryPredefinedListResponsePredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryPredefinedListResponsePredefinedEntryVariantJSON `json:"-"` +type DLPEntryPredefinedListResponsePredefinedVariant struct { + TopicType DLPEntryPredefinedListResponsePredefinedVariantTopicType `json:"topic_type,required"` + Type DLPEntryPredefinedListResponsePredefinedVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryPredefinedListResponsePredefinedVariantJSON `json:"-"` } -// dlpEntryPredefinedListResponsePredefinedEntryVariantJSON contains the JSON -// metadata for the struct [DLPEntryPredefinedListResponsePredefinedEntryVariant] -type dlpEntryPredefinedListResponsePredefinedEntryVariantJSON struct { +// dlpEntryPredefinedListResponsePredefinedVariantJSON contains the JSON metadata +// for the struct [DLPEntryPredefinedListResponsePredefinedVariant] +type dlpEntryPredefinedListResponsePredefinedVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -626,57 +630,57 @@ type dlpEntryPredefinedListResponsePredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedListResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedListResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedListResponsePredefinedEntryVariantJSON) RawJSON() string { +func (r dlpEntryPredefinedListResponsePredefinedVariantJSON) RawJSON() string { return r.raw } -type DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType string +type DLPEntryPredefinedListResponsePredefinedVariantTopicType string const ( - DLPEntryPredefinedListResponsePredefinedEntryVariantTopicTypeIntent DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType = "Intent" - DLPEntryPredefinedListResponsePredefinedEntryVariantTopicTypeContent DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType = "Content" + DLPEntryPredefinedListResponsePredefinedVariantTopicTypeIntent DLPEntryPredefinedListResponsePredefinedVariantTopicType = "Intent" + DLPEntryPredefinedListResponsePredefinedVariantTopicTypeContent DLPEntryPredefinedListResponsePredefinedVariantTopicType = "Content" ) -func (r DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPEntryPredefinedListResponsePredefinedVariantTopicType) IsKnown() bool { switch r { - case DLPEntryPredefinedListResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryPredefinedListResponsePredefinedEntryVariantTopicTypeContent: + case DLPEntryPredefinedListResponsePredefinedVariantTopicTypeIntent, DLPEntryPredefinedListResponsePredefinedVariantTopicTypeContent: return true } return false } -type DLPEntryPredefinedListResponsePredefinedEntryVariantType string +type DLPEntryPredefinedListResponsePredefinedVariantType string const ( - DLPEntryPredefinedListResponsePredefinedEntryVariantTypePromptTopic DLPEntryPredefinedListResponsePredefinedEntryVariantType = "PromptTopic" + DLPEntryPredefinedListResponsePredefinedVariantTypePromptTopic DLPEntryPredefinedListResponsePredefinedVariantType = "PromptTopic" ) -func (r DLPEntryPredefinedListResponsePredefinedEntryVariantType) IsKnown() bool { +func (r DLPEntryPredefinedListResponsePredefinedVariantType) IsKnown() bool { switch r { - case DLPEntryPredefinedListResponsePredefinedEntryVariantTypePromptTopic: + case DLPEntryPredefinedListResponsePredefinedVariantTypePromptTopic: return true } return false } -type DLPEntryPredefinedListResponseIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedListResponseIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryPredefinedListResponseIntegrationEntryJSON `json:"-"` +type DLPEntryPredefinedListResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedListResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryPredefinedListResponseIntegrationJSON `json:"-"` } -// dlpEntryPredefinedListResponseIntegrationEntryJSON contains the JSON metadata -// for the struct [DLPEntryPredefinedListResponseIntegrationEntry] -type dlpEntryPredefinedListResponseIntegrationEntryJSON struct { +// dlpEntryPredefinedListResponseIntegrationJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedListResponseIntegration] +type dlpEntryPredefinedListResponseIntegrationJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -688,47 +692,47 @@ type dlpEntryPredefinedListResponseIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedListResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedListResponseIntegration) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedListResponseIntegrationEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedListResponseIntegrationJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedListResponseIntegrationEntry) implementsDLPEntryPredefinedListResponse() {} +func (r DLPEntryPredefinedListResponseIntegration) implementsDLPEntryPredefinedListResponse() {} -type DLPEntryPredefinedListResponseIntegrationEntryType string +type DLPEntryPredefinedListResponseIntegrationType string const ( - DLPEntryPredefinedListResponseIntegrationEntryTypeIntegration DLPEntryPredefinedListResponseIntegrationEntryType = "integration" + DLPEntryPredefinedListResponseIntegrationTypeIntegration DLPEntryPredefinedListResponseIntegrationType = "integration" ) -func (r DLPEntryPredefinedListResponseIntegrationEntryType) IsKnown() bool { +func (r DLPEntryPredefinedListResponseIntegrationType) IsKnown() bool { switch r { - case DLPEntryPredefinedListResponseIntegrationEntryTypeIntegration: + case DLPEntryPredefinedListResponseIntegrationTypeIntegration: return true } return false } -type DLPEntryPredefinedListResponseExactDataEntry struct { +type DLPEntryPredefinedListResponseExactData struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryPredefinedListResponseExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryPredefinedListResponseExactDataEntryJSON `json:"-"` -} - -// dlpEntryPredefinedListResponseExactDataEntryJSON contains the JSON metadata for -// the struct [DLPEntryPredefinedListResponseExactDataEntry] -type dlpEntryPredefinedListResponseExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryPredefinedListResponseExactDataType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryPredefinedListResponseExactDataJSON `json:"-"` +} + +// dlpEntryPredefinedListResponseExactDataJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedListResponseExactData] +type dlpEntryPredefinedListResponseExactDataJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -741,43 +745,43 @@ type dlpEntryPredefinedListResponseExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedListResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedListResponseExactData) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedListResponseExactDataEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedListResponseExactDataJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedListResponseExactDataEntry) implementsDLPEntryPredefinedListResponse() {} +func (r DLPEntryPredefinedListResponseExactData) implementsDLPEntryPredefinedListResponse() {} -type DLPEntryPredefinedListResponseExactDataEntryType string +type DLPEntryPredefinedListResponseExactDataType string const ( - DLPEntryPredefinedListResponseExactDataEntryTypeExactData DLPEntryPredefinedListResponseExactDataEntryType = "exact_data" + DLPEntryPredefinedListResponseExactDataTypeExactData DLPEntryPredefinedListResponseExactDataType = "exact_data" ) -func (r DLPEntryPredefinedListResponseExactDataEntryType) IsKnown() bool { +func (r DLPEntryPredefinedListResponseExactDataType) IsKnown() bool { switch r { - case DLPEntryPredefinedListResponseExactDataEntryTypeExactData: + case DLPEntryPredefinedListResponseExactDataTypeExactData: return true } return false } -type DLPEntryPredefinedListResponseDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedListResponseDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryPredefinedListResponseDocumentFingerprintEntryJSON `json:"-"` +type DLPEntryPredefinedListResponseDocumentFingerprint struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedListResponseDocumentFingerprintType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryPredefinedListResponseDocumentFingerprintJSON `json:"-"` } -// dlpEntryPredefinedListResponseDocumentFingerprintEntryJSON contains the JSON -// metadata for the struct [DLPEntryPredefinedListResponseDocumentFingerprintEntry] -type dlpEntryPredefinedListResponseDocumentFingerprintEntryJSON struct { +// dlpEntryPredefinedListResponseDocumentFingerprintJSON contains the JSON metadata +// for the struct [DLPEntryPredefinedListResponseDocumentFingerprint] +type dlpEntryPredefinedListResponseDocumentFingerprintJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -788,46 +792,46 @@ type dlpEntryPredefinedListResponseDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedListResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedListResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedListResponseDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedListResponseDocumentFingerprintJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedListResponseDocumentFingerprintEntry) implementsDLPEntryPredefinedListResponse() { +func (r DLPEntryPredefinedListResponseDocumentFingerprint) implementsDLPEntryPredefinedListResponse() { } -type DLPEntryPredefinedListResponseDocumentFingerprintEntryType string +type DLPEntryPredefinedListResponseDocumentFingerprintType string const ( - DLPEntryPredefinedListResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryPredefinedListResponseDocumentFingerprintEntryType = "document_fingerprint" + DLPEntryPredefinedListResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryPredefinedListResponseDocumentFingerprintType = "document_fingerprint" ) -func (r DLPEntryPredefinedListResponseDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPEntryPredefinedListResponseDocumentFingerprintType) IsKnown() bool { switch r { - case DLPEntryPredefinedListResponseDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPEntryPredefinedListResponseDocumentFingerprintTypeDocumentFingerprint: return true } return false } -type DLPEntryPredefinedListResponseWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedListResponseWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryPredefinedListResponseWordListEntryJSON `json:"-"` +type DLPEntryPredefinedListResponseWordList struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedListResponseWordListType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryPredefinedListResponseWordListJSON `json:"-"` } -// dlpEntryPredefinedListResponseWordListEntryJSON contains the JSON metadata for -// the struct [DLPEntryPredefinedListResponseWordListEntry] -type dlpEntryPredefinedListResponseWordListEntryJSON struct { +// dlpEntryPredefinedListResponseWordListJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedListResponseWordList] +type dlpEntryPredefinedListResponseWordListJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -840,25 +844,25 @@ type dlpEntryPredefinedListResponseWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedListResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedListResponseWordList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedListResponseWordListEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedListResponseWordListJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedListResponseWordListEntry) implementsDLPEntryPredefinedListResponse() {} +func (r DLPEntryPredefinedListResponseWordList) implementsDLPEntryPredefinedListResponse() {} -type DLPEntryPredefinedListResponseWordListEntryType string +type DLPEntryPredefinedListResponseWordListType string const ( - DLPEntryPredefinedListResponseWordListEntryTypeWordList DLPEntryPredefinedListResponseWordListEntryType = "word_list" + DLPEntryPredefinedListResponseWordListTypeWordList DLPEntryPredefinedListResponseWordListType = "word_list" ) -func (r DLPEntryPredefinedListResponseWordListEntryType) IsKnown() bool { +func (r DLPEntryPredefinedListResponseWordListType) IsKnown() bool { switch r { - case DLPEntryPredefinedListResponseWordListEntryTypeWordList: + case DLPEntryPredefinedListResponseWordListTypeWordList: return true } return false @@ -894,7 +898,7 @@ type DLPEntryPredefinedGetResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryPredefinedGetResponsePredefinedEntryConfidence]. + // [DLPEntryPredefinedGetResponsePredefinedConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` @@ -902,7 +906,7 @@ type DLPEntryPredefinedGetResponse struct { Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryPredefinedGetResponsePredefinedEntryVariant]. + // [DLPEntryPredefinedGetResponsePredefinedVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -946,23 +950,22 @@ func (r *DLPEntryPredefinedGetResponse) UnmarshalJSON(data []byte) (err error) { // AsUnion returns a [DLPEntryPredefinedGetResponseUnion] interface which you can // cast to the specific types for more type safety. // -// Possible runtime types of the union are -// [DLPEntryPredefinedGetResponseCustomEntry], -// [DLPEntryPredefinedGetResponsePredefinedEntry], -// [DLPEntryPredefinedGetResponseIntegrationEntry], -// [DLPEntryPredefinedGetResponseExactDataEntry], -// [DLPEntryPredefinedGetResponseDocumentFingerprintEntry], -// [DLPEntryPredefinedGetResponseWordListEntry]. +// Possible runtime types of the union are [DLPEntryPredefinedGetResponseCustom], +// [DLPEntryPredefinedGetResponsePredefined], +// [DLPEntryPredefinedGetResponseIntegration], +// [DLPEntryPredefinedGetResponseExactData], +// [DLPEntryPredefinedGetResponseDocumentFingerprint], +// [DLPEntryPredefinedGetResponseWordList]. func (r DLPEntryPredefinedGetResponse) AsUnion() DLPEntryPredefinedGetResponseUnion { return r.union } -// Union satisfied by [DLPEntryPredefinedGetResponseCustomEntry], -// [DLPEntryPredefinedGetResponsePredefinedEntry], -// [DLPEntryPredefinedGetResponseIntegrationEntry], -// [DLPEntryPredefinedGetResponseExactDataEntry], -// [DLPEntryPredefinedGetResponseDocumentFingerprintEntry] or -// [DLPEntryPredefinedGetResponseWordListEntry]. +// Union satisfied by [DLPEntryPredefinedGetResponseCustom], +// [DLPEntryPredefinedGetResponsePredefined], +// [DLPEntryPredefinedGetResponseIntegration], +// [DLPEntryPredefinedGetResponseExactData], +// [DLPEntryPredefinedGetResponseDocumentFingerprint] or +// [DLPEntryPredefinedGetResponseWordList]. type DLPEntryPredefinedGetResponseUnion interface { implementsDLPEntryPredefinedGetResponse() } @@ -970,49 +973,55 @@ type DLPEntryPredefinedGetResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryPredefinedGetResponseUnion)(nil)).Elem(), - "", + "type", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseCustomEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseCustom{}), + DiscriminatorValue: "custom", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponsePredefinedEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponsePredefined{}), + DiscriminatorValue: "predefined", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseIntegrationEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseIntegration{}), + DiscriminatorValue: "integration", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseExactDataEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseExactData{}), + DiscriminatorValue: "exact_data", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseDocumentFingerprintEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseDocumentFingerprint{}), + DiscriminatorValue: "document_fingerprint", }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseWordListEntry{}), + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseWordList{}), + DiscriminatorValue: "word_list", }, ) } -type DLPEntryPredefinedGetResponseCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryPredefinedGetResponseCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryPredefinedGetResponseCustomEntryJSON `json:"-"` +type DLPEntryPredefinedGetResponseCustom struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryPredefinedGetResponseCustomType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryPredefinedGetResponseCustomJSON `json:"-"` } -// dlpEntryPredefinedGetResponseCustomEntryJSON contains the JSON metadata for the -// struct [DLPEntryPredefinedGetResponseCustomEntry] -type dlpEntryPredefinedGetResponseCustomEntryJSON struct { +// dlpEntryPredefinedGetResponseCustomJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedGetResponseCustom] +type dlpEntryPredefinedGetResponseCustomJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1025,44 +1034,44 @@ type dlpEntryPredefinedGetResponseCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseCustom) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseCustomEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseCustomJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseCustomEntry) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponseCustom) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponseCustomEntryType string +type DLPEntryPredefinedGetResponseCustomType string const ( - DLPEntryPredefinedGetResponseCustomEntryTypeCustom DLPEntryPredefinedGetResponseCustomEntryType = "custom" + DLPEntryPredefinedGetResponseCustomTypeCustom DLPEntryPredefinedGetResponseCustomType = "custom" ) -func (r DLPEntryPredefinedGetResponseCustomEntryType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseCustomType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseCustomEntryTypeCustom: + case DLPEntryPredefinedGetResponseCustomTypeCustom: return true } return false } -type DLPEntryPredefinedGetResponsePredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryPredefinedGetResponsePredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedGetResponsePredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryPredefinedGetResponsePredefinedEntryVariant `json:"variant"` - JSON dlpEntryPredefinedGetResponsePredefinedEntryJSON `json:"-"` +type DLPEntryPredefinedGetResponsePredefined struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryPredefinedGetResponsePredefinedConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedGetResponsePredefinedType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPEntryPredefinedGetResponsePredefinedVariant `json:"variant"` + JSON dlpEntryPredefinedGetResponsePredefinedJSON `json:"-"` } -// dlpEntryPredefinedGetResponsePredefinedEntryJSON contains the JSON metadata for -// the struct [DLPEntryPredefinedGetResponsePredefinedEntry] -type dlpEntryPredefinedGetResponsePredefinedEntryJSON struct { +// dlpEntryPredefinedGetResponsePredefinedJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedGetResponsePredefined] +type dlpEntryPredefinedGetResponsePredefinedJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -1074,66 +1083,66 @@ type dlpEntryPredefinedGetResponsePredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponsePredefinedEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponsePredefinedJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponsePredefinedEntry) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponsePredefined) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponsePredefinedEntryConfidence struct { +type DLPEntryPredefinedGetResponsePredefinedConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryPredefinedGetResponsePredefinedConfidenceJSON `json:"-"` } -// dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON contains the JSON -// metadata for the struct [DLPEntryPredefinedGetResponsePredefinedEntryConfidence] -type dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON struct { +// dlpEntryPredefinedGetResponsePredefinedConfidenceJSON contains the JSON metadata +// for the struct [DLPEntryPredefinedGetResponsePredefinedConfidence] +type dlpEntryPredefinedGetResponsePredefinedConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponsePredefinedConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryPredefinedGetResponsePredefinedEntryType string +type DLPEntryPredefinedGetResponsePredefinedType string const ( - DLPEntryPredefinedGetResponsePredefinedEntryTypePredefined DLPEntryPredefinedGetResponsePredefinedEntryType = "predefined" + DLPEntryPredefinedGetResponsePredefinedTypePredefined DLPEntryPredefinedGetResponsePredefinedType = "predefined" ) -func (r DLPEntryPredefinedGetResponsePredefinedEntryType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponsePredefinedType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponsePredefinedEntryTypePredefined: + case DLPEntryPredefinedGetResponsePredefinedTypePredefined: return true } return false } -type DLPEntryPredefinedGetResponsePredefinedEntryVariant struct { - TopicType DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` - Type DLPEntryPredefinedGetResponsePredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON `json:"-"` +type DLPEntryPredefinedGetResponsePredefinedVariant struct { + TopicType DLPEntryPredefinedGetResponsePredefinedVariantTopicType `json:"topic_type,required"` + Type DLPEntryPredefinedGetResponsePredefinedVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryPredefinedGetResponsePredefinedVariantJSON `json:"-"` } -// dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON contains the JSON -// metadata for the struct [DLPEntryPredefinedGetResponsePredefinedEntryVariant] -type dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON struct { +// dlpEntryPredefinedGetResponsePredefinedVariantJSON contains the JSON metadata +// for the struct [DLPEntryPredefinedGetResponsePredefinedVariant] +type dlpEntryPredefinedGetResponsePredefinedVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -1141,57 +1150,57 @@ type dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponsePredefinedVariantJSON) RawJSON() string { return r.raw } -type DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType string +type DLPEntryPredefinedGetResponsePredefinedVariantTopicType string const ( - DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType = "Intent" - DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType = "Content" + DLPEntryPredefinedGetResponsePredefinedVariantTopicTypeIntent DLPEntryPredefinedGetResponsePredefinedVariantTopicType = "Intent" + DLPEntryPredefinedGetResponsePredefinedVariantTopicTypeContent DLPEntryPredefinedGetResponsePredefinedVariantTopicType = "Content" ) -func (r DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponsePredefinedVariantTopicType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeContent: + case DLPEntryPredefinedGetResponsePredefinedVariantTopicTypeIntent, DLPEntryPredefinedGetResponsePredefinedVariantTopicTypeContent: return true } return false } -type DLPEntryPredefinedGetResponsePredefinedEntryVariantType string +type DLPEntryPredefinedGetResponsePredefinedVariantType string const ( - DLPEntryPredefinedGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryPredefinedGetResponsePredefinedEntryVariantType = "PromptTopic" + DLPEntryPredefinedGetResponsePredefinedVariantTypePromptTopic DLPEntryPredefinedGetResponsePredefinedVariantType = "PromptTopic" ) -func (r DLPEntryPredefinedGetResponsePredefinedEntryVariantType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponsePredefinedVariantType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponsePredefinedEntryVariantTypePromptTopic: + case DLPEntryPredefinedGetResponsePredefinedVariantTypePromptTopic: return true } return false } -type DLPEntryPredefinedGetResponseIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedGetResponseIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryPredefinedGetResponseIntegrationEntryJSON `json:"-"` +type DLPEntryPredefinedGetResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedGetResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryPredefinedGetResponseIntegrationJSON `json:"-"` } -// dlpEntryPredefinedGetResponseIntegrationEntryJSON contains the JSON metadata for -// the struct [DLPEntryPredefinedGetResponseIntegrationEntry] -type dlpEntryPredefinedGetResponseIntegrationEntryJSON struct { +// dlpEntryPredefinedGetResponseIntegrationJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedGetResponseIntegration] +type dlpEntryPredefinedGetResponseIntegrationJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1203,47 +1212,47 @@ type dlpEntryPredefinedGetResponseIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseIntegrationEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseIntegrationJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseIntegrationEntry) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponseIntegration) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponseIntegrationEntryType string +type DLPEntryPredefinedGetResponseIntegrationType string const ( - DLPEntryPredefinedGetResponseIntegrationEntryTypeIntegration DLPEntryPredefinedGetResponseIntegrationEntryType = "integration" + DLPEntryPredefinedGetResponseIntegrationTypeIntegration DLPEntryPredefinedGetResponseIntegrationType = "integration" ) -func (r DLPEntryPredefinedGetResponseIntegrationEntryType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseIntegrationType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseIntegrationEntryTypeIntegration: + case DLPEntryPredefinedGetResponseIntegrationTypeIntegration: return true } return false } -type DLPEntryPredefinedGetResponseExactDataEntry struct { +type DLPEntryPredefinedGetResponseExactData struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryPredefinedGetResponseExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryPredefinedGetResponseExactDataEntryJSON `json:"-"` -} - -// dlpEntryPredefinedGetResponseExactDataEntryJSON contains the JSON metadata for -// the struct [DLPEntryPredefinedGetResponseExactDataEntry] -type dlpEntryPredefinedGetResponseExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryPredefinedGetResponseExactDataType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryPredefinedGetResponseExactDataJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponseExactDataJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedGetResponseExactData] +type dlpEntryPredefinedGetResponseExactDataJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -1256,43 +1265,43 @@ type dlpEntryPredefinedGetResponseExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseExactData) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseExactDataEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseExactDataJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseExactDataEntry) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponseExactData) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponseExactDataEntryType string +type DLPEntryPredefinedGetResponseExactDataType string const ( - DLPEntryPredefinedGetResponseExactDataEntryTypeExactData DLPEntryPredefinedGetResponseExactDataEntryType = "exact_data" + DLPEntryPredefinedGetResponseExactDataTypeExactData DLPEntryPredefinedGetResponseExactDataType = "exact_data" ) -func (r DLPEntryPredefinedGetResponseExactDataEntryType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseExactDataType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseExactDataEntryTypeExactData: + case DLPEntryPredefinedGetResponseExactDataTypeExactData: return true } return false } -type DLPEntryPredefinedGetResponseDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedGetResponseDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON `json:"-"` +type DLPEntryPredefinedGetResponseDocumentFingerprint struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedGetResponseDocumentFingerprintType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpEntryPredefinedGetResponseDocumentFingerprintJSON `json:"-"` } -// dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON contains the JSON -// metadata for the struct [DLPEntryPredefinedGetResponseDocumentFingerprintEntry] -type dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON struct { +// dlpEntryPredefinedGetResponseDocumentFingerprintJSON contains the JSON metadata +// for the struct [DLPEntryPredefinedGetResponseDocumentFingerprint] +type dlpEntryPredefinedGetResponseDocumentFingerprintJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1303,46 +1312,45 @@ type dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseDocumentFingerprintJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseDocumentFingerprintEntry) implementsDLPEntryPredefinedGetResponse() { -} +func (r DLPEntryPredefinedGetResponseDocumentFingerprint) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponseDocumentFingerprintEntryType string +type DLPEntryPredefinedGetResponseDocumentFingerprintType string const ( - DLPEntryPredefinedGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryPredefinedGetResponseDocumentFingerprintEntryType = "document_fingerprint" + DLPEntryPredefinedGetResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryPredefinedGetResponseDocumentFingerprintType = "document_fingerprint" ) -func (r DLPEntryPredefinedGetResponseDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseDocumentFingerprintType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPEntryPredefinedGetResponseDocumentFingerprintTypeDocumentFingerprint: return true } return false } -type DLPEntryPredefinedGetResponseWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedGetResponseWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryPredefinedGetResponseWordListEntryJSON `json:"-"` +type DLPEntryPredefinedGetResponseWordList struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedGetResponseWordListType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpEntryPredefinedGetResponseWordListJSON `json:"-"` } -// dlpEntryPredefinedGetResponseWordListEntryJSON contains the JSON metadata for -// the struct [DLPEntryPredefinedGetResponseWordListEntry] -type dlpEntryPredefinedGetResponseWordListEntryJSON struct { +// dlpEntryPredefinedGetResponseWordListJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedGetResponseWordList] +type dlpEntryPredefinedGetResponseWordListJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1355,25 +1363,25 @@ type dlpEntryPredefinedGetResponseWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseWordList) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseWordListEntryJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseWordListJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseWordListEntry) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponseWordList) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponseWordListEntryType string +type DLPEntryPredefinedGetResponseWordListType string const ( - DLPEntryPredefinedGetResponseWordListEntryTypeWordList DLPEntryPredefinedGetResponseWordListEntryType = "word_list" + DLPEntryPredefinedGetResponseWordListTypeWordList DLPEntryPredefinedGetResponseWordListType = "word_list" ) -func (r DLPEntryPredefinedGetResponseWordListEntryType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseWordListType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseWordListEntryTypeWordList: + case DLPEntryPredefinedGetResponseWordListTypeWordList: return true } return false @@ -1402,8 +1410,8 @@ type DLPEntryPredefinedNewParams struct { AccountID param.Field[string] `path:"account_id,required"` Enabled param.Field[bool] `json:"enabled,required"` EntryID param.Field[string] `json:"entry_id,required" format:"uuid"` - // This field is not actually used as the owning profile for a predefined entry is - // already set to a predefined profile + // This field is not used as the owning profile. For predefined entries it is + // already set to a predefined profile. ProfileID param.Field[string] `json:"profile_id" format:"uuid"` } diff --git a/zero_trust/dlpprofile.go b/zero_trust/dlpprofile.go index 548c95b9673..1c32277aee5 100644 --- a/zero_trust/dlpprofile.go +++ b/zero_trust/dlpprofile.go @@ -72,7 +72,7 @@ func (r *DLPProfileService) ListAutoPaging(ctx context.Context, params DLPProfil } // Fetches a DLP profile by ID. -func (r *DLPProfileService) Get(ctx context.Context, profileID string, query DLPProfileGetParams, opts ...option.RequestOption) (res *Profile, err error) { +func (r *DLPProfileService) Get(ctx context.Context, profileID string, query DLPProfileGetParams, opts ...option.RequestOption) (res *DLPProfileGetResponse, err error) { var env DLPProfileGetResponseEnvelope opts = slices.Concat(r.Options, opts) if query.AccountID.Value == "" { @@ -2059,6 +2059,1919 @@ func (r SkipConfigurationParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +type DLPProfileGetResponse struct { + // The id of the profile (uuid). + ID string `json:"id,required" format:"uuid"` + // The name of the profile. + Name string `json:"name,required"` + Type DLPProfileGetResponseType `json:"type,required"` + AIContextEnabled bool `json:"ai_context_enabled"` + // Related DLP policies will trigger when the match count exceeds the number set. + AllowedMatchCount int64 `json:"allowed_match_count"` + ConfidenceThreshold DLPProfileGetResponseConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + // When the profile was created. + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The description of the profile. + Description string `json:"description,nullable"` + // This field can have the runtime type of [[]DLPProfileGetResponseCustomEntry], + // [[]DLPProfileGetResponsePredefinedEntry], + // [[]DLPProfileGetResponseIntegrationEntry]. + Entries interface{} `json:"entries"` + OCREnabled bool `json:"ocr_enabled"` + // Whether this profile can be accessed by anyone. + OpenAccess bool `json:"open_access"` + // When the profile was lasted updated. + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON dlpProfileGetResponseJSON `json:"-"` + union DLPProfileGetResponseUnion +} + +// dlpProfileGetResponseJSON contains the JSON metadata for the struct +// [DLPProfileGetResponse] +type dlpProfileGetResponseJSON struct { + ID apijson.Field + Name apijson.Field + Type apijson.Field + AIContextEnabled apijson.Field + AllowedMatchCount apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + CreatedAt apijson.Field + Description apijson.Field + Entries apijson.Field + OCREnabled apijson.Field + OpenAccess apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileGetResponseJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileGetResponse) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileGetResponse{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileGetResponseUnion] interface which you can cast to +// the specific types for more type safety. +// +// Possible runtime types of the union are [DLPProfileGetResponseCustom], +// [DLPProfileGetResponsePredefined], [DLPProfileGetResponseIntegration]. +func (r DLPProfileGetResponse) AsUnion() DLPProfileGetResponseUnion { + return r.union +} + +// Union satisfied by [DLPProfileGetResponseCustom], +// [DLPProfileGetResponsePredefined] or [DLPProfileGetResponseIntegration]. +type DLPProfileGetResponseUnion interface { + implementsDLPProfileGetResponse() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileGetResponseUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseCustom{}), + DiscriminatorValue: "custom", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponsePredefined{}), + DiscriminatorValue: "predefined", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseIntegration{}), + DiscriminatorValue: "integration", + }, + ) +} + +type DLPProfileGetResponseCustom struct { + // The id of the profile (uuid). + ID string `json:"id,required" format:"uuid"` + // Related DLP policies will trigger when the match count exceeds the number set. + AllowedMatchCount int64 `json:"allowed_match_count,required"` + // When the profile was created. + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // The name of the profile. + Name string `json:"name,required"` + OCREnabled bool `json:"ocr_enabled,required"` + Type DLPProfileGetResponseCustomType `json:"type,required"` + // When the profile was lasted updated. + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + AIContextEnabled bool `json:"ai_context_enabled"` + ConfidenceThreshold DLPProfileGetResponseCustomConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + // The description of the profile. + Description string `json:"description,nullable"` + Entries []DLPProfileGetResponseCustomEntry `json:"entries"` + JSON dlpProfileGetResponseCustomJSON `json:"-"` +} + +// dlpProfileGetResponseCustomJSON contains the JSON metadata for the struct +// [DLPProfileGetResponseCustom] +type dlpProfileGetResponseCustomJSON struct { + ID apijson.Field + AllowedMatchCount apijson.Field + CreatedAt apijson.Field + Name apijson.Field + OCREnabled apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + AIContextEnabled apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + Description apijson.Field + Entries apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseCustom) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseCustomJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseCustom) implementsDLPProfileGetResponse() {} + +type DLPProfileGetResponseCustomType string + +const ( + DLPProfileGetResponseCustomTypeCustom DLPProfileGetResponseCustomType = "custom" +) + +func (r DLPProfileGetResponseCustomType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomTypeCustom: + return true + } + return false +} + +type DLPProfileGetResponseCustomConfidenceThreshold string + +const ( + DLPProfileGetResponseCustomConfidenceThresholdLow DLPProfileGetResponseCustomConfidenceThreshold = "low" + DLPProfileGetResponseCustomConfidenceThresholdMedium DLPProfileGetResponseCustomConfidenceThreshold = "medium" + DLPProfileGetResponseCustomConfidenceThresholdHigh DLPProfileGetResponseCustomConfidenceThreshold = "high" + DLPProfileGetResponseCustomConfidenceThresholdVeryHigh DLPProfileGetResponseCustomConfidenceThreshold = "very_high" +) + +func (r DLPProfileGetResponseCustomConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomConfidenceThresholdLow, DLPProfileGetResponseCustomConfidenceThresholdMedium, DLPProfileGetResponseCustomConfidenceThresholdHigh, DLPProfileGetResponseCustomConfidenceThresholdVeryHigh: + return true + } + return false +} + +type DLPProfileGetResponseCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseCustomEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileGetResponseCustomEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileGetResponseCustomEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileGetResponseCustomEntryJSON `json:"-"` + union DLPProfileGetResponseCustomEntriesUnion +} + +// dlpProfileGetResponseCustomEntryJSON contains the JSON metadata for the struct +// [DLPProfileGetResponseCustomEntry] +type dlpProfileGetResponseCustomEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileGetResponseCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileGetResponseCustomEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileGetResponseCustomEntriesUnion] interface which you +// can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileGetResponseCustomEntriesCustomEntry], +// [DLPProfileGetResponseCustomEntriesPredefinedEntry], +// [DLPProfileGetResponseCustomEntriesIntegrationEntry], +// [DLPProfileGetResponseCustomEntriesExactDataEntry], +// [DLPProfileGetResponseCustomEntriesDocumentFingerprintEntry], +// [DLPProfileGetResponseCustomEntriesWordListEntry]. +func (r DLPProfileGetResponseCustomEntry) AsUnion() DLPProfileGetResponseCustomEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileGetResponseCustomEntriesCustomEntry], +// [DLPProfileGetResponseCustomEntriesPredefinedEntry], +// [DLPProfileGetResponseCustomEntriesIntegrationEntry], +// [DLPProfileGetResponseCustomEntriesExactDataEntry], +// [DLPProfileGetResponseCustomEntriesDocumentFingerprintEntry] or +// [DLPProfileGetResponseCustomEntriesWordListEntry]. +type DLPProfileGetResponseCustomEntriesUnion interface { + implementsDLPProfileGetResponseCustomEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileGetResponseCustomEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseCustomEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseCustomEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseCustomEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseCustomEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseCustomEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseCustomEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileGetResponseCustomEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileGetResponseCustomEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileGetResponseCustomEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileGetResponseCustomEntriesCustomEntryJSON contains the JSON metadata for +// the struct [DLPProfileGetResponseCustomEntriesCustomEntry] +type dlpProfileGetResponseCustomEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseCustomEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseCustomEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseCustomEntriesCustomEntry) implementsDLPProfileGetResponseCustomEntry() {} + +type DLPProfileGetResponseCustomEntriesCustomEntryType string + +const ( + DLPProfileGetResponseCustomEntriesCustomEntryTypeCustom DLPProfileGetResponseCustomEntriesCustomEntryType = "custom" +) + +func (r DLPProfileGetResponseCustomEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileGetResponseCustomEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileGetResponseCustomEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseCustomEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileGetResponseCustomEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileGetResponseCustomEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileGetResponseCustomEntriesPredefinedEntryJSON contains the JSON metadata +// for the struct [DLPProfileGetResponseCustomEntriesPredefinedEntry] +type dlpProfileGetResponseCustomEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseCustomEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseCustomEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseCustomEntriesPredefinedEntry) implementsDLPProfileGetResponseCustomEntry() { +} + +type DLPProfileGetResponseCustomEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileGetResponseCustomEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileGetResponseCustomEntriesPredefinedEntryConfidenceJSON contains the +// JSON metadata for the struct +// [DLPProfileGetResponseCustomEntriesPredefinedEntryConfidence] +type dlpProfileGetResponseCustomEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseCustomEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseCustomEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileGetResponseCustomEntriesPredefinedEntryType string + +const ( + DLPProfileGetResponseCustomEntriesPredefinedEntryTypePredefined DLPProfileGetResponseCustomEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileGetResponseCustomEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileGetResponseCustomEntriesPredefinedEntryVariant struct { + TopicType DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileGetResponseCustomEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileGetResponseCustomEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileGetResponseCustomEntriesPredefinedEntryVariantJSON contains the JSON +// metadata for the struct +// [DLPProfileGetResponseCustomEntriesPredefinedEntryVariant] +type dlpProfileGetResponseCustomEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseCustomEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseCustomEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTopicTypeContent DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileGetResponseCustomEntriesPredefinedEntryVariantType string + +const ( + DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTypePromptTopic DLPProfileGetResponseCustomEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileGetResponseCustomEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileGetResponseCustomEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseCustomEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileGetResponseCustomEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileGetResponseCustomEntriesIntegrationEntryJSON contains the JSON +// metadata for the struct [DLPProfileGetResponseCustomEntriesIntegrationEntry] +type dlpProfileGetResponseCustomEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseCustomEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseCustomEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseCustomEntriesIntegrationEntry) implementsDLPProfileGetResponseCustomEntry() { +} + +type DLPProfileGetResponseCustomEntriesIntegrationEntryType string + +const ( + DLPProfileGetResponseCustomEntriesIntegrationEntryTypeIntegration DLPProfileGetResponseCustomEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileGetResponseCustomEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileGetResponseCustomEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileGetResponseCustomEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileGetResponseCustomEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileGetResponseCustomEntriesExactDataEntryJSON contains the JSON metadata +// for the struct [DLPProfileGetResponseCustomEntriesExactDataEntry] +type dlpProfileGetResponseCustomEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseCustomEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseCustomEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseCustomEntriesExactDataEntry) implementsDLPProfileGetResponseCustomEntry() { +} + +type DLPProfileGetResponseCustomEntriesExactDataEntryType string + +const ( + DLPProfileGetResponseCustomEntriesExactDataEntryTypeExactData DLPProfileGetResponseCustomEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileGetResponseCustomEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileGetResponseCustomEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseCustomEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileGetResponseCustomEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileGetResponseCustomEntriesDocumentFingerprintEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileGetResponseCustomEntriesDocumentFingerprintEntry] +type dlpProfileGetResponseCustomEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseCustomEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseCustomEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseCustomEntriesDocumentFingerprintEntry) implementsDLPProfileGetResponseCustomEntry() { +} + +type DLPProfileGetResponseCustomEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileGetResponseCustomEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileGetResponseCustomEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileGetResponseCustomEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileGetResponseCustomEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseCustomEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileGetResponseCustomEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileGetResponseCustomEntriesWordListEntryJSON contains the JSON metadata +// for the struct [DLPProfileGetResponseCustomEntriesWordListEntry] +type dlpProfileGetResponseCustomEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseCustomEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseCustomEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseCustomEntriesWordListEntry) implementsDLPProfileGetResponseCustomEntry() { +} + +type DLPProfileGetResponseCustomEntriesWordListEntryType string + +const ( + DLPProfileGetResponseCustomEntriesWordListEntryTypeWordList DLPProfileGetResponseCustomEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileGetResponseCustomEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileGetResponseCustomEntriesType string + +const ( + DLPProfileGetResponseCustomEntriesTypeCustom DLPProfileGetResponseCustomEntriesType = "custom" + DLPProfileGetResponseCustomEntriesTypePredefined DLPProfileGetResponseCustomEntriesType = "predefined" + DLPProfileGetResponseCustomEntriesTypeIntegration DLPProfileGetResponseCustomEntriesType = "integration" + DLPProfileGetResponseCustomEntriesTypeExactData DLPProfileGetResponseCustomEntriesType = "exact_data" + DLPProfileGetResponseCustomEntriesTypeDocumentFingerprint DLPProfileGetResponseCustomEntriesType = "document_fingerprint" + DLPProfileGetResponseCustomEntriesTypeWordList DLPProfileGetResponseCustomEntriesType = "word_list" +) + +func (r DLPProfileGetResponseCustomEntriesType) IsKnown() bool { + switch r { + case DLPProfileGetResponseCustomEntriesTypeCustom, DLPProfileGetResponseCustomEntriesTypePredefined, DLPProfileGetResponseCustomEntriesTypeIntegration, DLPProfileGetResponseCustomEntriesTypeExactData, DLPProfileGetResponseCustomEntriesTypeDocumentFingerprint, DLPProfileGetResponseCustomEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileGetResponsePredefined struct { + // The id of the predefined profile (uuid). + ID string `json:"id,required" format:"uuid"` + AllowedMatchCount int64 `json:"allowed_match_count,required"` + Entries []DLPProfileGetResponsePredefinedEntry `json:"entries,required"` + // The name of the predefined profile. + Name string `json:"name,required"` + Type DLPProfileGetResponsePredefinedType `json:"type,required"` + AIContextEnabled bool `json:"ai_context_enabled"` + ConfidenceThreshold DLPProfileGetResponsePredefinedConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + OCREnabled bool `json:"ocr_enabled"` + // Whether this profile can be accessed by anyone. + OpenAccess bool `json:"open_access"` + JSON dlpProfileGetResponsePredefinedJSON `json:"-"` +} + +// dlpProfileGetResponsePredefinedJSON contains the JSON metadata for the struct +// [DLPProfileGetResponsePredefined] +type dlpProfileGetResponsePredefinedJSON struct { + ID apijson.Field + AllowedMatchCount apijson.Field + Entries apijson.Field + Name apijson.Field + Type apijson.Field + AIContextEnabled apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + OCREnabled apijson.Field + OpenAccess apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponsePredefinedJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponsePredefined) implementsDLPProfileGetResponse() {} + +type DLPProfileGetResponsePredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponsePredefinedEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileGetResponsePredefinedEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileGetResponsePredefinedEntryJSON `json:"-"` + union DLPProfileGetResponsePredefinedEntriesUnion +} + +// dlpProfileGetResponsePredefinedEntryJSON contains the JSON metadata for the +// struct [DLPProfileGetResponsePredefinedEntry] +type dlpProfileGetResponsePredefinedEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileGetResponsePredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileGetResponsePredefinedEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileGetResponsePredefinedEntriesUnion] interface which +// you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileGetResponsePredefinedEntriesCustomEntry], +// [DLPProfileGetResponsePredefinedEntriesPredefinedEntry], +// [DLPProfileGetResponsePredefinedEntriesIntegrationEntry], +// [DLPProfileGetResponsePredefinedEntriesExactDataEntry], +// [DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntry], +// [DLPProfileGetResponsePredefinedEntriesWordListEntry]. +func (r DLPProfileGetResponsePredefinedEntry) AsUnion() DLPProfileGetResponsePredefinedEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileGetResponsePredefinedEntriesCustomEntry], +// [DLPProfileGetResponsePredefinedEntriesPredefinedEntry], +// [DLPProfileGetResponsePredefinedEntriesIntegrationEntry], +// [DLPProfileGetResponsePredefinedEntriesExactDataEntry], +// [DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntry] or +// [DLPProfileGetResponsePredefinedEntriesWordListEntry]. +type DLPProfileGetResponsePredefinedEntriesUnion interface { + implementsDLPProfileGetResponsePredefinedEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileGetResponsePredefinedEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponsePredefinedEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponsePredefinedEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponsePredefinedEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponsePredefinedEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponsePredefinedEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileGetResponsePredefinedEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileGetResponsePredefinedEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileGetResponsePredefinedEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileGetResponsePredefinedEntriesCustomEntryJSON contains the JSON metadata +// for the struct [DLPProfileGetResponsePredefinedEntriesCustomEntry] +type dlpProfileGetResponsePredefinedEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponsePredefinedEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponsePredefinedEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponsePredefinedEntriesCustomEntry) implementsDLPProfileGetResponsePredefinedEntry() { +} + +type DLPProfileGetResponsePredefinedEntriesCustomEntryType string + +const ( + DLPProfileGetResponsePredefinedEntriesCustomEntryTypeCustom DLPProfileGetResponsePredefinedEntriesCustomEntryType = "custom" +) + +func (r DLPProfileGetResponsePredefinedEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileGetResponsePredefinedEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponsePredefinedEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileGetResponsePredefinedEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileGetResponsePredefinedEntriesPredefinedEntryJSON contains the JSON +// metadata for the struct [DLPProfileGetResponsePredefinedEntriesPredefinedEntry] +type dlpProfileGetResponsePredefinedEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponsePredefinedEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponsePredefinedEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponsePredefinedEntriesPredefinedEntry) implementsDLPProfileGetResponsePredefinedEntry() { +} + +type DLPProfileGetResponsePredefinedEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileGetResponsePredefinedEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileGetResponsePredefinedEntriesPredefinedEntryConfidenceJSON contains the +// JSON metadata for the struct +// [DLPProfileGetResponsePredefinedEntriesPredefinedEntryConfidence] +type dlpProfileGetResponsePredefinedEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponsePredefinedEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponsePredefinedEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileGetResponsePredefinedEntriesPredefinedEntryType string + +const ( + DLPProfileGetResponsePredefinedEntriesPredefinedEntryTypePredefined DLPProfileGetResponsePredefinedEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileGetResponsePredefinedEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariant struct { + TopicType DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileGetResponsePredefinedEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileGetResponsePredefinedEntriesPredefinedEntryVariantJSON contains the +// JSON metadata for the struct +// [DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariant] +type dlpProfileGetResponsePredefinedEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponsePredefinedEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTopicTypeContent DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantType string + +const ( + DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTypePromptTopic DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponsePredefinedEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileGetResponsePredefinedEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileGetResponsePredefinedEntriesIntegrationEntryJSON contains the JSON +// metadata for the struct [DLPProfileGetResponsePredefinedEntriesIntegrationEntry] +type dlpProfileGetResponsePredefinedEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponsePredefinedEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponsePredefinedEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponsePredefinedEntriesIntegrationEntry) implementsDLPProfileGetResponsePredefinedEntry() { +} + +type DLPProfileGetResponsePredefinedEntriesIntegrationEntryType string + +const ( + DLPProfileGetResponsePredefinedEntriesIntegrationEntryTypeIntegration DLPProfileGetResponsePredefinedEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileGetResponsePredefinedEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileGetResponsePredefinedEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileGetResponsePredefinedEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileGetResponsePredefinedEntriesExactDataEntryJSON contains the JSON +// metadata for the struct [DLPProfileGetResponsePredefinedEntriesExactDataEntry] +type dlpProfileGetResponsePredefinedEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponsePredefinedEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponsePredefinedEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponsePredefinedEntriesExactDataEntry) implementsDLPProfileGetResponsePredefinedEntry() { +} + +type DLPProfileGetResponsePredefinedEntriesExactDataEntryType string + +const ( + DLPProfileGetResponsePredefinedEntriesExactDataEntryTypeExactData DLPProfileGetResponsePredefinedEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileGetResponsePredefinedEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileGetResponsePredefinedEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileGetResponsePredefinedEntriesDocumentFingerprintEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntry] +type dlpProfileGetResponsePredefinedEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponsePredefinedEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntry) implementsDLPProfileGetResponsePredefinedEntry() { +} + +type DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponsePredefinedEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileGetResponsePredefinedEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileGetResponsePredefinedEntriesWordListEntryJSON contains the JSON +// metadata for the struct [DLPProfileGetResponsePredefinedEntriesWordListEntry] +type dlpProfileGetResponsePredefinedEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponsePredefinedEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponsePredefinedEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponsePredefinedEntriesWordListEntry) implementsDLPProfileGetResponsePredefinedEntry() { +} + +type DLPProfileGetResponsePredefinedEntriesWordListEntryType string + +const ( + DLPProfileGetResponsePredefinedEntriesWordListEntryTypeWordList DLPProfileGetResponsePredefinedEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileGetResponsePredefinedEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedEntriesType string + +const ( + DLPProfileGetResponsePredefinedEntriesTypeCustom DLPProfileGetResponsePredefinedEntriesType = "custom" + DLPProfileGetResponsePredefinedEntriesTypePredefined DLPProfileGetResponsePredefinedEntriesType = "predefined" + DLPProfileGetResponsePredefinedEntriesTypeIntegration DLPProfileGetResponsePredefinedEntriesType = "integration" + DLPProfileGetResponsePredefinedEntriesTypeExactData DLPProfileGetResponsePredefinedEntriesType = "exact_data" + DLPProfileGetResponsePredefinedEntriesTypeDocumentFingerprint DLPProfileGetResponsePredefinedEntriesType = "document_fingerprint" + DLPProfileGetResponsePredefinedEntriesTypeWordList DLPProfileGetResponsePredefinedEntriesType = "word_list" +) + +func (r DLPProfileGetResponsePredefinedEntriesType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedEntriesTypeCustom, DLPProfileGetResponsePredefinedEntriesTypePredefined, DLPProfileGetResponsePredefinedEntriesTypeIntegration, DLPProfileGetResponsePredefinedEntriesTypeExactData, DLPProfileGetResponsePredefinedEntriesTypeDocumentFingerprint, DLPProfileGetResponsePredefinedEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedType string + +const ( + DLPProfileGetResponsePredefinedTypePredefined DLPProfileGetResponsePredefinedType = "predefined" +) + +func (r DLPProfileGetResponsePredefinedType) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedTypePredefined: + return true + } + return false +} + +type DLPProfileGetResponsePredefinedConfidenceThreshold string + +const ( + DLPProfileGetResponsePredefinedConfidenceThresholdLow DLPProfileGetResponsePredefinedConfidenceThreshold = "low" + DLPProfileGetResponsePredefinedConfidenceThresholdMedium DLPProfileGetResponsePredefinedConfidenceThreshold = "medium" + DLPProfileGetResponsePredefinedConfidenceThresholdHigh DLPProfileGetResponsePredefinedConfidenceThreshold = "high" + DLPProfileGetResponsePredefinedConfidenceThresholdVeryHigh DLPProfileGetResponsePredefinedConfidenceThreshold = "very_high" +) + +func (r DLPProfileGetResponsePredefinedConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileGetResponsePredefinedConfidenceThresholdLow, DLPProfileGetResponsePredefinedConfidenceThresholdMedium, DLPProfileGetResponsePredefinedConfidenceThresholdHigh, DLPProfileGetResponsePredefinedConfidenceThresholdVeryHigh: + return true + } + return false +} + +type DLPProfileGetResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Entries []DLPProfileGetResponseIntegrationEntry `json:"entries,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + // The description of the profile. + Description string `json:"description,nullable"` + JSON dlpProfileGetResponseIntegrationJSON `json:"-"` +} + +// dlpProfileGetResponseIntegrationJSON contains the JSON metadata for the struct +// [DLPProfileGetResponseIntegration] +type dlpProfileGetResponseIntegrationJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Entries apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseIntegrationJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseIntegration) implementsDLPProfileGetResponse() {} + +type DLPProfileGetResponseIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseIntegrationEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileGetResponseIntegrationEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileGetResponseIntegrationEntryJSON `json:"-"` + union DLPProfileGetResponseIntegrationEntriesUnion +} + +// dlpProfileGetResponseIntegrationEntryJSON contains the JSON metadata for the +// struct [DLPProfileGetResponseIntegrationEntry] +type dlpProfileGetResponseIntegrationEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileGetResponseIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileGetResponseIntegrationEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileGetResponseIntegrationEntriesUnion] interface which +// you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileGetResponseIntegrationEntriesCustomEntry], +// [DLPProfileGetResponseIntegrationEntriesPredefinedEntry], +// [DLPProfileGetResponseIntegrationEntriesIntegrationEntry], +// [DLPProfileGetResponseIntegrationEntriesExactDataEntry], +// [DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntry], +// [DLPProfileGetResponseIntegrationEntriesWordListEntry]. +func (r DLPProfileGetResponseIntegrationEntry) AsUnion() DLPProfileGetResponseIntegrationEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileGetResponseIntegrationEntriesCustomEntry], +// [DLPProfileGetResponseIntegrationEntriesPredefinedEntry], +// [DLPProfileGetResponseIntegrationEntriesIntegrationEntry], +// [DLPProfileGetResponseIntegrationEntriesExactDataEntry], +// [DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntry] or +// [DLPProfileGetResponseIntegrationEntriesWordListEntry]. +type DLPProfileGetResponseIntegrationEntriesUnion interface { + implementsDLPProfileGetResponseIntegrationEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileGetResponseIntegrationEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseIntegrationEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseIntegrationEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseIntegrationEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseIntegrationEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileGetResponseIntegrationEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileGetResponseIntegrationEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileGetResponseIntegrationEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileGetResponseIntegrationEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileGetResponseIntegrationEntriesCustomEntryJSON contains the JSON +// metadata for the struct [DLPProfileGetResponseIntegrationEntriesCustomEntry] +type dlpProfileGetResponseIntegrationEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseIntegrationEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseIntegrationEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseIntegrationEntriesCustomEntry) implementsDLPProfileGetResponseIntegrationEntry() { +} + +type DLPProfileGetResponseIntegrationEntriesCustomEntryType string + +const ( + DLPProfileGetResponseIntegrationEntriesCustomEntryTypeCustom DLPProfileGetResponseIntegrationEntriesCustomEntryType = "custom" +) + +func (r DLPProfileGetResponseIntegrationEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileGetResponseIntegrationEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileGetResponseIntegrationEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseIntegrationEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileGetResponseIntegrationEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileGetResponseIntegrationEntriesPredefinedEntryJSON contains the JSON +// metadata for the struct [DLPProfileGetResponseIntegrationEntriesPredefinedEntry] +type dlpProfileGetResponseIntegrationEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseIntegrationEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseIntegrationEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseIntegrationEntriesPredefinedEntry) implementsDLPProfileGetResponseIntegrationEntry() { +} + +type DLPProfileGetResponseIntegrationEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileGetResponseIntegrationEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileGetResponseIntegrationEntriesPredefinedEntryConfidenceJSON contains +// the JSON metadata for the struct +// [DLPProfileGetResponseIntegrationEntriesPredefinedEntryConfidence] +type dlpProfileGetResponseIntegrationEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseIntegrationEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseIntegrationEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileGetResponseIntegrationEntriesPredefinedEntryType string + +const ( + DLPProfileGetResponseIntegrationEntriesPredefinedEntryTypePredefined DLPProfileGetResponseIntegrationEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileGetResponseIntegrationEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariant struct { + TopicType DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileGetResponseIntegrationEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileGetResponseIntegrationEntriesPredefinedEntryVariantJSON contains the +// JSON metadata for the struct +// [DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariant] +type dlpProfileGetResponseIntegrationEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseIntegrationEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTopicTypeContent DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantType string + +const ( + DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTypePromptTopic DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileGetResponseIntegrationEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseIntegrationEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileGetResponseIntegrationEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileGetResponseIntegrationEntriesIntegrationEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileGetResponseIntegrationEntriesIntegrationEntry] +type dlpProfileGetResponseIntegrationEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseIntegrationEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseIntegrationEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseIntegrationEntriesIntegrationEntry) implementsDLPProfileGetResponseIntegrationEntry() { +} + +type DLPProfileGetResponseIntegrationEntriesIntegrationEntryType string + +const ( + DLPProfileGetResponseIntegrationEntriesIntegrationEntryTypeIntegration DLPProfileGetResponseIntegrationEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileGetResponseIntegrationEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileGetResponseIntegrationEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileGetResponseIntegrationEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileGetResponseIntegrationEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileGetResponseIntegrationEntriesExactDataEntryJSON contains the JSON +// metadata for the struct [DLPProfileGetResponseIntegrationEntriesExactDataEntry] +type dlpProfileGetResponseIntegrationEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseIntegrationEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseIntegrationEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseIntegrationEntriesExactDataEntry) implementsDLPProfileGetResponseIntegrationEntry() { +} + +type DLPProfileGetResponseIntegrationEntriesExactDataEntryType string + +const ( + DLPProfileGetResponseIntegrationEntriesExactDataEntryTypeExactData DLPProfileGetResponseIntegrationEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileGetResponseIntegrationEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileGetResponseIntegrationEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileGetResponseIntegrationEntriesDocumentFingerprintEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntry] +type dlpProfileGetResponseIntegrationEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseIntegrationEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntry) implementsDLPProfileGetResponseIntegrationEntry() { +} + +type DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileGetResponseIntegrationEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileGetResponseIntegrationEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileGetResponseIntegrationEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileGetResponseIntegrationEntriesWordListEntryJSON contains the JSON +// metadata for the struct [DLPProfileGetResponseIntegrationEntriesWordListEntry] +type dlpProfileGetResponseIntegrationEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileGetResponseIntegrationEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileGetResponseIntegrationEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileGetResponseIntegrationEntriesWordListEntry) implementsDLPProfileGetResponseIntegrationEntry() { +} + +type DLPProfileGetResponseIntegrationEntriesWordListEntryType string + +const ( + DLPProfileGetResponseIntegrationEntriesWordListEntryTypeWordList DLPProfileGetResponseIntegrationEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileGetResponseIntegrationEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileGetResponseIntegrationEntriesType string + +const ( + DLPProfileGetResponseIntegrationEntriesTypeCustom DLPProfileGetResponseIntegrationEntriesType = "custom" + DLPProfileGetResponseIntegrationEntriesTypePredefined DLPProfileGetResponseIntegrationEntriesType = "predefined" + DLPProfileGetResponseIntegrationEntriesTypeIntegration DLPProfileGetResponseIntegrationEntriesType = "integration" + DLPProfileGetResponseIntegrationEntriesTypeExactData DLPProfileGetResponseIntegrationEntriesType = "exact_data" + DLPProfileGetResponseIntegrationEntriesTypeDocumentFingerprint DLPProfileGetResponseIntegrationEntriesType = "document_fingerprint" + DLPProfileGetResponseIntegrationEntriesTypeWordList DLPProfileGetResponseIntegrationEntriesType = "word_list" +) + +func (r DLPProfileGetResponseIntegrationEntriesType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationEntriesTypeCustom, DLPProfileGetResponseIntegrationEntriesTypePredefined, DLPProfileGetResponseIntegrationEntriesTypeIntegration, DLPProfileGetResponseIntegrationEntriesTypeExactData, DLPProfileGetResponseIntegrationEntriesTypeDocumentFingerprint, DLPProfileGetResponseIntegrationEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileGetResponseIntegrationType string + +const ( + DLPProfileGetResponseIntegrationTypeIntegration DLPProfileGetResponseIntegrationType = "integration" +) + +func (r DLPProfileGetResponseIntegrationType) IsKnown() bool { + switch r { + case DLPProfileGetResponseIntegrationTypeIntegration: + return true + } + return false +} + +type DLPProfileGetResponseType string + +const ( + DLPProfileGetResponseTypeCustom DLPProfileGetResponseType = "custom" + DLPProfileGetResponseTypePredefined DLPProfileGetResponseType = "predefined" + DLPProfileGetResponseTypeIntegration DLPProfileGetResponseType = "integration" +) + +func (r DLPProfileGetResponseType) IsKnown() bool { + switch r { + case DLPProfileGetResponseTypeCustom, DLPProfileGetResponseTypePredefined, DLPProfileGetResponseTypeIntegration: + return true + } + return false +} + +type DLPProfileGetResponseConfidenceThreshold string + +const ( + DLPProfileGetResponseConfidenceThresholdLow DLPProfileGetResponseConfidenceThreshold = "low" + DLPProfileGetResponseConfidenceThresholdMedium DLPProfileGetResponseConfidenceThreshold = "medium" + DLPProfileGetResponseConfidenceThresholdHigh DLPProfileGetResponseConfidenceThreshold = "high" + DLPProfileGetResponseConfidenceThresholdVeryHigh DLPProfileGetResponseConfidenceThreshold = "very_high" +) + +func (r DLPProfileGetResponseConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileGetResponseConfidenceThresholdLow, DLPProfileGetResponseConfidenceThresholdMedium, DLPProfileGetResponseConfidenceThresholdHigh, DLPProfileGetResponseConfidenceThresholdVeryHigh: + return true + } + return false +} + type DLPProfileListParams struct { AccountID param.Field[string] `path:"account_id,required"` // Return all profiles, including those that current account does not have access @@ -2083,7 +3996,7 @@ type DLPProfileGetResponseEnvelope struct { Messages []DLPProfileGetResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPProfileGetResponseEnvelopeSuccess `json:"success,required"` - Result Profile `json:"result"` + Result DLPProfileGetResponse `json:"result"` JSON dlpProfileGetResponseEnvelopeJSON `json:"-"` } diff --git a/zero_trust/dlpprofilecustom.go b/zero_trust/dlpprofilecustom.go index c1d47fac602..4a1c86837ba 100644 --- a/zero_trust/dlpprofilecustom.go +++ b/zero_trust/dlpprofilecustom.go @@ -7,12 +7,15 @@ import ( "errors" "fmt" "net/http" + "reflect" "slices" + "time" "github.com/cloudflare/cloudflare-go/v6/internal/apijson" "github.com/cloudflare/cloudflare-go/v6/internal/param" "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/tidwall/gjson" ) // DLPProfileCustomService contains methods and other services that help with @@ -35,7 +38,7 @@ func NewDLPProfileCustomService(opts ...option.RequestOption) (r *DLPProfileCust } // Creates a DLP custom profile. -func (r *DLPProfileCustomService) New(ctx context.Context, params DLPProfileCustomNewParams, opts ...option.RequestOption) (res *Profile, err error) { +func (r *DLPProfileCustomService) New(ctx context.Context, params DLPProfileCustomNewParams, opts ...option.RequestOption) (res *DLPProfileCustomNewResponse, err error) { var env DLPProfileCustomNewResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { @@ -52,7 +55,7 @@ func (r *DLPProfileCustomService) New(ctx context.Context, params DLPProfileCust } // Updates a DLP custom profile. -func (r *DLPProfileCustomService) Update(ctx context.Context, profileID string, params DLPProfileCustomUpdateParams, opts ...option.RequestOption) (res *Profile, err error) { +func (r *DLPProfileCustomService) Update(ctx context.Context, profileID string, params DLPProfileCustomUpdateParams, opts ...option.RequestOption) (res *DLPProfileCustomUpdateResponse, err error) { var env DLPProfileCustomUpdateResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { @@ -94,7 +97,7 @@ func (r *DLPProfileCustomService) Delete(ctx context.Context, profileID string, } // Fetches a custom DLP profile by id. -func (r *DLPProfileCustomService) Get(ctx context.Context, profileID string, query DLPProfileCustomGetParams, opts ...option.RequestOption) (res *Profile, err error) { +func (r *DLPProfileCustomService) Get(ctx context.Context, profileID string, query DLPProfileCustomGetParams, opts ...option.RequestOption) (res *DLPProfileCustomGetResponse, err error) { var env DLPProfileCustomGetResponseEnvelope opts = slices.Concat(r.Options, opts) if query.AccountID.Value == "" { @@ -161,8 +164,5795 @@ func (r PatternParam) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +type DLPProfileCustomNewResponse struct { + // The id of the profile (uuid). + ID string `json:"id,required" format:"uuid"` + // The name of the profile. + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseType `json:"type,required"` + AIContextEnabled bool `json:"ai_context_enabled"` + // Related DLP policies will trigger when the match count exceeds the number set. + AllowedMatchCount int64 `json:"allowed_match_count"` + ConfidenceThreshold DLPProfileCustomNewResponseConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + // When the profile was created. + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The description of the profile. + Description string `json:"description,nullable"` + // This field can have the runtime type of + // [[]DLPProfileCustomNewResponseCustomEntry], + // [[]DLPProfileCustomNewResponsePredefinedEntry], + // [[]DLPProfileCustomNewResponseIntegrationEntry]. + Entries interface{} `json:"entries"` + OCREnabled bool `json:"ocr_enabled"` + // Whether this profile can be accessed by anyone. + OpenAccess bool `json:"open_access"` + // When the profile was lasted updated. + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON dlpProfileCustomNewResponseJSON `json:"-"` + union DLPProfileCustomNewResponseUnion +} + +// dlpProfileCustomNewResponseJSON contains the JSON metadata for the struct +// [DLPProfileCustomNewResponse] +type dlpProfileCustomNewResponseJSON struct { + ID apijson.Field + Name apijson.Field + Type apijson.Field + AIContextEnabled apijson.Field + AllowedMatchCount apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + CreatedAt apijson.Field + Description apijson.Field + Entries apijson.Field + OCREnabled apijson.Field + OpenAccess apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomNewResponseJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomNewResponse) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomNewResponse{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomNewResponseUnion] interface which you can +// cast to the specific types for more type safety. +// +// Possible runtime types of the union are [DLPProfileCustomNewResponseCustom], +// [DLPProfileCustomNewResponsePredefined], +// [DLPProfileCustomNewResponseIntegration]. +func (r DLPProfileCustomNewResponse) AsUnion() DLPProfileCustomNewResponseUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomNewResponseCustom], +// [DLPProfileCustomNewResponsePredefined] or +// [DLPProfileCustomNewResponseIntegration]. +type DLPProfileCustomNewResponseUnion interface { + implementsDLPProfileCustomNewResponse() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomNewResponseUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseCustom{}), + DiscriminatorValue: "custom", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponsePredefined{}), + DiscriminatorValue: "predefined", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseIntegration{}), + DiscriminatorValue: "integration", + }, + ) +} + +type DLPProfileCustomNewResponseCustom struct { + // The id of the profile (uuid). + ID string `json:"id,required" format:"uuid"` + // Related DLP policies will trigger when the match count exceeds the number set. + AllowedMatchCount int64 `json:"allowed_match_count,required"` + // When the profile was created. + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // The name of the profile. + Name string `json:"name,required"` + OCREnabled bool `json:"ocr_enabled,required"` + Type DLPProfileCustomNewResponseCustomType `json:"type,required"` + // When the profile was lasted updated. + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + AIContextEnabled bool `json:"ai_context_enabled"` + ConfidenceThreshold DLPProfileCustomNewResponseCustomConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + // The description of the profile. + Description string `json:"description,nullable"` + Entries []DLPProfileCustomNewResponseCustomEntry `json:"entries"` + JSON dlpProfileCustomNewResponseCustomJSON `json:"-"` +} + +// dlpProfileCustomNewResponseCustomJSON contains the JSON metadata for the struct +// [DLPProfileCustomNewResponseCustom] +type dlpProfileCustomNewResponseCustomJSON struct { + ID apijson.Field + AllowedMatchCount apijson.Field + CreatedAt apijson.Field + Name apijson.Field + OCREnabled apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + AIContextEnabled apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + Description apijson.Field + Entries apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseCustom) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseCustomJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseCustom) implementsDLPProfileCustomNewResponse() {} + +type DLPProfileCustomNewResponseCustomType string + +const ( + DLPProfileCustomNewResponseCustomTypeCustom DLPProfileCustomNewResponseCustomType = "custom" +) + +func (r DLPProfileCustomNewResponseCustomType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomTypeCustom: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomConfidenceThreshold string + +const ( + DLPProfileCustomNewResponseCustomConfidenceThresholdLow DLPProfileCustomNewResponseCustomConfidenceThreshold = "low" + DLPProfileCustomNewResponseCustomConfidenceThresholdMedium DLPProfileCustomNewResponseCustomConfidenceThreshold = "medium" + DLPProfileCustomNewResponseCustomConfidenceThresholdHigh DLPProfileCustomNewResponseCustomConfidenceThreshold = "high" + DLPProfileCustomNewResponseCustomConfidenceThresholdVeryHigh DLPProfileCustomNewResponseCustomConfidenceThreshold = "very_high" +) + +func (r DLPProfileCustomNewResponseCustomConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomConfidenceThresholdLow, DLPProfileCustomNewResponseCustomConfidenceThresholdMedium, DLPProfileCustomNewResponseCustomConfidenceThresholdHigh, DLPProfileCustomNewResponseCustomConfidenceThresholdVeryHigh: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseCustomEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileCustomNewResponseCustomEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileCustomNewResponseCustomEntryJSON `json:"-"` + union DLPProfileCustomNewResponseCustomEntriesUnion +} + +// dlpProfileCustomNewResponseCustomEntryJSON contains the JSON metadata for the +// struct [DLPProfileCustomNewResponseCustomEntry] +type dlpProfileCustomNewResponseCustomEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomNewResponseCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomNewResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomNewResponseCustomEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomNewResponseCustomEntriesUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileCustomNewResponseCustomEntriesCustomEntry], +// [DLPProfileCustomNewResponseCustomEntriesPredefinedEntry], +// [DLPProfileCustomNewResponseCustomEntriesIntegrationEntry], +// [DLPProfileCustomNewResponseCustomEntriesExactDataEntry], +// [DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntry], +// [DLPProfileCustomNewResponseCustomEntriesWordListEntry]. +func (r DLPProfileCustomNewResponseCustomEntry) AsUnion() DLPProfileCustomNewResponseCustomEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomNewResponseCustomEntriesCustomEntry], +// [DLPProfileCustomNewResponseCustomEntriesPredefinedEntry], +// [DLPProfileCustomNewResponseCustomEntriesIntegrationEntry], +// [DLPProfileCustomNewResponseCustomEntriesExactDataEntry], +// [DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntry] or +// [DLPProfileCustomNewResponseCustomEntriesWordListEntry]. +type DLPProfileCustomNewResponseCustomEntriesUnion interface { + implementsDLPProfileCustomNewResponseCustomEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomNewResponseCustomEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseCustomEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseCustomEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseCustomEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseCustomEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseCustomEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileCustomNewResponseCustomEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileCustomNewResponseCustomEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomNewResponseCustomEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseCustomEntriesCustomEntryJSON contains the JSON +// metadata for the struct [DLPProfileCustomNewResponseCustomEntriesCustomEntry] +type dlpProfileCustomNewResponseCustomEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseCustomEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseCustomEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseCustomEntriesCustomEntry) implementsDLPProfileCustomNewResponseCustomEntry() { +} + +type DLPProfileCustomNewResponseCustomEntriesCustomEntryType string + +const ( + DLPProfileCustomNewResponseCustomEntriesCustomEntryTypeCustom DLPProfileCustomNewResponseCustomEntriesCustomEntryType = "custom" +) + +func (r DLPProfileCustomNewResponseCustomEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileCustomNewResponseCustomEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseCustomEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileCustomNewResponseCustomEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseCustomEntriesPredefinedEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomNewResponseCustomEntriesPredefinedEntry] +type dlpProfileCustomNewResponseCustomEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseCustomEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseCustomEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseCustomEntriesPredefinedEntry) implementsDLPProfileCustomNewResponseCustomEntry() { +} + +type DLPProfileCustomNewResponseCustomEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileCustomNewResponseCustomEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileCustomNewResponseCustomEntriesPredefinedEntryConfidenceJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomNewResponseCustomEntriesPredefinedEntryConfidence] +type dlpProfileCustomNewResponseCustomEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseCustomEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseCustomEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomNewResponseCustomEntriesPredefinedEntryType string + +const ( + DLPProfileCustomNewResponseCustomEntriesPredefinedEntryTypePredefined DLPProfileCustomNewResponseCustomEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileCustomNewResponseCustomEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariant struct { + TopicType DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileCustomNewResponseCustomEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileCustomNewResponseCustomEntriesPredefinedEntryVariantJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariant] +type dlpProfileCustomNewResponseCustomEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseCustomEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTopicTypeContent DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantType string + +const ( + DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTypePromptTopic DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseCustomEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomNewResponseCustomEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseCustomEntriesIntegrationEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomNewResponseCustomEntriesIntegrationEntry] +type dlpProfileCustomNewResponseCustomEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseCustomEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseCustomEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseCustomEntriesIntegrationEntry) implementsDLPProfileCustomNewResponseCustomEntry() { +} + +type DLPProfileCustomNewResponseCustomEntriesIntegrationEntryType string + +const ( + DLPProfileCustomNewResponseCustomEntriesIntegrationEntryTypeIntegration DLPProfileCustomNewResponseCustomEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileCustomNewResponseCustomEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileCustomNewResponseCustomEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomNewResponseCustomEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseCustomEntriesExactDataEntryJSON contains the JSON +// metadata for the struct [DLPProfileCustomNewResponseCustomEntriesExactDataEntry] +type dlpProfileCustomNewResponseCustomEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseCustomEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseCustomEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseCustomEntriesExactDataEntry) implementsDLPProfileCustomNewResponseCustomEntry() { +} + +type DLPProfileCustomNewResponseCustomEntriesExactDataEntryType string + +const ( + DLPProfileCustomNewResponseCustomEntriesExactDataEntryTypeExactData DLPProfileCustomNewResponseCustomEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileCustomNewResponseCustomEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntry] +type dlpProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntry) implementsDLPProfileCustomNewResponseCustomEntry() { +} + +type DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseCustomEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomNewResponseCustomEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseCustomEntriesWordListEntryJSON contains the JSON +// metadata for the struct [DLPProfileCustomNewResponseCustomEntriesWordListEntry] +type dlpProfileCustomNewResponseCustomEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseCustomEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseCustomEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseCustomEntriesWordListEntry) implementsDLPProfileCustomNewResponseCustomEntry() { +} + +type DLPProfileCustomNewResponseCustomEntriesWordListEntryType string + +const ( + DLPProfileCustomNewResponseCustomEntriesWordListEntryTypeWordList DLPProfileCustomNewResponseCustomEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileCustomNewResponseCustomEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileCustomNewResponseCustomEntriesType string + +const ( + DLPProfileCustomNewResponseCustomEntriesTypeCustom DLPProfileCustomNewResponseCustomEntriesType = "custom" + DLPProfileCustomNewResponseCustomEntriesTypePredefined DLPProfileCustomNewResponseCustomEntriesType = "predefined" + DLPProfileCustomNewResponseCustomEntriesTypeIntegration DLPProfileCustomNewResponseCustomEntriesType = "integration" + DLPProfileCustomNewResponseCustomEntriesTypeExactData DLPProfileCustomNewResponseCustomEntriesType = "exact_data" + DLPProfileCustomNewResponseCustomEntriesTypeDocumentFingerprint DLPProfileCustomNewResponseCustomEntriesType = "document_fingerprint" + DLPProfileCustomNewResponseCustomEntriesTypeWordList DLPProfileCustomNewResponseCustomEntriesType = "word_list" +) + +func (r DLPProfileCustomNewResponseCustomEntriesType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseCustomEntriesTypeCustom, DLPProfileCustomNewResponseCustomEntriesTypePredefined, DLPProfileCustomNewResponseCustomEntriesTypeIntegration, DLPProfileCustomNewResponseCustomEntriesTypeExactData, DLPProfileCustomNewResponseCustomEntriesTypeDocumentFingerprint, DLPProfileCustomNewResponseCustomEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefined struct { + // The id of the predefined profile (uuid). + ID string `json:"id,required" format:"uuid"` + AllowedMatchCount int64 `json:"allowed_match_count,required"` + Entries []DLPProfileCustomNewResponsePredefinedEntry `json:"entries,required"` + // The name of the predefined profile. + Name string `json:"name,required"` + Type DLPProfileCustomNewResponsePredefinedType `json:"type,required"` + AIContextEnabled bool `json:"ai_context_enabled"` + ConfidenceThreshold DLPProfileCustomNewResponsePredefinedConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + OCREnabled bool `json:"ocr_enabled"` + // Whether this profile can be accessed by anyone. + OpenAccess bool `json:"open_access"` + JSON dlpProfileCustomNewResponsePredefinedJSON `json:"-"` +} + +// dlpProfileCustomNewResponsePredefinedJSON contains the JSON metadata for the +// struct [DLPProfileCustomNewResponsePredefined] +type dlpProfileCustomNewResponsePredefinedJSON struct { + ID apijson.Field + AllowedMatchCount apijson.Field + Entries apijson.Field + Name apijson.Field + Type apijson.Field + AIContextEnabled apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + OCREnabled apijson.Field + OpenAccess apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponsePredefined) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponsePredefinedJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponsePredefined) implementsDLPProfileCustomNewResponse() {} + +type DLPProfileCustomNewResponsePredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponsePredefinedEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileCustomNewResponsePredefinedEntryJSON `json:"-"` + union DLPProfileCustomNewResponsePredefinedEntriesUnion +} + +// dlpProfileCustomNewResponsePredefinedEntryJSON contains the JSON metadata for +// the struct [DLPProfileCustomNewResponsePredefinedEntry] +type dlpProfileCustomNewResponsePredefinedEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomNewResponsePredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomNewResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomNewResponsePredefinedEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomNewResponsePredefinedEntriesUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileCustomNewResponsePredefinedEntriesCustomEntry], +// [DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntry], +// [DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntry], +// [DLPProfileCustomNewResponsePredefinedEntriesExactDataEntry], +// [DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntry], +// [DLPProfileCustomNewResponsePredefinedEntriesWordListEntry]. +func (r DLPProfileCustomNewResponsePredefinedEntry) AsUnion() DLPProfileCustomNewResponsePredefinedEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomNewResponsePredefinedEntriesCustomEntry], +// [DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntry], +// [DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntry], +// [DLPProfileCustomNewResponsePredefinedEntriesExactDataEntry], +// [DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntry] or +// [DLPProfileCustomNewResponsePredefinedEntriesWordListEntry]. +type DLPProfileCustomNewResponsePredefinedEntriesUnion interface { + implementsDLPProfileCustomNewResponsePredefinedEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomNewResponsePredefinedEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponsePredefinedEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponsePredefinedEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponsePredefinedEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileCustomNewResponsePredefinedEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileCustomNewResponsePredefinedEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomNewResponsePredefinedEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponsePredefinedEntriesCustomEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomNewResponsePredefinedEntriesCustomEntry] +type dlpProfileCustomNewResponsePredefinedEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponsePredefinedEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponsePredefinedEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponsePredefinedEntriesCustomEntry) implementsDLPProfileCustomNewResponsePredefinedEntry() { +} + +type DLPProfileCustomNewResponsePredefinedEntriesCustomEntryType string + +const ( + DLPProfileCustomNewResponsePredefinedEntriesCustomEntryTypeCustom DLPProfileCustomNewResponsePredefinedEntriesCustomEntryType = "custom" +) + +func (r DLPProfileCustomNewResponsePredefinedEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntry] +type dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntry) implementsDLPProfileCustomNewResponsePredefinedEntry() { +} + +type DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryConfidenceJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryConfidence] +type dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryType string + +const ( + DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryTypePredefined DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariant struct { + TopicType DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariant] +type dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTopicTypeContent DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantType string + +const ( + DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTypePromptTopic DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomNewResponsePredefinedEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponsePredefinedEntriesIntegrationEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntry] +type dlpProfileCustomNewResponsePredefinedEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponsePredefinedEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntry) implementsDLPProfileCustomNewResponsePredefinedEntry() { +} + +type DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntryType string + +const ( + DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntryTypeIntegration DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileCustomNewResponsePredefinedEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomNewResponsePredefinedEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponsePredefinedEntriesExactDataEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomNewResponsePredefinedEntriesExactDataEntry] +type dlpProfileCustomNewResponsePredefinedEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponsePredefinedEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponsePredefinedEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponsePredefinedEntriesExactDataEntry) implementsDLPProfileCustomNewResponsePredefinedEntry() { +} + +type DLPProfileCustomNewResponsePredefinedEntriesExactDataEntryType string + +const ( + DLPProfileCustomNewResponsePredefinedEntriesExactDataEntryTypeExactData DLPProfileCustomNewResponsePredefinedEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileCustomNewResponsePredefinedEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntry] +type dlpProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntry) implementsDLPProfileCustomNewResponsePredefinedEntry() { +} + +type DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponsePredefinedEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomNewResponsePredefinedEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponsePredefinedEntriesWordListEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomNewResponsePredefinedEntriesWordListEntry] +type dlpProfileCustomNewResponsePredefinedEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponsePredefinedEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponsePredefinedEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponsePredefinedEntriesWordListEntry) implementsDLPProfileCustomNewResponsePredefinedEntry() { +} + +type DLPProfileCustomNewResponsePredefinedEntriesWordListEntryType string + +const ( + DLPProfileCustomNewResponsePredefinedEntriesWordListEntryTypeWordList DLPProfileCustomNewResponsePredefinedEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileCustomNewResponsePredefinedEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedEntriesType string + +const ( + DLPProfileCustomNewResponsePredefinedEntriesTypeCustom DLPProfileCustomNewResponsePredefinedEntriesType = "custom" + DLPProfileCustomNewResponsePredefinedEntriesTypePredefined DLPProfileCustomNewResponsePredefinedEntriesType = "predefined" + DLPProfileCustomNewResponsePredefinedEntriesTypeIntegration DLPProfileCustomNewResponsePredefinedEntriesType = "integration" + DLPProfileCustomNewResponsePredefinedEntriesTypeExactData DLPProfileCustomNewResponsePredefinedEntriesType = "exact_data" + DLPProfileCustomNewResponsePredefinedEntriesTypeDocumentFingerprint DLPProfileCustomNewResponsePredefinedEntriesType = "document_fingerprint" + DLPProfileCustomNewResponsePredefinedEntriesTypeWordList DLPProfileCustomNewResponsePredefinedEntriesType = "word_list" +) + +func (r DLPProfileCustomNewResponsePredefinedEntriesType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedEntriesTypeCustom, DLPProfileCustomNewResponsePredefinedEntriesTypePredefined, DLPProfileCustomNewResponsePredefinedEntriesTypeIntegration, DLPProfileCustomNewResponsePredefinedEntriesTypeExactData, DLPProfileCustomNewResponsePredefinedEntriesTypeDocumentFingerprint, DLPProfileCustomNewResponsePredefinedEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedType string + +const ( + DLPProfileCustomNewResponsePredefinedTypePredefined DLPProfileCustomNewResponsePredefinedType = "predefined" +) + +func (r DLPProfileCustomNewResponsePredefinedType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedTypePredefined: + return true + } + return false +} + +type DLPProfileCustomNewResponsePredefinedConfidenceThreshold string + +const ( + DLPProfileCustomNewResponsePredefinedConfidenceThresholdLow DLPProfileCustomNewResponsePredefinedConfidenceThreshold = "low" + DLPProfileCustomNewResponsePredefinedConfidenceThresholdMedium DLPProfileCustomNewResponsePredefinedConfidenceThreshold = "medium" + DLPProfileCustomNewResponsePredefinedConfidenceThresholdHigh DLPProfileCustomNewResponsePredefinedConfidenceThreshold = "high" + DLPProfileCustomNewResponsePredefinedConfidenceThresholdVeryHigh DLPProfileCustomNewResponsePredefinedConfidenceThreshold = "very_high" +) + +func (r DLPProfileCustomNewResponsePredefinedConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponsePredefinedConfidenceThresholdLow, DLPProfileCustomNewResponsePredefinedConfidenceThresholdMedium, DLPProfileCustomNewResponsePredefinedConfidenceThresholdHigh, DLPProfileCustomNewResponsePredefinedConfidenceThresholdVeryHigh: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Entries []DLPProfileCustomNewResponseIntegrationEntry `json:"entries,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + // The description of the profile. + Description string `json:"description,nullable"` + JSON dlpProfileCustomNewResponseIntegrationJSON `json:"-"` +} + +// dlpProfileCustomNewResponseIntegrationJSON contains the JSON metadata for the +// struct [DLPProfileCustomNewResponseIntegration] +type dlpProfileCustomNewResponseIntegrationJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Entries apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseIntegration) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseIntegrationJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseIntegration) implementsDLPProfileCustomNewResponse() {} + +type DLPProfileCustomNewResponseIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseIntegrationEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileCustomNewResponseIntegrationEntryJSON `json:"-"` + union DLPProfileCustomNewResponseIntegrationEntriesUnion +} + +// dlpProfileCustomNewResponseIntegrationEntryJSON contains the JSON metadata for +// the struct [DLPProfileCustomNewResponseIntegrationEntry] +type dlpProfileCustomNewResponseIntegrationEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomNewResponseIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomNewResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomNewResponseIntegrationEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomNewResponseIntegrationEntriesUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileCustomNewResponseIntegrationEntriesCustomEntry], +// [DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntry], +// [DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntry], +// [DLPProfileCustomNewResponseIntegrationEntriesExactDataEntry], +// [DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntry], +// [DLPProfileCustomNewResponseIntegrationEntriesWordListEntry]. +func (r DLPProfileCustomNewResponseIntegrationEntry) AsUnion() DLPProfileCustomNewResponseIntegrationEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomNewResponseIntegrationEntriesCustomEntry], +// [DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntry], +// [DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntry], +// [DLPProfileCustomNewResponseIntegrationEntriesExactDataEntry], +// [DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntry] or +// [DLPProfileCustomNewResponseIntegrationEntriesWordListEntry]. +type DLPProfileCustomNewResponseIntegrationEntriesUnion interface { + implementsDLPProfileCustomNewResponseIntegrationEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomNewResponseIntegrationEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseIntegrationEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseIntegrationEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomNewResponseIntegrationEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileCustomNewResponseIntegrationEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileCustomNewResponseIntegrationEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomNewResponseIntegrationEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseIntegrationEntriesCustomEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomNewResponseIntegrationEntriesCustomEntry] +type dlpProfileCustomNewResponseIntegrationEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseIntegrationEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseIntegrationEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseIntegrationEntriesCustomEntry) implementsDLPProfileCustomNewResponseIntegrationEntry() { +} + +type DLPProfileCustomNewResponseIntegrationEntriesCustomEntryType string + +const ( + DLPProfileCustomNewResponseIntegrationEntriesCustomEntryTypeCustom DLPProfileCustomNewResponseIntegrationEntriesCustomEntryType = "custom" +) + +func (r DLPProfileCustomNewResponseIntegrationEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntry] +type dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntry) implementsDLPProfileCustomNewResponseIntegrationEntry() { +} + +type DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryConfidenceJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryConfidence] +type dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryType string + +const ( + DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryTypePredefined DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariant struct { + TopicType DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariant] +type dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTopicTypeContent DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantType string + +const ( + DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTypePromptTopic DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomNewResponseIntegrationEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseIntegrationEntriesIntegrationEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntry] +type dlpProfileCustomNewResponseIntegrationEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseIntegrationEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntry) implementsDLPProfileCustomNewResponseIntegrationEntry() { +} + +type DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntryType string + +const ( + DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntryTypeIntegration DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegrationEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileCustomNewResponseIntegrationEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomNewResponseIntegrationEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseIntegrationEntriesExactDataEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomNewResponseIntegrationEntriesExactDataEntry] +type dlpProfileCustomNewResponseIntegrationEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseIntegrationEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseIntegrationEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseIntegrationEntriesExactDataEntry) implementsDLPProfileCustomNewResponseIntegrationEntry() { +} + +type DLPProfileCustomNewResponseIntegrationEntriesExactDataEntryType string + +const ( + DLPProfileCustomNewResponseIntegrationEntriesExactDataEntryTypeExactData DLPProfileCustomNewResponseIntegrationEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileCustomNewResponseIntegrationEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntry] +type dlpProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntry) implementsDLPProfileCustomNewResponseIntegrationEntry() { +} + +type DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegrationEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomNewResponseIntegrationEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomNewResponseIntegrationEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileCustomNewResponseIntegrationEntriesWordListEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomNewResponseIntegrationEntriesWordListEntry] +type dlpProfileCustomNewResponseIntegrationEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomNewResponseIntegrationEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomNewResponseIntegrationEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomNewResponseIntegrationEntriesWordListEntry) implementsDLPProfileCustomNewResponseIntegrationEntry() { +} + +type DLPProfileCustomNewResponseIntegrationEntriesWordListEntryType string + +const ( + DLPProfileCustomNewResponseIntegrationEntriesWordListEntryTypeWordList DLPProfileCustomNewResponseIntegrationEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileCustomNewResponseIntegrationEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegrationEntriesType string + +const ( + DLPProfileCustomNewResponseIntegrationEntriesTypeCustom DLPProfileCustomNewResponseIntegrationEntriesType = "custom" + DLPProfileCustomNewResponseIntegrationEntriesTypePredefined DLPProfileCustomNewResponseIntegrationEntriesType = "predefined" + DLPProfileCustomNewResponseIntegrationEntriesTypeIntegration DLPProfileCustomNewResponseIntegrationEntriesType = "integration" + DLPProfileCustomNewResponseIntegrationEntriesTypeExactData DLPProfileCustomNewResponseIntegrationEntriesType = "exact_data" + DLPProfileCustomNewResponseIntegrationEntriesTypeDocumentFingerprint DLPProfileCustomNewResponseIntegrationEntriesType = "document_fingerprint" + DLPProfileCustomNewResponseIntegrationEntriesTypeWordList DLPProfileCustomNewResponseIntegrationEntriesType = "word_list" +) + +func (r DLPProfileCustomNewResponseIntegrationEntriesType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationEntriesTypeCustom, DLPProfileCustomNewResponseIntegrationEntriesTypePredefined, DLPProfileCustomNewResponseIntegrationEntriesTypeIntegration, DLPProfileCustomNewResponseIntegrationEntriesTypeExactData, DLPProfileCustomNewResponseIntegrationEntriesTypeDocumentFingerprint, DLPProfileCustomNewResponseIntegrationEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileCustomNewResponseIntegrationType string + +const ( + DLPProfileCustomNewResponseIntegrationTypeIntegration DLPProfileCustomNewResponseIntegrationType = "integration" +) + +func (r DLPProfileCustomNewResponseIntegrationType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseIntegrationTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomNewResponseType string + +const ( + DLPProfileCustomNewResponseTypeCustom DLPProfileCustomNewResponseType = "custom" + DLPProfileCustomNewResponseTypePredefined DLPProfileCustomNewResponseType = "predefined" + DLPProfileCustomNewResponseTypeIntegration DLPProfileCustomNewResponseType = "integration" +) + +func (r DLPProfileCustomNewResponseType) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseTypeCustom, DLPProfileCustomNewResponseTypePredefined, DLPProfileCustomNewResponseTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomNewResponseConfidenceThreshold string + +const ( + DLPProfileCustomNewResponseConfidenceThresholdLow DLPProfileCustomNewResponseConfidenceThreshold = "low" + DLPProfileCustomNewResponseConfidenceThresholdMedium DLPProfileCustomNewResponseConfidenceThreshold = "medium" + DLPProfileCustomNewResponseConfidenceThresholdHigh DLPProfileCustomNewResponseConfidenceThreshold = "high" + DLPProfileCustomNewResponseConfidenceThresholdVeryHigh DLPProfileCustomNewResponseConfidenceThreshold = "very_high" +) + +func (r DLPProfileCustomNewResponseConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileCustomNewResponseConfidenceThresholdLow, DLPProfileCustomNewResponseConfidenceThresholdMedium, DLPProfileCustomNewResponseConfidenceThresholdHigh, DLPProfileCustomNewResponseConfidenceThresholdVeryHigh: + return true + } + return false +} + +type DLPProfileCustomUpdateResponse struct { + // The id of the profile (uuid). + ID string `json:"id,required" format:"uuid"` + // The name of the profile. + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseType `json:"type,required"` + AIContextEnabled bool `json:"ai_context_enabled"` + // Related DLP policies will trigger when the match count exceeds the number set. + AllowedMatchCount int64 `json:"allowed_match_count"` + ConfidenceThreshold DLPProfileCustomUpdateResponseConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + // When the profile was created. + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The description of the profile. + Description string `json:"description,nullable"` + // This field can have the runtime type of + // [[]DLPProfileCustomUpdateResponseCustomEntry], + // [[]DLPProfileCustomUpdateResponsePredefinedEntry], + // [[]DLPProfileCustomUpdateResponseIntegrationEntry]. + Entries interface{} `json:"entries"` + OCREnabled bool `json:"ocr_enabled"` + // Whether this profile can be accessed by anyone. + OpenAccess bool `json:"open_access"` + // When the profile was lasted updated. + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON dlpProfileCustomUpdateResponseJSON `json:"-"` + union DLPProfileCustomUpdateResponseUnion +} + +// dlpProfileCustomUpdateResponseJSON contains the JSON metadata for the struct +// [DLPProfileCustomUpdateResponse] +type dlpProfileCustomUpdateResponseJSON struct { + ID apijson.Field + Name apijson.Field + Type apijson.Field + AIContextEnabled apijson.Field + AllowedMatchCount apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + CreatedAt apijson.Field + Description apijson.Field + Entries apijson.Field + OCREnabled apijson.Field + OpenAccess apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomUpdateResponseJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomUpdateResponse) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomUpdateResponse{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomUpdateResponseUnion] interface which you can +// cast to the specific types for more type safety. +// +// Possible runtime types of the union are [DLPProfileCustomUpdateResponseCustom], +// [DLPProfileCustomUpdateResponsePredefined], +// [DLPProfileCustomUpdateResponseIntegration]. +func (r DLPProfileCustomUpdateResponse) AsUnion() DLPProfileCustomUpdateResponseUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomUpdateResponseCustom], +// [DLPProfileCustomUpdateResponsePredefined] or +// [DLPProfileCustomUpdateResponseIntegration]. +type DLPProfileCustomUpdateResponseUnion interface { + implementsDLPProfileCustomUpdateResponse() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomUpdateResponseUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseCustom{}), + DiscriminatorValue: "custom", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponsePredefined{}), + DiscriminatorValue: "predefined", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseIntegration{}), + DiscriminatorValue: "integration", + }, + ) +} + +type DLPProfileCustomUpdateResponseCustom struct { + // The id of the profile (uuid). + ID string `json:"id,required" format:"uuid"` + // Related DLP policies will trigger when the match count exceeds the number set. + AllowedMatchCount int64 `json:"allowed_match_count,required"` + // When the profile was created. + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // The name of the profile. + Name string `json:"name,required"` + OCREnabled bool `json:"ocr_enabled,required"` + Type DLPProfileCustomUpdateResponseCustomType `json:"type,required"` + // When the profile was lasted updated. + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + AIContextEnabled bool `json:"ai_context_enabled"` + ConfidenceThreshold DLPProfileCustomUpdateResponseCustomConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + // The description of the profile. + Description string `json:"description,nullable"` + Entries []DLPProfileCustomUpdateResponseCustomEntry `json:"entries"` + JSON dlpProfileCustomUpdateResponseCustomJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseCustomJSON contains the JSON metadata for the +// struct [DLPProfileCustomUpdateResponseCustom] +type dlpProfileCustomUpdateResponseCustomJSON struct { + ID apijson.Field + AllowedMatchCount apijson.Field + CreatedAt apijson.Field + Name apijson.Field + OCREnabled apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + AIContextEnabled apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + Description apijson.Field + Entries apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseCustom) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseCustomJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseCustom) implementsDLPProfileCustomUpdateResponse() {} + +type DLPProfileCustomUpdateResponseCustomType string + +const ( + DLPProfileCustomUpdateResponseCustomTypeCustom DLPProfileCustomUpdateResponseCustomType = "custom" +) + +func (r DLPProfileCustomUpdateResponseCustomType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomTypeCustom: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomConfidenceThreshold string + +const ( + DLPProfileCustomUpdateResponseCustomConfidenceThresholdLow DLPProfileCustomUpdateResponseCustomConfidenceThreshold = "low" + DLPProfileCustomUpdateResponseCustomConfidenceThresholdMedium DLPProfileCustomUpdateResponseCustomConfidenceThreshold = "medium" + DLPProfileCustomUpdateResponseCustomConfidenceThresholdHigh DLPProfileCustomUpdateResponseCustomConfidenceThreshold = "high" + DLPProfileCustomUpdateResponseCustomConfidenceThresholdVeryHigh DLPProfileCustomUpdateResponseCustomConfidenceThreshold = "very_high" +) + +func (r DLPProfileCustomUpdateResponseCustomConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomConfidenceThresholdLow, DLPProfileCustomUpdateResponseCustomConfidenceThresholdMedium, DLPProfileCustomUpdateResponseCustomConfidenceThresholdHigh, DLPProfileCustomUpdateResponseCustomConfidenceThresholdVeryHigh: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseCustomEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileCustomUpdateResponseCustomEntryJSON `json:"-"` + union DLPProfileCustomUpdateResponseCustomEntriesUnion +} + +// dlpProfileCustomUpdateResponseCustomEntryJSON contains the JSON metadata for the +// struct [DLPProfileCustomUpdateResponseCustomEntry] +type dlpProfileCustomUpdateResponseCustomEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomUpdateResponseCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomUpdateResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomUpdateResponseCustomEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomUpdateResponseCustomEntriesUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileCustomUpdateResponseCustomEntriesCustomEntry], +// [DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntry], +// [DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntry], +// [DLPProfileCustomUpdateResponseCustomEntriesExactDataEntry], +// [DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntry], +// [DLPProfileCustomUpdateResponseCustomEntriesWordListEntry]. +func (r DLPProfileCustomUpdateResponseCustomEntry) AsUnion() DLPProfileCustomUpdateResponseCustomEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomUpdateResponseCustomEntriesCustomEntry], +// [DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntry], +// [DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntry], +// [DLPProfileCustomUpdateResponseCustomEntriesExactDataEntry], +// [DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntry] or +// [DLPProfileCustomUpdateResponseCustomEntriesWordListEntry]. +type DLPProfileCustomUpdateResponseCustomEntriesUnion interface { + implementsDLPProfileCustomUpdateResponseCustomEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomUpdateResponseCustomEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseCustomEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseCustomEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseCustomEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileCustomUpdateResponseCustomEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileCustomUpdateResponseCustomEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomUpdateResponseCustomEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseCustomEntriesCustomEntryJSON contains the JSON +// metadata for the struct [DLPProfileCustomUpdateResponseCustomEntriesCustomEntry] +type dlpProfileCustomUpdateResponseCustomEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseCustomEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseCustomEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseCustomEntriesCustomEntry) implementsDLPProfileCustomUpdateResponseCustomEntry() { +} + +type DLPProfileCustomUpdateResponseCustomEntriesCustomEntryType string + +const ( + DLPProfileCustomUpdateResponseCustomEntriesCustomEntryTypeCustom DLPProfileCustomUpdateResponseCustomEntriesCustomEntryType = "custom" +) + +func (r DLPProfileCustomUpdateResponseCustomEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntry] +type dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntry) implementsDLPProfileCustomUpdateResponseCustomEntry() { +} + +type DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryConfidenceJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryConfidence] +type dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryType string + +const ( + DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryTypePredefined DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariant struct { + TopicType DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariant] +type dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTopicTypeContent DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantType string + +const ( + DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTypePromptTopic DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomUpdateResponseCustomEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseCustomEntriesIntegrationEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntry] +type dlpProfileCustomUpdateResponseCustomEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseCustomEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntry) implementsDLPProfileCustomUpdateResponseCustomEntry() { +} + +type DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntryType string + +const ( + DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntryTypeIntegration DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileCustomUpdateResponseCustomEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomUpdateResponseCustomEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseCustomEntriesExactDataEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomUpdateResponseCustomEntriesExactDataEntry] +type dlpProfileCustomUpdateResponseCustomEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseCustomEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseCustomEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseCustomEntriesExactDataEntry) implementsDLPProfileCustomUpdateResponseCustomEntry() { +} + +type DLPProfileCustomUpdateResponseCustomEntriesExactDataEntryType string + +const ( + DLPProfileCustomUpdateResponseCustomEntriesExactDataEntryTypeExactData DLPProfileCustomUpdateResponseCustomEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileCustomUpdateResponseCustomEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntry] +type dlpProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntry) implementsDLPProfileCustomUpdateResponseCustomEntry() { +} + +type DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseCustomEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomUpdateResponseCustomEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseCustomEntriesWordListEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomUpdateResponseCustomEntriesWordListEntry] +type dlpProfileCustomUpdateResponseCustomEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseCustomEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseCustomEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseCustomEntriesWordListEntry) implementsDLPProfileCustomUpdateResponseCustomEntry() { +} + +type DLPProfileCustomUpdateResponseCustomEntriesWordListEntryType string + +const ( + DLPProfileCustomUpdateResponseCustomEntriesWordListEntryTypeWordList DLPProfileCustomUpdateResponseCustomEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileCustomUpdateResponseCustomEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseCustomEntriesType string + +const ( + DLPProfileCustomUpdateResponseCustomEntriesTypeCustom DLPProfileCustomUpdateResponseCustomEntriesType = "custom" + DLPProfileCustomUpdateResponseCustomEntriesTypePredefined DLPProfileCustomUpdateResponseCustomEntriesType = "predefined" + DLPProfileCustomUpdateResponseCustomEntriesTypeIntegration DLPProfileCustomUpdateResponseCustomEntriesType = "integration" + DLPProfileCustomUpdateResponseCustomEntriesTypeExactData DLPProfileCustomUpdateResponseCustomEntriesType = "exact_data" + DLPProfileCustomUpdateResponseCustomEntriesTypeDocumentFingerprint DLPProfileCustomUpdateResponseCustomEntriesType = "document_fingerprint" + DLPProfileCustomUpdateResponseCustomEntriesTypeWordList DLPProfileCustomUpdateResponseCustomEntriesType = "word_list" +) + +func (r DLPProfileCustomUpdateResponseCustomEntriesType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseCustomEntriesTypeCustom, DLPProfileCustomUpdateResponseCustomEntriesTypePredefined, DLPProfileCustomUpdateResponseCustomEntriesTypeIntegration, DLPProfileCustomUpdateResponseCustomEntriesTypeExactData, DLPProfileCustomUpdateResponseCustomEntriesTypeDocumentFingerprint, DLPProfileCustomUpdateResponseCustomEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefined struct { + // The id of the predefined profile (uuid). + ID string `json:"id,required" format:"uuid"` + AllowedMatchCount int64 `json:"allowed_match_count,required"` + Entries []DLPProfileCustomUpdateResponsePredefinedEntry `json:"entries,required"` + // The name of the predefined profile. + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponsePredefinedType `json:"type,required"` + AIContextEnabled bool `json:"ai_context_enabled"` + ConfidenceThreshold DLPProfileCustomUpdateResponsePredefinedConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + OCREnabled bool `json:"ocr_enabled"` + // Whether this profile can be accessed by anyone. + OpenAccess bool `json:"open_access"` + JSON dlpProfileCustomUpdateResponsePredefinedJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponsePredefinedJSON contains the JSON metadata for the +// struct [DLPProfileCustomUpdateResponsePredefined] +type dlpProfileCustomUpdateResponsePredefinedJSON struct { + ID apijson.Field + AllowedMatchCount apijson.Field + Entries apijson.Field + Name apijson.Field + Type apijson.Field + AIContextEnabled apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + OCREnabled apijson.Field + OpenAccess apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponsePredefined) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponsePredefinedJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponsePredefined) implementsDLPProfileCustomUpdateResponse() {} + +type DLPProfileCustomUpdateResponsePredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponsePredefinedEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileCustomUpdateResponsePredefinedEntryJSON `json:"-"` + union DLPProfileCustomUpdateResponsePredefinedEntriesUnion +} + +// dlpProfileCustomUpdateResponsePredefinedEntryJSON contains the JSON metadata for +// the struct [DLPProfileCustomUpdateResponsePredefinedEntry] +type dlpProfileCustomUpdateResponsePredefinedEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomUpdateResponsePredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomUpdateResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomUpdateResponsePredefinedEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomUpdateResponsePredefinedEntriesUnion] +// interface which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntry], +// [DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntry], +// [DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntry], +// [DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntry], +// [DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntry], +// [DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntry]. +func (r DLPProfileCustomUpdateResponsePredefinedEntry) AsUnion() DLPProfileCustomUpdateResponsePredefinedEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntry], +// [DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntry], +// [DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntry], +// [DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntry], +// [DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntry] or +// [DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntry]. +type DLPProfileCustomUpdateResponsePredefinedEntriesUnion interface { + implementsDLPProfileCustomUpdateResponsePredefinedEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomUpdateResponsePredefinedEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomUpdateResponsePredefinedEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponsePredefinedEntriesCustomEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntry] +type dlpProfileCustomUpdateResponsePredefinedEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponsePredefinedEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntry) implementsDLPProfileCustomUpdateResponsePredefinedEntry() { +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntryType string + +const ( + DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntryTypeCustom DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntryType = "custom" +) + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntry] +type dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntry) implementsDLPProfileCustomUpdateResponsePredefinedEntry() { +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryConfidenceJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryConfidence] +type dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryType string + +const ( + DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryTypePredefined DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariant struct { + TopicType DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariant] +type dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTopicTypeContent DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantType string + +const ( + DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTypePromptTopic DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntry] +type dlpProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntry) implementsDLPProfileCustomUpdateResponsePredefinedEntry() { +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryType string + +const ( + DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryTypeIntegration DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomUpdateResponsePredefinedEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponsePredefinedEntriesExactDataEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntry] +type dlpProfileCustomUpdateResponsePredefinedEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponsePredefinedEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntry) implementsDLPProfileCustomUpdateResponsePredefinedEntry() { +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntryType string + +const ( + DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntryTypeExactData DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntry] +type dlpProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntry) implementsDLPProfileCustomUpdateResponsePredefinedEntry() { +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomUpdateResponsePredefinedEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponsePredefinedEntriesWordListEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntry] +type dlpProfileCustomUpdateResponsePredefinedEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponsePredefinedEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntry) implementsDLPProfileCustomUpdateResponsePredefinedEntry() { +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntryType string + +const ( + DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntryTypeWordList DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedEntriesType string + +const ( + DLPProfileCustomUpdateResponsePredefinedEntriesTypeCustom DLPProfileCustomUpdateResponsePredefinedEntriesType = "custom" + DLPProfileCustomUpdateResponsePredefinedEntriesTypePredefined DLPProfileCustomUpdateResponsePredefinedEntriesType = "predefined" + DLPProfileCustomUpdateResponsePredefinedEntriesTypeIntegration DLPProfileCustomUpdateResponsePredefinedEntriesType = "integration" + DLPProfileCustomUpdateResponsePredefinedEntriesTypeExactData DLPProfileCustomUpdateResponsePredefinedEntriesType = "exact_data" + DLPProfileCustomUpdateResponsePredefinedEntriesTypeDocumentFingerprint DLPProfileCustomUpdateResponsePredefinedEntriesType = "document_fingerprint" + DLPProfileCustomUpdateResponsePredefinedEntriesTypeWordList DLPProfileCustomUpdateResponsePredefinedEntriesType = "word_list" +) + +func (r DLPProfileCustomUpdateResponsePredefinedEntriesType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedEntriesTypeCustom, DLPProfileCustomUpdateResponsePredefinedEntriesTypePredefined, DLPProfileCustomUpdateResponsePredefinedEntriesTypeIntegration, DLPProfileCustomUpdateResponsePredefinedEntriesTypeExactData, DLPProfileCustomUpdateResponsePredefinedEntriesTypeDocumentFingerprint, DLPProfileCustomUpdateResponsePredefinedEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedType string + +const ( + DLPProfileCustomUpdateResponsePredefinedTypePredefined DLPProfileCustomUpdateResponsePredefinedType = "predefined" +) + +func (r DLPProfileCustomUpdateResponsePredefinedType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedTypePredefined: + return true + } + return false +} + +type DLPProfileCustomUpdateResponsePredefinedConfidenceThreshold string + +const ( + DLPProfileCustomUpdateResponsePredefinedConfidenceThresholdLow DLPProfileCustomUpdateResponsePredefinedConfidenceThreshold = "low" + DLPProfileCustomUpdateResponsePredefinedConfidenceThresholdMedium DLPProfileCustomUpdateResponsePredefinedConfidenceThreshold = "medium" + DLPProfileCustomUpdateResponsePredefinedConfidenceThresholdHigh DLPProfileCustomUpdateResponsePredefinedConfidenceThreshold = "high" + DLPProfileCustomUpdateResponsePredefinedConfidenceThresholdVeryHigh DLPProfileCustomUpdateResponsePredefinedConfidenceThreshold = "very_high" +) + +func (r DLPProfileCustomUpdateResponsePredefinedConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponsePredefinedConfidenceThresholdLow, DLPProfileCustomUpdateResponsePredefinedConfidenceThresholdMedium, DLPProfileCustomUpdateResponsePredefinedConfidenceThresholdHigh, DLPProfileCustomUpdateResponsePredefinedConfidenceThresholdVeryHigh: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Entries []DLPProfileCustomUpdateResponseIntegrationEntry `json:"entries,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + // The description of the profile. + Description string `json:"description,nullable"` + JSON dlpProfileCustomUpdateResponseIntegrationJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseIntegrationJSON contains the JSON metadata for the +// struct [DLPProfileCustomUpdateResponseIntegration] +type dlpProfileCustomUpdateResponseIntegrationJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Entries apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseIntegration) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseIntegrationJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseIntegration) implementsDLPProfileCustomUpdateResponse() {} + +type DLPProfileCustomUpdateResponseIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseIntegrationEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileCustomUpdateResponseIntegrationEntryJSON `json:"-"` + union DLPProfileCustomUpdateResponseIntegrationEntriesUnion +} + +// dlpProfileCustomUpdateResponseIntegrationEntryJSON contains the JSON metadata +// for the struct [DLPProfileCustomUpdateResponseIntegrationEntry] +type dlpProfileCustomUpdateResponseIntegrationEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomUpdateResponseIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomUpdateResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomUpdateResponseIntegrationEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomUpdateResponseIntegrationEntriesUnion] +// interface which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntry], +// [DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntry], +// [DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntry], +// [DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntry], +// [DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntry], +// [DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntry]. +func (r DLPProfileCustomUpdateResponseIntegrationEntry) AsUnion() DLPProfileCustomUpdateResponseIntegrationEntriesUnion { + return r.union +} + +// Union satisfied by +// [DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntry], +// [DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntry], +// [DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntry], +// [DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntry], +// [DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntry] or +// [DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntry]. +type DLPProfileCustomUpdateResponseIntegrationEntriesUnion interface { + implementsDLPProfileCustomUpdateResponseIntegrationEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomUpdateResponseIntegrationEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomUpdateResponseIntegrationEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseIntegrationEntriesCustomEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntry] +type dlpProfileCustomUpdateResponseIntegrationEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseIntegrationEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntry) implementsDLPProfileCustomUpdateResponseIntegrationEntry() { +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntryType string + +const ( + DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntryTypeCustom DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntryType = "custom" +) + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntry] +type dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntry) implementsDLPProfileCustomUpdateResponseIntegrationEntry() { +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryConfidenceJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryConfidence] +type dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryType string + +const ( + DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryTypePredefined DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariant struct { + TopicType DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariant] +type dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTopicTypeContent DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantType string + +const ( + DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTypePromptTopic DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntry] +type dlpProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntry) implementsDLPProfileCustomUpdateResponseIntegrationEntry() { +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryType string + +const ( + DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryTypeIntegration DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomUpdateResponseIntegrationEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseIntegrationEntriesExactDataEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntry] +type dlpProfileCustomUpdateResponseIntegrationEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseIntegrationEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntry) implementsDLPProfileCustomUpdateResponseIntegrationEntry() { +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntryType string + +const ( + DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntryTypeExactData DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntry] +type dlpProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntry) implementsDLPProfileCustomUpdateResponseIntegrationEntry() { +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomUpdateResponseIntegrationEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileCustomUpdateResponseIntegrationEntriesWordListEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntry] +type dlpProfileCustomUpdateResponseIntegrationEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomUpdateResponseIntegrationEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntry) implementsDLPProfileCustomUpdateResponseIntegrationEntry() { +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntryType string + +const ( + DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntryTypeWordList DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegrationEntriesType string + +const ( + DLPProfileCustomUpdateResponseIntegrationEntriesTypeCustom DLPProfileCustomUpdateResponseIntegrationEntriesType = "custom" + DLPProfileCustomUpdateResponseIntegrationEntriesTypePredefined DLPProfileCustomUpdateResponseIntegrationEntriesType = "predefined" + DLPProfileCustomUpdateResponseIntegrationEntriesTypeIntegration DLPProfileCustomUpdateResponseIntegrationEntriesType = "integration" + DLPProfileCustomUpdateResponseIntegrationEntriesTypeExactData DLPProfileCustomUpdateResponseIntegrationEntriesType = "exact_data" + DLPProfileCustomUpdateResponseIntegrationEntriesTypeDocumentFingerprint DLPProfileCustomUpdateResponseIntegrationEntriesType = "document_fingerprint" + DLPProfileCustomUpdateResponseIntegrationEntriesTypeWordList DLPProfileCustomUpdateResponseIntegrationEntriesType = "word_list" +) + +func (r DLPProfileCustomUpdateResponseIntegrationEntriesType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationEntriesTypeCustom, DLPProfileCustomUpdateResponseIntegrationEntriesTypePredefined, DLPProfileCustomUpdateResponseIntegrationEntriesTypeIntegration, DLPProfileCustomUpdateResponseIntegrationEntriesTypeExactData, DLPProfileCustomUpdateResponseIntegrationEntriesTypeDocumentFingerprint, DLPProfileCustomUpdateResponseIntegrationEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseIntegrationType string + +const ( + DLPProfileCustomUpdateResponseIntegrationTypeIntegration DLPProfileCustomUpdateResponseIntegrationType = "integration" +) + +func (r DLPProfileCustomUpdateResponseIntegrationType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseIntegrationTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseType string + +const ( + DLPProfileCustomUpdateResponseTypeCustom DLPProfileCustomUpdateResponseType = "custom" + DLPProfileCustomUpdateResponseTypePredefined DLPProfileCustomUpdateResponseType = "predefined" + DLPProfileCustomUpdateResponseTypeIntegration DLPProfileCustomUpdateResponseType = "integration" +) + +func (r DLPProfileCustomUpdateResponseType) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseTypeCustom, DLPProfileCustomUpdateResponseTypePredefined, DLPProfileCustomUpdateResponseTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomUpdateResponseConfidenceThreshold string + +const ( + DLPProfileCustomUpdateResponseConfidenceThresholdLow DLPProfileCustomUpdateResponseConfidenceThreshold = "low" + DLPProfileCustomUpdateResponseConfidenceThresholdMedium DLPProfileCustomUpdateResponseConfidenceThreshold = "medium" + DLPProfileCustomUpdateResponseConfidenceThresholdHigh DLPProfileCustomUpdateResponseConfidenceThreshold = "high" + DLPProfileCustomUpdateResponseConfidenceThresholdVeryHigh DLPProfileCustomUpdateResponseConfidenceThreshold = "very_high" +) + +func (r DLPProfileCustomUpdateResponseConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileCustomUpdateResponseConfidenceThresholdLow, DLPProfileCustomUpdateResponseConfidenceThresholdMedium, DLPProfileCustomUpdateResponseConfidenceThresholdHigh, DLPProfileCustomUpdateResponseConfidenceThresholdVeryHigh: + return true + } + return false +} + type DLPProfileCustomDeleteResponse = interface{} +type DLPProfileCustomGetResponse struct { + // The id of the profile (uuid). + ID string `json:"id,required" format:"uuid"` + // The name of the profile. + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseType `json:"type,required"` + AIContextEnabled bool `json:"ai_context_enabled"` + // Related DLP policies will trigger when the match count exceeds the number set. + AllowedMatchCount int64 `json:"allowed_match_count"` + ConfidenceThreshold DLPProfileCustomGetResponseConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + // When the profile was created. + CreatedAt time.Time `json:"created_at" format:"date-time"` + // The description of the profile. + Description string `json:"description,nullable"` + // This field can have the runtime type of + // [[]DLPProfileCustomGetResponseCustomEntry], + // [[]DLPProfileCustomGetResponsePredefinedEntry], + // [[]DLPProfileCustomGetResponseIntegrationEntry]. + Entries interface{} `json:"entries"` + OCREnabled bool `json:"ocr_enabled"` + // Whether this profile can be accessed by anyone. + OpenAccess bool `json:"open_access"` + // When the profile was lasted updated. + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + JSON dlpProfileCustomGetResponseJSON `json:"-"` + union DLPProfileCustomGetResponseUnion +} + +// dlpProfileCustomGetResponseJSON contains the JSON metadata for the struct +// [DLPProfileCustomGetResponse] +type dlpProfileCustomGetResponseJSON struct { + ID apijson.Field + Name apijson.Field + Type apijson.Field + AIContextEnabled apijson.Field + AllowedMatchCount apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + CreatedAt apijson.Field + Description apijson.Field + Entries apijson.Field + OCREnabled apijson.Field + OpenAccess apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomGetResponseJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomGetResponse) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomGetResponse{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomGetResponseUnion] interface which you can +// cast to the specific types for more type safety. +// +// Possible runtime types of the union are [DLPProfileCustomGetResponseCustom], +// [DLPProfileCustomGetResponsePredefined], +// [DLPProfileCustomGetResponseIntegration]. +func (r DLPProfileCustomGetResponse) AsUnion() DLPProfileCustomGetResponseUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomGetResponseCustom], +// [DLPProfileCustomGetResponsePredefined] or +// [DLPProfileCustomGetResponseIntegration]. +type DLPProfileCustomGetResponseUnion interface { + implementsDLPProfileCustomGetResponse() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomGetResponseUnion)(nil)).Elem(), + "type", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseCustom{}), + DiscriminatorValue: "custom", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponsePredefined{}), + DiscriminatorValue: "predefined", + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseIntegration{}), + DiscriminatorValue: "integration", + }, + ) +} + +type DLPProfileCustomGetResponseCustom struct { + // The id of the profile (uuid). + ID string `json:"id,required" format:"uuid"` + // Related DLP policies will trigger when the match count exceeds the number set. + AllowedMatchCount int64 `json:"allowed_match_count,required"` + // When the profile was created. + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // The name of the profile. + Name string `json:"name,required"` + OCREnabled bool `json:"ocr_enabled,required"` + Type DLPProfileCustomGetResponseCustomType `json:"type,required"` + // When the profile was lasted updated. + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + AIContextEnabled bool `json:"ai_context_enabled"` + ConfidenceThreshold DLPProfileCustomGetResponseCustomConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + // The description of the profile. + Description string `json:"description,nullable"` + Entries []DLPProfileCustomGetResponseCustomEntry `json:"entries"` + JSON dlpProfileCustomGetResponseCustomJSON `json:"-"` +} + +// dlpProfileCustomGetResponseCustomJSON contains the JSON metadata for the struct +// [DLPProfileCustomGetResponseCustom] +type dlpProfileCustomGetResponseCustomJSON struct { + ID apijson.Field + AllowedMatchCount apijson.Field + CreatedAt apijson.Field + Name apijson.Field + OCREnabled apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + AIContextEnabled apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + Description apijson.Field + Entries apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseCustom) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseCustomJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseCustom) implementsDLPProfileCustomGetResponse() {} + +type DLPProfileCustomGetResponseCustomType string + +const ( + DLPProfileCustomGetResponseCustomTypeCustom DLPProfileCustomGetResponseCustomType = "custom" +) + +func (r DLPProfileCustomGetResponseCustomType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomTypeCustom: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomConfidenceThreshold string + +const ( + DLPProfileCustomGetResponseCustomConfidenceThresholdLow DLPProfileCustomGetResponseCustomConfidenceThreshold = "low" + DLPProfileCustomGetResponseCustomConfidenceThresholdMedium DLPProfileCustomGetResponseCustomConfidenceThreshold = "medium" + DLPProfileCustomGetResponseCustomConfidenceThresholdHigh DLPProfileCustomGetResponseCustomConfidenceThreshold = "high" + DLPProfileCustomGetResponseCustomConfidenceThresholdVeryHigh DLPProfileCustomGetResponseCustomConfidenceThreshold = "very_high" +) + +func (r DLPProfileCustomGetResponseCustomConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomConfidenceThresholdLow, DLPProfileCustomGetResponseCustomConfidenceThresholdMedium, DLPProfileCustomGetResponseCustomConfidenceThresholdHigh, DLPProfileCustomGetResponseCustomConfidenceThresholdVeryHigh: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseCustomEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileCustomGetResponseCustomEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileCustomGetResponseCustomEntryJSON `json:"-"` + union DLPProfileCustomGetResponseCustomEntriesUnion +} + +// dlpProfileCustomGetResponseCustomEntryJSON contains the JSON metadata for the +// struct [DLPProfileCustomGetResponseCustomEntry] +type dlpProfileCustomGetResponseCustomEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomGetResponseCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomGetResponseCustomEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomGetResponseCustomEntriesUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileCustomGetResponseCustomEntriesCustomEntry], +// [DLPProfileCustomGetResponseCustomEntriesPredefinedEntry], +// [DLPProfileCustomGetResponseCustomEntriesIntegrationEntry], +// [DLPProfileCustomGetResponseCustomEntriesExactDataEntry], +// [DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntry], +// [DLPProfileCustomGetResponseCustomEntriesWordListEntry]. +func (r DLPProfileCustomGetResponseCustomEntry) AsUnion() DLPProfileCustomGetResponseCustomEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomGetResponseCustomEntriesCustomEntry], +// [DLPProfileCustomGetResponseCustomEntriesPredefinedEntry], +// [DLPProfileCustomGetResponseCustomEntriesIntegrationEntry], +// [DLPProfileCustomGetResponseCustomEntriesExactDataEntry], +// [DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntry] or +// [DLPProfileCustomGetResponseCustomEntriesWordListEntry]. +type DLPProfileCustomGetResponseCustomEntriesUnion interface { + implementsDLPProfileCustomGetResponseCustomEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomGetResponseCustomEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseCustomEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseCustomEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseCustomEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseCustomEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseCustomEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileCustomGetResponseCustomEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileCustomGetResponseCustomEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomGetResponseCustomEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseCustomEntriesCustomEntryJSON contains the JSON +// metadata for the struct [DLPProfileCustomGetResponseCustomEntriesCustomEntry] +type dlpProfileCustomGetResponseCustomEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseCustomEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseCustomEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseCustomEntriesCustomEntry) implementsDLPProfileCustomGetResponseCustomEntry() { +} + +type DLPProfileCustomGetResponseCustomEntriesCustomEntryType string + +const ( + DLPProfileCustomGetResponseCustomEntriesCustomEntryTypeCustom DLPProfileCustomGetResponseCustomEntriesCustomEntryType = "custom" +) + +func (r DLPProfileCustomGetResponseCustomEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileCustomGetResponseCustomEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseCustomEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileCustomGetResponseCustomEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseCustomEntriesPredefinedEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomGetResponseCustomEntriesPredefinedEntry] +type dlpProfileCustomGetResponseCustomEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseCustomEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseCustomEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseCustomEntriesPredefinedEntry) implementsDLPProfileCustomGetResponseCustomEntry() { +} + +type DLPProfileCustomGetResponseCustomEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileCustomGetResponseCustomEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileCustomGetResponseCustomEntriesPredefinedEntryConfidenceJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomGetResponseCustomEntriesPredefinedEntryConfidence] +type dlpProfileCustomGetResponseCustomEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseCustomEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseCustomEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomGetResponseCustomEntriesPredefinedEntryType string + +const ( + DLPProfileCustomGetResponseCustomEntriesPredefinedEntryTypePredefined DLPProfileCustomGetResponseCustomEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileCustomGetResponseCustomEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariant struct { + TopicType DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileCustomGetResponseCustomEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileCustomGetResponseCustomEntriesPredefinedEntryVariantJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariant] +type dlpProfileCustomGetResponseCustomEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseCustomEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTopicTypeContent DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantType string + +const ( + DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTypePromptTopic DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseCustomEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomGetResponseCustomEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseCustomEntriesIntegrationEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomGetResponseCustomEntriesIntegrationEntry] +type dlpProfileCustomGetResponseCustomEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseCustomEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseCustomEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseCustomEntriesIntegrationEntry) implementsDLPProfileCustomGetResponseCustomEntry() { +} + +type DLPProfileCustomGetResponseCustomEntriesIntegrationEntryType string + +const ( + DLPProfileCustomGetResponseCustomEntriesIntegrationEntryTypeIntegration DLPProfileCustomGetResponseCustomEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileCustomGetResponseCustomEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileCustomGetResponseCustomEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomGetResponseCustomEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseCustomEntriesExactDataEntryJSON contains the JSON +// metadata for the struct [DLPProfileCustomGetResponseCustomEntriesExactDataEntry] +type dlpProfileCustomGetResponseCustomEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseCustomEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseCustomEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseCustomEntriesExactDataEntry) implementsDLPProfileCustomGetResponseCustomEntry() { +} + +type DLPProfileCustomGetResponseCustomEntriesExactDataEntryType string + +const ( + DLPProfileCustomGetResponseCustomEntriesExactDataEntryTypeExactData DLPProfileCustomGetResponseCustomEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileCustomGetResponseCustomEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntry] +type dlpProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntry) implementsDLPProfileCustomGetResponseCustomEntry() { +} + +type DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseCustomEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomGetResponseCustomEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseCustomEntriesWordListEntryJSON contains the JSON +// metadata for the struct [DLPProfileCustomGetResponseCustomEntriesWordListEntry] +type dlpProfileCustomGetResponseCustomEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseCustomEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseCustomEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseCustomEntriesWordListEntry) implementsDLPProfileCustomGetResponseCustomEntry() { +} + +type DLPProfileCustomGetResponseCustomEntriesWordListEntryType string + +const ( + DLPProfileCustomGetResponseCustomEntriesWordListEntryTypeWordList DLPProfileCustomGetResponseCustomEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileCustomGetResponseCustomEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileCustomGetResponseCustomEntriesType string + +const ( + DLPProfileCustomGetResponseCustomEntriesTypeCustom DLPProfileCustomGetResponseCustomEntriesType = "custom" + DLPProfileCustomGetResponseCustomEntriesTypePredefined DLPProfileCustomGetResponseCustomEntriesType = "predefined" + DLPProfileCustomGetResponseCustomEntriesTypeIntegration DLPProfileCustomGetResponseCustomEntriesType = "integration" + DLPProfileCustomGetResponseCustomEntriesTypeExactData DLPProfileCustomGetResponseCustomEntriesType = "exact_data" + DLPProfileCustomGetResponseCustomEntriesTypeDocumentFingerprint DLPProfileCustomGetResponseCustomEntriesType = "document_fingerprint" + DLPProfileCustomGetResponseCustomEntriesTypeWordList DLPProfileCustomGetResponseCustomEntriesType = "word_list" +) + +func (r DLPProfileCustomGetResponseCustomEntriesType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseCustomEntriesTypeCustom, DLPProfileCustomGetResponseCustomEntriesTypePredefined, DLPProfileCustomGetResponseCustomEntriesTypeIntegration, DLPProfileCustomGetResponseCustomEntriesTypeExactData, DLPProfileCustomGetResponseCustomEntriesTypeDocumentFingerprint, DLPProfileCustomGetResponseCustomEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefined struct { + // The id of the predefined profile (uuid). + ID string `json:"id,required" format:"uuid"` + AllowedMatchCount int64 `json:"allowed_match_count,required"` + Entries []DLPProfileCustomGetResponsePredefinedEntry `json:"entries,required"` + // The name of the predefined profile. + Name string `json:"name,required"` + Type DLPProfileCustomGetResponsePredefinedType `json:"type,required"` + AIContextEnabled bool `json:"ai_context_enabled"` + ConfidenceThreshold DLPProfileCustomGetResponsePredefinedConfidenceThreshold `json:"confidence_threshold"` + // Scan the context of predefined entries to only return matches surrounded by + // keywords. + // + // Deprecated: deprecated + ContextAwareness ContextAwareness `json:"context_awareness"` + OCREnabled bool `json:"ocr_enabled"` + // Whether this profile can be accessed by anyone. + OpenAccess bool `json:"open_access"` + JSON dlpProfileCustomGetResponsePredefinedJSON `json:"-"` +} + +// dlpProfileCustomGetResponsePredefinedJSON contains the JSON metadata for the +// struct [DLPProfileCustomGetResponsePredefined] +type dlpProfileCustomGetResponsePredefinedJSON struct { + ID apijson.Field + AllowedMatchCount apijson.Field + Entries apijson.Field + Name apijson.Field + Type apijson.Field + AIContextEnabled apijson.Field + ConfidenceThreshold apijson.Field + ContextAwareness apijson.Field + OCREnabled apijson.Field + OpenAccess apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponsePredefinedJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponsePredefined) implementsDLPProfileCustomGetResponse() {} + +type DLPProfileCustomGetResponsePredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponsePredefinedEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileCustomGetResponsePredefinedEntryJSON `json:"-"` + union DLPProfileCustomGetResponsePredefinedEntriesUnion +} + +// dlpProfileCustomGetResponsePredefinedEntryJSON contains the JSON metadata for +// the struct [DLPProfileCustomGetResponsePredefinedEntry] +type dlpProfileCustomGetResponsePredefinedEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomGetResponsePredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomGetResponsePredefinedEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomGetResponsePredefinedEntriesUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileCustomGetResponsePredefinedEntriesCustomEntry], +// [DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntry], +// [DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntry], +// [DLPProfileCustomGetResponsePredefinedEntriesExactDataEntry], +// [DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntry], +// [DLPProfileCustomGetResponsePredefinedEntriesWordListEntry]. +func (r DLPProfileCustomGetResponsePredefinedEntry) AsUnion() DLPProfileCustomGetResponsePredefinedEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomGetResponsePredefinedEntriesCustomEntry], +// [DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntry], +// [DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntry], +// [DLPProfileCustomGetResponsePredefinedEntriesExactDataEntry], +// [DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntry] or +// [DLPProfileCustomGetResponsePredefinedEntriesWordListEntry]. +type DLPProfileCustomGetResponsePredefinedEntriesUnion interface { + implementsDLPProfileCustomGetResponsePredefinedEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomGetResponsePredefinedEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponsePredefinedEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponsePredefinedEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponsePredefinedEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileCustomGetResponsePredefinedEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileCustomGetResponsePredefinedEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomGetResponsePredefinedEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponsePredefinedEntriesCustomEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomGetResponsePredefinedEntriesCustomEntry] +type dlpProfileCustomGetResponsePredefinedEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponsePredefinedEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponsePredefinedEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponsePredefinedEntriesCustomEntry) implementsDLPProfileCustomGetResponsePredefinedEntry() { +} + +type DLPProfileCustomGetResponsePredefinedEntriesCustomEntryType string + +const ( + DLPProfileCustomGetResponsePredefinedEntriesCustomEntryTypeCustom DLPProfileCustomGetResponsePredefinedEntriesCustomEntryType = "custom" +) + +func (r DLPProfileCustomGetResponsePredefinedEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntry] +type dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntry) implementsDLPProfileCustomGetResponsePredefinedEntry() { +} + +type DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryConfidenceJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryConfidence] +type dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryType string + +const ( + DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryTypePredefined DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariant struct { + TopicType DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariant] +type dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTopicTypeContent DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantType string + +const ( + DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTypePromptTopic DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomGetResponsePredefinedEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponsePredefinedEntriesIntegrationEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntry] +type dlpProfileCustomGetResponsePredefinedEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponsePredefinedEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntry) implementsDLPProfileCustomGetResponsePredefinedEntry() { +} + +type DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntryType string + +const ( + DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntryTypeIntegration DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileCustomGetResponsePredefinedEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomGetResponsePredefinedEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponsePredefinedEntriesExactDataEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomGetResponsePredefinedEntriesExactDataEntry] +type dlpProfileCustomGetResponsePredefinedEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponsePredefinedEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponsePredefinedEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponsePredefinedEntriesExactDataEntry) implementsDLPProfileCustomGetResponsePredefinedEntry() { +} + +type DLPProfileCustomGetResponsePredefinedEntriesExactDataEntryType string + +const ( + DLPProfileCustomGetResponsePredefinedEntriesExactDataEntryTypeExactData DLPProfileCustomGetResponsePredefinedEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileCustomGetResponsePredefinedEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntry] +type dlpProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntry) implementsDLPProfileCustomGetResponsePredefinedEntry() { +} + +type DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponsePredefinedEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomGetResponsePredefinedEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponsePredefinedEntriesWordListEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomGetResponsePredefinedEntriesWordListEntry] +type dlpProfileCustomGetResponsePredefinedEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponsePredefinedEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponsePredefinedEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponsePredefinedEntriesWordListEntry) implementsDLPProfileCustomGetResponsePredefinedEntry() { +} + +type DLPProfileCustomGetResponsePredefinedEntriesWordListEntryType string + +const ( + DLPProfileCustomGetResponsePredefinedEntriesWordListEntryTypeWordList DLPProfileCustomGetResponsePredefinedEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileCustomGetResponsePredefinedEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedEntriesType string + +const ( + DLPProfileCustomGetResponsePredefinedEntriesTypeCustom DLPProfileCustomGetResponsePredefinedEntriesType = "custom" + DLPProfileCustomGetResponsePredefinedEntriesTypePredefined DLPProfileCustomGetResponsePredefinedEntriesType = "predefined" + DLPProfileCustomGetResponsePredefinedEntriesTypeIntegration DLPProfileCustomGetResponsePredefinedEntriesType = "integration" + DLPProfileCustomGetResponsePredefinedEntriesTypeExactData DLPProfileCustomGetResponsePredefinedEntriesType = "exact_data" + DLPProfileCustomGetResponsePredefinedEntriesTypeDocumentFingerprint DLPProfileCustomGetResponsePredefinedEntriesType = "document_fingerprint" + DLPProfileCustomGetResponsePredefinedEntriesTypeWordList DLPProfileCustomGetResponsePredefinedEntriesType = "word_list" +) + +func (r DLPProfileCustomGetResponsePredefinedEntriesType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedEntriesTypeCustom, DLPProfileCustomGetResponsePredefinedEntriesTypePredefined, DLPProfileCustomGetResponsePredefinedEntriesTypeIntegration, DLPProfileCustomGetResponsePredefinedEntriesTypeExactData, DLPProfileCustomGetResponsePredefinedEntriesTypeDocumentFingerprint, DLPProfileCustomGetResponsePredefinedEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedType string + +const ( + DLPProfileCustomGetResponsePredefinedTypePredefined DLPProfileCustomGetResponsePredefinedType = "predefined" +) + +func (r DLPProfileCustomGetResponsePredefinedType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedTypePredefined: + return true + } + return false +} + +type DLPProfileCustomGetResponsePredefinedConfidenceThreshold string + +const ( + DLPProfileCustomGetResponsePredefinedConfidenceThresholdLow DLPProfileCustomGetResponsePredefinedConfidenceThreshold = "low" + DLPProfileCustomGetResponsePredefinedConfidenceThresholdMedium DLPProfileCustomGetResponsePredefinedConfidenceThreshold = "medium" + DLPProfileCustomGetResponsePredefinedConfidenceThresholdHigh DLPProfileCustomGetResponsePredefinedConfidenceThreshold = "high" + DLPProfileCustomGetResponsePredefinedConfidenceThresholdVeryHigh DLPProfileCustomGetResponsePredefinedConfidenceThreshold = "very_high" +) + +func (r DLPProfileCustomGetResponsePredefinedConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponsePredefinedConfidenceThresholdLow, DLPProfileCustomGetResponsePredefinedConfidenceThresholdMedium, DLPProfileCustomGetResponsePredefinedConfidenceThresholdHigh, DLPProfileCustomGetResponsePredefinedConfidenceThresholdVeryHigh: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegration struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Entries []DLPProfileCustomGetResponseIntegrationEntry `json:"entries,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseIntegrationType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + // The description of the profile. + Description string `json:"description,nullable"` + JSON dlpProfileCustomGetResponseIntegrationJSON `json:"-"` +} + +// dlpProfileCustomGetResponseIntegrationJSON contains the JSON metadata for the +// struct [DLPProfileCustomGetResponseIntegration] +type dlpProfileCustomGetResponseIntegrationJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Entries apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseIntegrationJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseIntegration) implementsDLPProfileCustomGetResponse() {} + +type DLPProfileCustomGetResponseIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseIntegrationEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfileCustomGetResponseIntegrationEntryJSON `json:"-"` + union DLPProfileCustomGetResponseIntegrationEntriesUnion +} + +// dlpProfileCustomGetResponseIntegrationEntryJSON contains the JSON metadata for +// the struct [DLPProfileCustomGetResponseIntegrationEntry] +type dlpProfileCustomGetResponseIntegrationEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfileCustomGetResponseIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfileCustomGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfileCustomGetResponseIntegrationEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfileCustomGetResponseIntegrationEntriesUnion] interface +// which you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfileCustomGetResponseIntegrationEntriesCustomEntry], +// [DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntry], +// [DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntry], +// [DLPProfileCustomGetResponseIntegrationEntriesExactDataEntry], +// [DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntry], +// [DLPProfileCustomGetResponseIntegrationEntriesWordListEntry]. +func (r DLPProfileCustomGetResponseIntegrationEntry) AsUnion() DLPProfileCustomGetResponseIntegrationEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfileCustomGetResponseIntegrationEntriesCustomEntry], +// [DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntry], +// [DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntry], +// [DLPProfileCustomGetResponseIntegrationEntriesExactDataEntry], +// [DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntry] or +// [DLPProfileCustomGetResponseIntegrationEntriesWordListEntry]. +type DLPProfileCustomGetResponseIntegrationEntriesUnion interface { + implementsDLPProfileCustomGetResponseIntegrationEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfileCustomGetResponseIntegrationEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseIntegrationEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseIntegrationEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfileCustomGetResponseIntegrationEntriesWordListEntry{}), + }, + ) +} + +type DLPProfileCustomGetResponseIntegrationEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfileCustomGetResponseIntegrationEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomGetResponseIntegrationEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseIntegrationEntriesCustomEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomGetResponseIntegrationEntriesCustomEntry] +type dlpProfileCustomGetResponseIntegrationEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseIntegrationEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseIntegrationEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseIntegrationEntriesCustomEntry) implementsDLPProfileCustomGetResponseIntegrationEntry() { +} + +type DLPProfileCustomGetResponseIntegrationEntriesCustomEntryType string + +const ( + DLPProfileCustomGetResponseIntegrationEntriesCustomEntryTypeCustom DLPProfileCustomGetResponseIntegrationEntriesCustomEntryType = "custom" +) + +func (r DLPProfileCustomGetResponseIntegrationEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntry] +type dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntry) implementsDLPProfileCustomGetResponseIntegrationEntry() { +} + +type DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryConfidenceJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryConfidence] +type dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryType string + +const ( + DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryTypePredefined DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariant struct { + TopicType DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantJSON contains +// the JSON metadata for the struct +// [DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariant] +type dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTopicTypeIntent DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTopicTypeContent DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantType string + +const ( + DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTypePromptTopic DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomGetResponseIntegrationEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseIntegrationEntriesIntegrationEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntry] +type dlpProfileCustomGetResponseIntegrationEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseIntegrationEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntry) implementsDLPProfileCustomGetResponseIntegrationEntry() { +} + +type DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntryType string + +const ( + DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntryTypeIntegration DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegrationEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfileCustomGetResponseIntegrationEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomGetResponseIntegrationEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseIntegrationEntriesExactDataEntryJSON contains the +// JSON metadata for the struct +// [DLPProfileCustomGetResponseIntegrationEntriesExactDataEntry] +type dlpProfileCustomGetResponseIntegrationEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseIntegrationEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseIntegrationEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseIntegrationEntriesExactDataEntry) implementsDLPProfileCustomGetResponseIntegrationEntry() { +} + +type DLPProfileCustomGetResponseIntegrationEntriesExactDataEntryType string + +const ( + DLPProfileCustomGetResponseIntegrationEntriesExactDataEntryTypeExactData DLPProfileCustomGetResponseIntegrationEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfileCustomGetResponseIntegrationEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryJSON +// contains the JSON metadata for the struct +// [DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntry] +type dlpProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntry) implementsDLPProfileCustomGetResponseIntegrationEntry() { +} + +type DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryType string + +const ( + DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegrationEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfileCustomGetResponseIntegrationEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfileCustomGetResponseIntegrationEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfileCustomGetResponseIntegrationEntriesWordListEntryJSON contains the JSON +// metadata for the struct +// [DLPProfileCustomGetResponseIntegrationEntriesWordListEntry] +type dlpProfileCustomGetResponseIntegrationEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfileCustomGetResponseIntegrationEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfileCustomGetResponseIntegrationEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfileCustomGetResponseIntegrationEntriesWordListEntry) implementsDLPProfileCustomGetResponseIntegrationEntry() { +} + +type DLPProfileCustomGetResponseIntegrationEntriesWordListEntryType string + +const ( + DLPProfileCustomGetResponseIntegrationEntriesWordListEntryTypeWordList DLPProfileCustomGetResponseIntegrationEntriesWordListEntryType = "word_list" +) + +func (r DLPProfileCustomGetResponseIntegrationEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegrationEntriesType string + +const ( + DLPProfileCustomGetResponseIntegrationEntriesTypeCustom DLPProfileCustomGetResponseIntegrationEntriesType = "custom" + DLPProfileCustomGetResponseIntegrationEntriesTypePredefined DLPProfileCustomGetResponseIntegrationEntriesType = "predefined" + DLPProfileCustomGetResponseIntegrationEntriesTypeIntegration DLPProfileCustomGetResponseIntegrationEntriesType = "integration" + DLPProfileCustomGetResponseIntegrationEntriesTypeExactData DLPProfileCustomGetResponseIntegrationEntriesType = "exact_data" + DLPProfileCustomGetResponseIntegrationEntriesTypeDocumentFingerprint DLPProfileCustomGetResponseIntegrationEntriesType = "document_fingerprint" + DLPProfileCustomGetResponseIntegrationEntriesTypeWordList DLPProfileCustomGetResponseIntegrationEntriesType = "word_list" +) + +func (r DLPProfileCustomGetResponseIntegrationEntriesType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationEntriesTypeCustom, DLPProfileCustomGetResponseIntegrationEntriesTypePredefined, DLPProfileCustomGetResponseIntegrationEntriesTypeIntegration, DLPProfileCustomGetResponseIntegrationEntriesTypeExactData, DLPProfileCustomGetResponseIntegrationEntriesTypeDocumentFingerprint, DLPProfileCustomGetResponseIntegrationEntriesTypeWordList: + return true + } + return false +} + +type DLPProfileCustomGetResponseIntegrationType string + +const ( + DLPProfileCustomGetResponseIntegrationTypeIntegration DLPProfileCustomGetResponseIntegrationType = "integration" +) + +func (r DLPProfileCustomGetResponseIntegrationType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseIntegrationTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomGetResponseType string + +const ( + DLPProfileCustomGetResponseTypeCustom DLPProfileCustomGetResponseType = "custom" + DLPProfileCustomGetResponseTypePredefined DLPProfileCustomGetResponseType = "predefined" + DLPProfileCustomGetResponseTypeIntegration DLPProfileCustomGetResponseType = "integration" +) + +func (r DLPProfileCustomGetResponseType) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseTypeCustom, DLPProfileCustomGetResponseTypePredefined, DLPProfileCustomGetResponseTypeIntegration: + return true + } + return false +} + +type DLPProfileCustomGetResponseConfidenceThreshold string + +const ( + DLPProfileCustomGetResponseConfidenceThresholdLow DLPProfileCustomGetResponseConfidenceThreshold = "low" + DLPProfileCustomGetResponseConfidenceThresholdMedium DLPProfileCustomGetResponseConfidenceThreshold = "medium" + DLPProfileCustomGetResponseConfidenceThresholdHigh DLPProfileCustomGetResponseConfidenceThreshold = "high" + DLPProfileCustomGetResponseConfidenceThresholdVeryHigh DLPProfileCustomGetResponseConfidenceThreshold = "very_high" +) + +func (r DLPProfileCustomGetResponseConfidenceThreshold) IsKnown() bool { + switch r { + case DLPProfileCustomGetResponseConfidenceThresholdLow, DLPProfileCustomGetResponseConfidenceThresholdMedium, DLPProfileCustomGetResponseConfidenceThresholdHigh, DLPProfileCustomGetResponseConfidenceThresholdVeryHigh: + return true + } + return false +} + type DLPProfileCustomNewParams struct { AccountID param.Field[string] `path:"account_id,required"` Name param.Field[string] `json:"name,required"` @@ -412,7 +6202,7 @@ type DLPProfileCustomNewResponseEnvelope struct { Messages []DLPProfileCustomNewResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPProfileCustomNewResponseEnvelopeSuccess `json:"success,required"` - Result Profile `json:"result"` + Result DLPProfileCustomNewResponse `json:"result"` JSON dlpProfileCustomNewResponseEnvelopeJSON `json:"-"` } @@ -769,7 +6559,7 @@ type DLPProfileCustomUpdateResponseEnvelope struct { Messages []DLPProfileCustomUpdateResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPProfileCustomUpdateResponseEnvelopeSuccess `json:"success,required"` - Result Profile `json:"result"` + Result DLPProfileCustomUpdateResponse `json:"result"` JSON dlpProfileCustomUpdateResponseEnvelopeJSON `json:"-"` } @@ -1055,7 +6845,7 @@ type DLPProfileCustomGetResponseEnvelope struct { Messages []DLPProfileCustomGetResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPProfileCustomGetResponseEnvelopeSuccess `json:"success,required"` - Result Profile `json:"result"` + Result DLPProfileCustomGetResponse `json:"result"` JSON dlpProfileCustomGetResponseEnvelopeJSON `json:"-"` } diff --git a/zero_trust/dlpprofilepredefined.go b/zero_trust/dlpprofilepredefined.go index 76dfe672260..7a199f73a72 100644 --- a/zero_trust/dlpprofilepredefined.go +++ b/zero_trust/dlpprofilepredefined.go @@ -40,7 +40,7 @@ func NewDLPProfilePredefinedService(opts ...option.RequestOption) (r *DLPProfile // This is similar to `update_predefined` but only returns entries that are // enabled. This is needed for our terraform API Updates a DLP predefined profile. // Only supports enabling/disabling entries. -func (r *DLPProfilePredefinedService) Update(ctx context.Context, profileID string, params DLPProfilePredefinedUpdateParams, opts ...option.RequestOption) (res *PredefinedProfile, err error) { +func (r *DLPProfilePredefinedService) Update(ctx context.Context, profileID string, params DLPProfilePredefinedUpdateParams, opts ...option.RequestOption) (res *DLPProfilePredefinedUpdateResponse, err error) { var env DLPProfilePredefinedUpdateResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { @@ -61,7 +61,7 @@ func (r *DLPProfilePredefinedService) Update(ctx context.Context, profileID stri } // This is a no-op as predefined profiles can't be deleted but is needed for our -// generated terraform API +// generated terraform API. func (r *DLPProfilePredefinedService) Delete(ctx context.Context, profileID string, body DLPProfilePredefinedDeleteParams, opts ...option.RequestOption) (res *DLPProfilePredefinedDeleteResponse, err error) { var env DLPProfilePredefinedDeleteResponseEnvelope opts = slices.Concat(r.Options, opts) @@ -84,7 +84,7 @@ func (r *DLPProfilePredefinedService) Delete(ctx context.Context, profileID stri // This is similar to `get_predefined` but only returns entries that are enabled. // This is needed for our terraform API Fetches a predefined DLP profile by id. -func (r *DLPProfilePredefinedService) Get(ctx context.Context, profileID string, query DLPProfilePredefinedGetParams, opts ...option.RequestOption) (res *PredefinedProfile, err error) { +func (r *DLPProfilePredefinedService) Get(ctx context.Context, profileID string, query DLPProfilePredefinedGetParams, opts ...option.RequestOption) (res *DLPProfilePredefinedGetResponse, err error) { var env DLPProfilePredefinedGetResponseEnvelope opts = slices.Concat(r.Options, opts) if query.AccountID.Value == "" { @@ -104,26 +104,26 @@ func (r *DLPProfilePredefinedService) Get(ctx context.Context, profileID string, return } -type PredefinedProfile struct { +type DLPProfilePredefinedUpdateResponse struct { // The id of the predefined profile (uuid). ID string `json:"id,required" format:"uuid"` AllowedMatchCount int64 `json:"allowed_match_count,required"` ConfidenceThreshold string `json:"confidence_threshold,required,nullable"` EnabledEntries []string `json:"enabled_entries,required" format:"uuid"` // Deprecated: deprecated - Entries []PredefinedProfileEntry `json:"entries,required"` + Entries []DLPProfilePredefinedUpdateResponseEntry `json:"entries,required"` // The name of the predefined profile. Name string `json:"name,required"` AIContextEnabled bool `json:"ai_context_enabled"` OCREnabled bool `json:"ocr_enabled"` // Whether this profile can be accessed by anyone. - OpenAccess bool `json:"open_access"` - JSON predefinedProfileJSON `json:"-"` + OpenAccess bool `json:"open_access"` + JSON dlpProfilePredefinedUpdateResponseJSON `json:"-"` } -// predefinedProfileJSON contains the JSON metadata for the struct -// [PredefinedProfile] -type predefinedProfileJSON struct { +// dlpProfilePredefinedUpdateResponseJSON contains the JSON metadata for the struct +// [DLPProfilePredefinedUpdateResponse] +type dlpProfilePredefinedUpdateResponseJSON struct { ID apijson.Field AllowedMatchCount apijson.Field ConfidenceThreshold apijson.Field @@ -137,24 +137,24 @@ type predefinedProfileJSON struct { ExtraFields map[string]apijson.Field } -func (r *PredefinedProfile) UnmarshalJSON(data []byte) (err error) { +func (r *DLPProfilePredefinedUpdateResponse) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r predefinedProfileJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseJSON) RawJSON() string { return r.raw } -type PredefinedProfileEntry struct { - ID string `json:"id,required" format:"uuid"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type PredefinedProfileEntriesType `json:"type,required"` +type DLPProfilePredefinedUpdateResponseEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedUpdateResponseEntriesType `json:"type,required"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [PredefinedProfileEntriesPredefinedEntryConfidence]. + // [DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` @@ -162,17 +162,17 @@ type PredefinedProfileEntry struct { Secret bool `json:"secret"` UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [PredefinedProfileEntriesPredefinedEntryVariant]. + // [DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. - WordList interface{} `json:"word_list"` - JSON predefinedProfileEntryJSON `json:"-"` - union PredefinedProfileEntriesUnion + WordList interface{} `json:"word_list"` + JSON dlpProfilePredefinedUpdateResponseEntryJSON `json:"-"` + union DLPProfilePredefinedUpdateResponseEntriesUnion } -// predefinedProfileEntryJSON contains the JSON metadata for the struct -// [PredefinedProfileEntry] -type predefinedProfileEntryJSON struct { +// dlpProfilePredefinedUpdateResponseEntryJSON contains the JSON metadata for the +// struct [DLPProfilePredefinedUpdateResponseEntry] +type dlpProfilePredefinedUpdateResponseEntryJSON struct { ID apijson.Field Enabled apijson.Field Name apijson.Field @@ -190,12 +190,12 @@ type predefinedProfileEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r predefinedProfileEntryJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseEntryJSON) RawJSON() string { return r.raw } -func (r *PredefinedProfileEntry) UnmarshalJSON(data []byte) (err error) { - *r = PredefinedProfileEntry{} +func (r *DLPProfilePredefinedUpdateResponseEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfilePredefinedUpdateResponseEntry{} err = apijson.UnmarshalRoot(data, &r.union) if err != nil { return err @@ -203,75 +203,76 @@ func (r *PredefinedProfileEntry) UnmarshalJSON(data []byte) (err error) { return apijson.Port(r.union, &r) } -// AsUnion returns a [PredefinedProfileEntriesUnion] interface which you can cast -// to the specific types for more type safety. +// AsUnion returns a [DLPProfilePredefinedUpdateResponseEntriesUnion] interface +// which you can cast to the specific types for more type safety. // -// Possible runtime types of the union are [PredefinedProfileEntriesCustomEntry], -// [PredefinedProfileEntriesPredefinedEntry], -// [PredefinedProfileEntriesIntegrationEntry], -// [PredefinedProfileEntriesExactDataEntry], -// [PredefinedProfileEntriesDocumentFingerprintEntry], -// [PredefinedProfileEntriesWordListEntry]. -func (r PredefinedProfileEntry) AsUnion() PredefinedProfileEntriesUnion { +// Possible runtime types of the union are +// [DLPProfilePredefinedUpdateResponseEntriesCustomEntry], +// [DLPProfilePredefinedUpdateResponseEntriesPredefinedEntry], +// [DLPProfilePredefinedUpdateResponseEntriesIntegrationEntry], +// [DLPProfilePredefinedUpdateResponseEntriesExactDataEntry], +// [DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntry], +// [DLPProfilePredefinedUpdateResponseEntriesWordListEntry]. +func (r DLPProfilePredefinedUpdateResponseEntry) AsUnion() DLPProfilePredefinedUpdateResponseEntriesUnion { return r.union } -// Union satisfied by [PredefinedProfileEntriesCustomEntry], -// [PredefinedProfileEntriesPredefinedEntry], -// [PredefinedProfileEntriesIntegrationEntry], -// [PredefinedProfileEntriesExactDataEntry], -// [PredefinedProfileEntriesDocumentFingerprintEntry] or -// [PredefinedProfileEntriesWordListEntry]. -type PredefinedProfileEntriesUnion interface { - implementsPredefinedProfileEntry() +// Union satisfied by [DLPProfilePredefinedUpdateResponseEntriesCustomEntry], +// [DLPProfilePredefinedUpdateResponseEntriesPredefinedEntry], +// [DLPProfilePredefinedUpdateResponseEntriesIntegrationEntry], +// [DLPProfilePredefinedUpdateResponseEntriesExactDataEntry], +// [DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntry] or +// [DLPProfilePredefinedUpdateResponseEntriesWordListEntry]. +type DLPProfilePredefinedUpdateResponseEntriesUnion interface { + implementsDLPProfilePredefinedUpdateResponseEntry() } func init() { apijson.RegisterUnion( - reflect.TypeOf((*PredefinedProfileEntriesUnion)(nil)).Elem(), + reflect.TypeOf((*DLPProfilePredefinedUpdateResponseEntriesUnion)(nil)).Elem(), "", apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(PredefinedProfileEntriesCustomEntry{}), + Type: reflect.TypeOf(DLPProfilePredefinedUpdateResponseEntriesCustomEntry{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(PredefinedProfileEntriesPredefinedEntry{}), + Type: reflect.TypeOf(DLPProfilePredefinedUpdateResponseEntriesPredefinedEntry{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(PredefinedProfileEntriesIntegrationEntry{}), + Type: reflect.TypeOf(DLPProfilePredefinedUpdateResponseEntriesIntegrationEntry{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(PredefinedProfileEntriesExactDataEntry{}), + Type: reflect.TypeOf(DLPProfilePredefinedUpdateResponseEntriesExactDataEntry{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(PredefinedProfileEntriesDocumentFingerprintEntry{}), + Type: reflect.TypeOf(DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntry{}), }, apijson.UnionVariant{ TypeFilter: gjson.JSON, - Type: reflect.TypeOf(PredefinedProfileEntriesWordListEntry{}), + Type: reflect.TypeOf(DLPProfilePredefinedUpdateResponseEntriesWordListEntry{}), }, ) } -type PredefinedProfileEntriesCustomEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type PredefinedProfileEntriesCustomEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON predefinedProfileEntriesCustomEntryJSON `json:"-"` +type DLPProfilePredefinedUpdateResponseEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfilePredefinedUpdateResponseEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfilePredefinedUpdateResponseEntriesCustomEntryJSON `json:"-"` } -// predefinedProfileEntriesCustomEntryJSON contains the JSON metadata for the -// struct [PredefinedProfileEntriesCustomEntry] -type predefinedProfileEntriesCustomEntryJSON struct { +// dlpProfilePredefinedUpdateResponseEntriesCustomEntryJSON contains the JSON +// metadata for the struct [DLPProfilePredefinedUpdateResponseEntriesCustomEntry] +type dlpProfilePredefinedUpdateResponseEntriesCustomEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -284,44 +285,46 @@ type predefinedProfileEntriesCustomEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *PredefinedProfileEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPProfilePredefinedUpdateResponseEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r predefinedProfileEntriesCustomEntryJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseEntriesCustomEntryJSON) RawJSON() string { return r.raw } -func (r PredefinedProfileEntriesCustomEntry) implementsPredefinedProfileEntry() {} +func (r DLPProfilePredefinedUpdateResponseEntriesCustomEntry) implementsDLPProfilePredefinedUpdateResponseEntry() { +} -type PredefinedProfileEntriesCustomEntryType string +type DLPProfilePredefinedUpdateResponseEntriesCustomEntryType string const ( - PredefinedProfileEntriesCustomEntryTypeCustom PredefinedProfileEntriesCustomEntryType = "custom" + DLPProfilePredefinedUpdateResponseEntriesCustomEntryTypeCustom DLPProfilePredefinedUpdateResponseEntriesCustomEntryType = "custom" ) -func (r PredefinedProfileEntriesCustomEntryType) IsKnown() bool { +func (r DLPProfilePredefinedUpdateResponseEntriesCustomEntryType) IsKnown() bool { switch r { - case PredefinedProfileEntriesCustomEntryTypeCustom: + case DLPProfilePredefinedUpdateResponseEntriesCustomEntryTypeCustom: return true } return false } -type PredefinedProfileEntriesPredefinedEntry struct { - ID string `json:"id,required" format:"uuid"` - Confidence PredefinedProfileEntriesPredefinedEntryConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type PredefinedProfileEntriesPredefinedEntryType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant PredefinedProfileEntriesPredefinedEntryVariant `json:"variant"` - JSON predefinedProfileEntriesPredefinedEntryJSON `json:"-"` +type DLPProfilePredefinedUpdateResponseEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryJSON `json:"-"` } -// predefinedProfileEntriesPredefinedEntryJSON contains the JSON metadata for the -// struct [PredefinedProfileEntriesPredefinedEntry] -type predefinedProfileEntriesPredefinedEntryJSON struct { +// dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryJSON contains the JSON +// metadata for the struct +// [DLPProfilePredefinedUpdateResponseEntriesPredefinedEntry] +type dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field @@ -333,66 +336,69 @@ type predefinedProfileEntriesPredefinedEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *PredefinedProfileEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPProfilePredefinedUpdateResponseEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r predefinedProfileEntriesPredefinedEntryJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryJSON) RawJSON() string { return r.raw } -func (r PredefinedProfileEntriesPredefinedEntry) implementsPredefinedProfileEntry() {} +func (r DLPProfilePredefinedUpdateResponseEntriesPredefinedEntry) implementsDLPProfilePredefinedUpdateResponseEntry() { +} -type PredefinedProfileEntriesPredefinedEntryConfidence struct { +type DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON predefinedProfileEntriesPredefinedEntryConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryConfidenceJSON `json:"-"` } -// predefinedProfileEntriesPredefinedEntryConfidenceJSON contains the JSON metadata -// for the struct [PredefinedProfileEntriesPredefinedEntryConfidence] -type predefinedProfileEntriesPredefinedEntryConfidenceJSON struct { +// dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryConfidenceJSON contains +// the JSON metadata for the struct +// [DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryConfidence] +type dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *PredefinedProfileEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r predefinedProfileEntriesPredefinedEntryConfidenceJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryConfidenceJSON) RawJSON() string { return r.raw } -type PredefinedProfileEntriesPredefinedEntryType string +type DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryType string const ( - PredefinedProfileEntriesPredefinedEntryTypePredefined PredefinedProfileEntriesPredefinedEntryType = "predefined" + DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryTypePredefined DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryType = "predefined" ) -func (r PredefinedProfileEntriesPredefinedEntryType) IsKnown() bool { +func (r DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryType) IsKnown() bool { switch r { - case PredefinedProfileEntriesPredefinedEntryTypePredefined: + case DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryTypePredefined: return true } return false } -type PredefinedProfileEntriesPredefinedEntryVariant struct { - TopicType PredefinedProfileEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` - Type PredefinedProfileEntriesPredefinedEntryVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON predefinedProfileEntriesPredefinedEntryVariantJSON `json:"-"` +type DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariant struct { + TopicType DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantJSON `json:"-"` } -// predefinedProfileEntriesPredefinedEntryVariantJSON contains the JSON metadata -// for the struct [PredefinedProfileEntriesPredefinedEntryVariant] -type predefinedProfileEntriesPredefinedEntryVariantJSON struct { +// dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantJSON contains the +// JSON metadata for the struct +// [DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariant] +type dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -400,57 +406,58 @@ type predefinedProfileEntriesPredefinedEntryVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *PredefinedProfileEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r predefinedProfileEntriesPredefinedEntryVariantJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantJSON) RawJSON() string { return r.raw } -type PredefinedProfileEntriesPredefinedEntryVariantTopicType string +type DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTopicType string const ( - PredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent PredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent" - PredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent PredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content" + DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTopicTypeIntent DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTopicTypeContent DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTopicType = "Content" ) -func (r PredefinedProfileEntriesPredefinedEntryVariantTopicType) IsKnown() bool { +func (r DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTopicType) IsKnown() bool { switch r { - case PredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent, PredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent: + case DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTopicTypeContent: return true } return false } -type PredefinedProfileEntriesPredefinedEntryVariantType string +type DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantType string const ( - PredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic PredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic" + DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTypePromptTopic DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantType = "PromptTopic" ) -func (r PredefinedProfileEntriesPredefinedEntryVariantType) IsKnown() bool { +func (r DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantType) IsKnown() bool { switch r { - case PredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic: + case DLPProfilePredefinedUpdateResponseEntriesPredefinedEntryVariantTypePromptTopic: return true } return false } -type PredefinedProfileEntriesIntegrationEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type PredefinedProfileEntriesIntegrationEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON predefinedProfileEntriesIntegrationEntryJSON `json:"-"` +type DLPProfilePredefinedUpdateResponseEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedUpdateResponseEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfilePredefinedUpdateResponseEntriesIntegrationEntryJSON `json:"-"` } -// predefinedProfileEntriesIntegrationEntryJSON contains the JSON metadata for the -// struct [PredefinedProfileEntriesIntegrationEntry] -type predefinedProfileEntriesIntegrationEntryJSON struct { +// dlpProfilePredefinedUpdateResponseEntriesIntegrationEntryJSON contains the JSON +// metadata for the struct +// [DLPProfilePredefinedUpdateResponseEntriesIntegrationEntry] +type dlpProfilePredefinedUpdateResponseEntriesIntegrationEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -462,47 +469,49 @@ type predefinedProfileEntriesIntegrationEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *PredefinedProfileEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPProfilePredefinedUpdateResponseEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r predefinedProfileEntriesIntegrationEntryJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseEntriesIntegrationEntryJSON) RawJSON() string { return r.raw } -func (r PredefinedProfileEntriesIntegrationEntry) implementsPredefinedProfileEntry() {} +func (r DLPProfilePredefinedUpdateResponseEntriesIntegrationEntry) implementsDLPProfilePredefinedUpdateResponseEntry() { +} -type PredefinedProfileEntriesIntegrationEntryType string +type DLPProfilePredefinedUpdateResponseEntriesIntegrationEntryType string const ( - PredefinedProfileEntriesIntegrationEntryTypeIntegration PredefinedProfileEntriesIntegrationEntryType = "integration" + DLPProfilePredefinedUpdateResponseEntriesIntegrationEntryTypeIntegration DLPProfilePredefinedUpdateResponseEntriesIntegrationEntryType = "integration" ) -func (r PredefinedProfileEntriesIntegrationEntryType) IsKnown() bool { +func (r DLPProfilePredefinedUpdateResponseEntriesIntegrationEntryType) IsKnown() bool { switch r { - case PredefinedProfileEntriesIntegrationEntryTypeIntegration: + case DLPProfilePredefinedUpdateResponseEntriesIntegrationEntryTypeIntegration: return true } return false } -type PredefinedProfileEntriesExactDataEntry struct { +type DLPProfilePredefinedUpdateResponseEntriesExactDataEntry struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type PredefinedProfileEntriesExactDataEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON predefinedProfileEntriesExactDataEntryJSON `json:"-"` -} - -// predefinedProfileEntriesExactDataEntryJSON contains the JSON metadata for the -// struct [PredefinedProfileEntriesExactDataEntry] -type predefinedProfileEntriesExactDataEntryJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfilePredefinedUpdateResponseEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfilePredefinedUpdateResponseEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfilePredefinedUpdateResponseEntriesExactDataEntryJSON contains the JSON +// metadata for the struct +// [DLPProfilePredefinedUpdateResponseEntriesExactDataEntry] +type dlpProfilePredefinedUpdateResponseEntriesExactDataEntryJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -515,43 +524,45 @@ type predefinedProfileEntriesExactDataEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *PredefinedProfileEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPProfilePredefinedUpdateResponseEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r predefinedProfileEntriesExactDataEntryJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseEntriesExactDataEntryJSON) RawJSON() string { return r.raw } -func (r PredefinedProfileEntriesExactDataEntry) implementsPredefinedProfileEntry() {} +func (r DLPProfilePredefinedUpdateResponseEntriesExactDataEntry) implementsDLPProfilePredefinedUpdateResponseEntry() { +} -type PredefinedProfileEntriesExactDataEntryType string +type DLPProfilePredefinedUpdateResponseEntriesExactDataEntryType string const ( - PredefinedProfileEntriesExactDataEntryTypeExactData PredefinedProfileEntriesExactDataEntryType = "exact_data" + DLPProfilePredefinedUpdateResponseEntriesExactDataEntryTypeExactData DLPProfilePredefinedUpdateResponseEntriesExactDataEntryType = "exact_data" ) -func (r PredefinedProfileEntriesExactDataEntryType) IsKnown() bool { +func (r DLPProfilePredefinedUpdateResponseEntriesExactDataEntryType) IsKnown() bool { switch r { - case PredefinedProfileEntriesExactDataEntryTypeExactData: + case DLPProfilePredefinedUpdateResponseEntriesExactDataEntryTypeExactData: return true } return false } -type PredefinedProfileEntriesDocumentFingerprintEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type PredefinedProfileEntriesDocumentFingerprintEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON predefinedProfileEntriesDocumentFingerprintEntryJSON `json:"-"` +type DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryJSON `json:"-"` } -// predefinedProfileEntriesDocumentFingerprintEntryJSON contains the JSON metadata -// for the struct [PredefinedProfileEntriesDocumentFingerprintEntry] -type predefinedProfileEntriesDocumentFingerprintEntryJSON struct { +// dlpProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryJSON contains +// the JSON metadata for the struct +// [DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntry] +type dlpProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -562,45 +573,46 @@ type predefinedProfileEntriesDocumentFingerprintEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *PredefinedProfileEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r predefinedProfileEntriesDocumentFingerprintEntryJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryJSON) RawJSON() string { return r.raw } -func (r PredefinedProfileEntriesDocumentFingerprintEntry) implementsPredefinedProfileEntry() {} +func (r DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntry) implementsDLPProfilePredefinedUpdateResponseEntry() { +} -type PredefinedProfileEntriesDocumentFingerprintEntryType string +type DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryType string const ( - PredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint PredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint" + DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryType = "document_fingerprint" ) -func (r PredefinedProfileEntriesDocumentFingerprintEntryType) IsKnown() bool { +func (r DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryType) IsKnown() bool { switch r { - case PredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + case DLPProfilePredefinedUpdateResponseEntriesDocumentFingerprintEntryTypeDocumentFingerprint: return true } return false } -type PredefinedProfileEntriesWordListEntry struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type PredefinedProfileEntriesWordListEntryType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON predefinedProfileEntriesWordListEntryJSON `json:"-"` +type DLPProfilePredefinedUpdateResponseEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedUpdateResponseEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfilePredefinedUpdateResponseEntriesWordListEntryJSON `json:"-"` } -// predefinedProfileEntriesWordListEntryJSON contains the JSON metadata for the -// struct [PredefinedProfileEntriesWordListEntry] -type predefinedProfileEntriesWordListEntryJSON struct { +// dlpProfilePredefinedUpdateResponseEntriesWordListEntryJSON contains the JSON +// metadata for the struct [DLPProfilePredefinedUpdateResponseEntriesWordListEntry] +type dlpProfilePredefinedUpdateResponseEntriesWordListEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -613,44 +625,45 @@ type predefinedProfileEntriesWordListEntryJSON struct { ExtraFields map[string]apijson.Field } -func (r *PredefinedProfileEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { +func (r *DLPProfilePredefinedUpdateResponseEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r predefinedProfileEntriesWordListEntryJSON) RawJSON() string { +func (r dlpProfilePredefinedUpdateResponseEntriesWordListEntryJSON) RawJSON() string { return r.raw } -func (r PredefinedProfileEntriesWordListEntry) implementsPredefinedProfileEntry() {} +func (r DLPProfilePredefinedUpdateResponseEntriesWordListEntry) implementsDLPProfilePredefinedUpdateResponseEntry() { +} -type PredefinedProfileEntriesWordListEntryType string +type DLPProfilePredefinedUpdateResponseEntriesWordListEntryType string const ( - PredefinedProfileEntriesWordListEntryTypeWordList PredefinedProfileEntriesWordListEntryType = "word_list" + DLPProfilePredefinedUpdateResponseEntriesWordListEntryTypeWordList DLPProfilePredefinedUpdateResponseEntriesWordListEntryType = "word_list" ) -func (r PredefinedProfileEntriesWordListEntryType) IsKnown() bool { +func (r DLPProfilePredefinedUpdateResponseEntriesWordListEntryType) IsKnown() bool { switch r { - case PredefinedProfileEntriesWordListEntryTypeWordList: + case DLPProfilePredefinedUpdateResponseEntriesWordListEntryTypeWordList: return true } return false } -type PredefinedProfileEntriesType string +type DLPProfilePredefinedUpdateResponseEntriesType string const ( - PredefinedProfileEntriesTypeCustom PredefinedProfileEntriesType = "custom" - PredefinedProfileEntriesTypePredefined PredefinedProfileEntriesType = "predefined" - PredefinedProfileEntriesTypeIntegration PredefinedProfileEntriesType = "integration" - PredefinedProfileEntriesTypeExactData PredefinedProfileEntriesType = "exact_data" - PredefinedProfileEntriesTypeDocumentFingerprint PredefinedProfileEntriesType = "document_fingerprint" - PredefinedProfileEntriesTypeWordList PredefinedProfileEntriesType = "word_list" + DLPProfilePredefinedUpdateResponseEntriesTypeCustom DLPProfilePredefinedUpdateResponseEntriesType = "custom" + DLPProfilePredefinedUpdateResponseEntriesTypePredefined DLPProfilePredefinedUpdateResponseEntriesType = "predefined" + DLPProfilePredefinedUpdateResponseEntriesTypeIntegration DLPProfilePredefinedUpdateResponseEntriesType = "integration" + DLPProfilePredefinedUpdateResponseEntriesTypeExactData DLPProfilePredefinedUpdateResponseEntriesType = "exact_data" + DLPProfilePredefinedUpdateResponseEntriesTypeDocumentFingerprint DLPProfilePredefinedUpdateResponseEntriesType = "document_fingerprint" + DLPProfilePredefinedUpdateResponseEntriesTypeWordList DLPProfilePredefinedUpdateResponseEntriesType = "word_list" ) -func (r PredefinedProfileEntriesType) IsKnown() bool { +func (r DLPProfilePredefinedUpdateResponseEntriesType) IsKnown() bool { switch r { - case PredefinedProfileEntriesTypeCustom, PredefinedProfileEntriesTypePredefined, PredefinedProfileEntriesTypeIntegration, PredefinedProfileEntriesTypeExactData, PredefinedProfileEntriesTypeDocumentFingerprint, PredefinedProfileEntriesTypeWordList: + case DLPProfilePredefinedUpdateResponseEntriesTypeCustom, DLPProfilePredefinedUpdateResponseEntriesTypePredefined, DLPProfilePredefinedUpdateResponseEntriesTypeIntegration, DLPProfilePredefinedUpdateResponseEntriesTypeExactData, DLPProfilePredefinedUpdateResponseEntriesTypeDocumentFingerprint, DLPProfilePredefinedUpdateResponseEntriesTypeWordList: return true } return false @@ -658,6 +671,568 @@ func (r PredefinedProfileEntriesType) IsKnown() bool { type DLPProfilePredefinedDeleteResponse = interface{} +type DLPProfilePredefinedGetResponse struct { + // The id of the predefined profile (uuid). + ID string `json:"id,required" format:"uuid"` + AllowedMatchCount int64 `json:"allowed_match_count,required"` + ConfidenceThreshold string `json:"confidence_threshold,required,nullable"` + EnabledEntries []string `json:"enabled_entries,required" format:"uuid"` + // Deprecated: deprecated + Entries []DLPProfilePredefinedGetResponseEntry `json:"entries,required"` + // The name of the predefined profile. + Name string `json:"name,required"` + AIContextEnabled bool `json:"ai_context_enabled"` + OCREnabled bool `json:"ocr_enabled"` + // Whether this profile can be accessed by anyone. + OpenAccess bool `json:"open_access"` + JSON dlpProfilePredefinedGetResponseJSON `json:"-"` +} + +// dlpProfilePredefinedGetResponseJSON contains the JSON metadata for the struct +// [DLPProfilePredefinedGetResponse] +type dlpProfilePredefinedGetResponseJSON struct { + ID apijson.Field + AllowedMatchCount apijson.Field + ConfidenceThreshold apijson.Field + EnabledEntries apijson.Field + Entries apijson.Field + Name apijson.Field + AIContextEnabled apijson.Field + OCREnabled apijson.Field + OpenAccess apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfilePredefinedGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfilePredefinedGetResponseJSON) RawJSON() string { + return r.raw +} + +type DLPProfilePredefinedGetResponseEntry struct { + ID string `json:"id,required" format:"uuid"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedGetResponseEntriesType `json:"type,required"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive"` + // This field can have the runtime type of + // [DLPProfilePredefinedGetResponseEntriesPredefinedEntryConfidence]. + Confidence interface{} `json:"confidence"` + CreatedAt time.Time `json:"created_at" format:"date-time"` + Pattern Pattern `json:"pattern"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariant]. + Variant interface{} `json:"variant"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpProfilePredefinedGetResponseEntryJSON `json:"-"` + union DLPProfilePredefinedGetResponseEntriesUnion +} + +// dlpProfilePredefinedGetResponseEntryJSON contains the JSON metadata for the +// struct [DLPProfilePredefinedGetResponseEntry] +type dlpProfilePredefinedGetResponseEntryJSON struct { + ID apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + CaseSensitive apijson.Field + Confidence apijson.Field + CreatedAt apijson.Field + Pattern apijson.Field + ProfileID apijson.Field + Secret apijson.Field + UpdatedAt apijson.Field + Variant apijson.Field + WordList apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r dlpProfilePredefinedGetResponseEntryJSON) RawJSON() string { + return r.raw +} + +func (r *DLPProfilePredefinedGetResponseEntry) UnmarshalJSON(data []byte) (err error) { + *r = DLPProfilePredefinedGetResponseEntry{} + err = apijson.UnmarshalRoot(data, &r.union) + if err != nil { + return err + } + return apijson.Port(r.union, &r) +} + +// AsUnion returns a [DLPProfilePredefinedGetResponseEntriesUnion] interface which +// you can cast to the specific types for more type safety. +// +// Possible runtime types of the union are +// [DLPProfilePredefinedGetResponseEntriesCustomEntry], +// [DLPProfilePredefinedGetResponseEntriesPredefinedEntry], +// [DLPProfilePredefinedGetResponseEntriesIntegrationEntry], +// [DLPProfilePredefinedGetResponseEntriesExactDataEntry], +// [DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntry], +// [DLPProfilePredefinedGetResponseEntriesWordListEntry]. +func (r DLPProfilePredefinedGetResponseEntry) AsUnion() DLPProfilePredefinedGetResponseEntriesUnion { + return r.union +} + +// Union satisfied by [DLPProfilePredefinedGetResponseEntriesCustomEntry], +// [DLPProfilePredefinedGetResponseEntriesPredefinedEntry], +// [DLPProfilePredefinedGetResponseEntriesIntegrationEntry], +// [DLPProfilePredefinedGetResponseEntriesExactDataEntry], +// [DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntry] or +// [DLPProfilePredefinedGetResponseEntriesWordListEntry]. +type DLPProfilePredefinedGetResponseEntriesUnion interface { + implementsDLPProfilePredefinedGetResponseEntry() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*DLPProfilePredefinedGetResponseEntriesUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfilePredefinedGetResponseEntriesCustomEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfilePredefinedGetResponseEntriesPredefinedEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfilePredefinedGetResponseEntriesIntegrationEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfilePredefinedGetResponseEntriesExactDataEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntry{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPProfilePredefinedGetResponseEntriesWordListEntry{}), + }, + ) +} + +type DLPProfilePredefinedGetResponseEntriesCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPProfilePredefinedGetResponseEntriesCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfilePredefinedGetResponseEntriesCustomEntryJSON `json:"-"` +} + +// dlpProfilePredefinedGetResponseEntriesCustomEntryJSON contains the JSON metadata +// for the struct [DLPProfilePredefinedGetResponseEntriesCustomEntry] +type dlpProfilePredefinedGetResponseEntriesCustomEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Pattern apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfilePredefinedGetResponseEntriesCustomEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfilePredefinedGetResponseEntriesCustomEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfilePredefinedGetResponseEntriesCustomEntry) implementsDLPProfilePredefinedGetResponseEntry() { +} + +type DLPProfilePredefinedGetResponseEntriesCustomEntryType string + +const ( + DLPProfilePredefinedGetResponseEntriesCustomEntryTypeCustom DLPProfilePredefinedGetResponseEntriesCustomEntryType = "custom" +) + +func (r DLPProfilePredefinedGetResponseEntriesCustomEntryType) IsKnown() bool { + switch r { + case DLPProfilePredefinedGetResponseEntriesCustomEntryTypeCustom: + return true + } + return false +} + +type DLPProfilePredefinedGetResponseEntriesPredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPProfilePredefinedGetResponseEntriesPredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedGetResponseEntriesPredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Variant DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariant `json:"variant"` + JSON dlpProfilePredefinedGetResponseEntriesPredefinedEntryJSON `json:"-"` +} + +// dlpProfilePredefinedGetResponseEntriesPredefinedEntryJSON contains the JSON +// metadata for the struct [DLPProfilePredefinedGetResponseEntriesPredefinedEntry] +type dlpProfilePredefinedGetResponseEntriesPredefinedEntryJSON struct { + ID apijson.Field + Confidence apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + ProfileID apijson.Field + Variant apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfilePredefinedGetResponseEntriesPredefinedEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfilePredefinedGetResponseEntriesPredefinedEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfilePredefinedGetResponseEntriesPredefinedEntry) implementsDLPProfilePredefinedGetResponseEntry() { +} + +type DLPProfilePredefinedGetResponseEntriesPredefinedEntryConfidence struct { + // Indicates whether this entry has AI remote service validation. + AIContextAvailable bool `json:"ai_context_available,required"` + // Indicates whether this entry has any form of validation that is not an AI remote + // service. + Available bool `json:"available,required"` + JSON dlpProfilePredefinedGetResponseEntriesPredefinedEntryConfidenceJSON `json:"-"` +} + +// dlpProfilePredefinedGetResponseEntriesPredefinedEntryConfidenceJSON contains the +// JSON metadata for the struct +// [DLPProfilePredefinedGetResponseEntriesPredefinedEntryConfidence] +type dlpProfilePredefinedGetResponseEntriesPredefinedEntryConfidenceJSON struct { + AIContextAvailable apijson.Field + Available apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfilePredefinedGetResponseEntriesPredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfilePredefinedGetResponseEntriesPredefinedEntryConfidenceJSON) RawJSON() string { + return r.raw +} + +type DLPProfilePredefinedGetResponseEntriesPredefinedEntryType string + +const ( + DLPProfilePredefinedGetResponseEntriesPredefinedEntryTypePredefined DLPProfilePredefinedGetResponseEntriesPredefinedEntryType = "predefined" +) + +func (r DLPProfilePredefinedGetResponseEntriesPredefinedEntryType) IsKnown() bool { + switch r { + case DLPProfilePredefinedGetResponseEntriesPredefinedEntryTypePredefined: + return true + } + return false +} + +type DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariant struct { + TopicType DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpProfilePredefinedGetResponseEntriesPredefinedEntryVariantJSON `json:"-"` +} + +// dlpProfilePredefinedGetResponseEntriesPredefinedEntryVariantJSON contains the +// JSON metadata for the struct +// [DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariant] +type dlpProfilePredefinedGetResponseEntriesPredefinedEntryVariantJSON struct { + TopicType apijson.Field + Type apijson.Field + Description apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfilePredefinedGetResponseEntriesPredefinedEntryVariantJSON) RawJSON() string { + return r.raw +} + +type DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTopicType string + +const ( + DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTopicTypeIntent DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTopicType = "Intent" + DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTopicTypeContent DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTopicType = "Content" +) + +func (r DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTopicType) IsKnown() bool { + switch r { + case DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTopicTypeIntent, DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTopicTypeContent: + return true + } + return false +} + +type DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantType string + +const ( + DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTypePromptTopic DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantType = "PromptTopic" +) + +func (r DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantType) IsKnown() bool { + switch r { + case DLPProfilePredefinedGetResponseEntriesPredefinedEntryVariantTypePromptTopic: + return true + } + return false +} + +type DLPProfilePredefinedGetResponseEntriesIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedGetResponseEntriesIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfilePredefinedGetResponseEntriesIntegrationEntryJSON `json:"-"` +} + +// dlpProfilePredefinedGetResponseEntriesIntegrationEntryJSON contains the JSON +// metadata for the struct [DLPProfilePredefinedGetResponseEntriesIntegrationEntry] +type dlpProfilePredefinedGetResponseEntriesIntegrationEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfilePredefinedGetResponseEntriesIntegrationEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfilePredefinedGetResponseEntriesIntegrationEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfilePredefinedGetResponseEntriesIntegrationEntry) implementsDLPProfilePredefinedGetResponseEntry() { +} + +type DLPProfilePredefinedGetResponseEntriesIntegrationEntryType string + +const ( + DLPProfilePredefinedGetResponseEntriesIntegrationEntryTypeIntegration DLPProfilePredefinedGetResponseEntriesIntegrationEntryType = "integration" +) + +func (r DLPProfilePredefinedGetResponseEntriesIntegrationEntryType) IsKnown() bool { + switch r { + case DLPProfilePredefinedGetResponseEntriesIntegrationEntryTypeIntegration: + return true + } + return false +} + +type DLPProfilePredefinedGetResponseEntriesExactDataEntry struct { + ID string `json:"id,required" format:"uuid"` + // Only applies to custom word lists. Determines if the words should be matched in + // a case-sensitive manner Cannot be set to false if secret is true + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPProfilePredefinedGetResponseEntriesExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfilePredefinedGetResponseEntriesExactDataEntryJSON `json:"-"` +} + +// dlpProfilePredefinedGetResponseEntriesExactDataEntryJSON contains the JSON +// metadata for the struct [DLPProfilePredefinedGetResponseEntriesExactDataEntry] +type dlpProfilePredefinedGetResponseEntriesExactDataEntryJSON struct { + ID apijson.Field + CaseSensitive apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Secret apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfilePredefinedGetResponseEntriesExactDataEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfilePredefinedGetResponseEntriesExactDataEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfilePredefinedGetResponseEntriesExactDataEntry) implementsDLPProfilePredefinedGetResponseEntry() { +} + +type DLPProfilePredefinedGetResponseEntriesExactDataEntryType string + +const ( + DLPProfilePredefinedGetResponseEntriesExactDataEntryTypeExactData DLPProfilePredefinedGetResponseEntriesExactDataEntryType = "exact_data" +) + +func (r DLPProfilePredefinedGetResponseEntriesExactDataEntryType) IsKnown() bool { + switch r { + case DLPProfilePredefinedGetResponseEntriesExactDataEntryTypeExactData: + return true + } + return false +} + +type DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + JSON dlpProfilePredefinedGetResponseEntriesDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpProfilePredefinedGetResponseEntriesDocumentFingerprintEntryJSON contains the +// JSON metadata for the struct +// [DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntry] +type dlpProfilePredefinedGetResponseEntriesDocumentFingerprintEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfilePredefinedGetResponseEntriesDocumentFingerprintEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntry) implementsDLPProfilePredefinedGetResponseEntry() { +} + +type DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntryType string + +const ( + DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntryTypeDocumentFingerprint DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntryType = "document_fingerprint" +) + +func (r DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntryType) IsKnown() bool { + switch r { + case DLPProfilePredefinedGetResponseEntriesDocumentFingerprintEntryTypeDocumentFingerprint: + return true + } + return false +} + +type DLPProfilePredefinedGetResponseEntriesWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPProfilePredefinedGetResponseEntriesWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + JSON dlpProfilePredefinedGetResponseEntriesWordListEntryJSON `json:"-"` +} + +// dlpProfilePredefinedGetResponseEntriesWordListEntryJSON contains the JSON +// metadata for the struct [DLPProfilePredefinedGetResponseEntriesWordListEntry] +type dlpProfilePredefinedGetResponseEntriesWordListEntryJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Enabled apijson.Field + Name apijson.Field + Type apijson.Field + UpdatedAt apijson.Field + WordList apijson.Field + ProfileID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPProfilePredefinedGetResponseEntriesWordListEntry) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpProfilePredefinedGetResponseEntriesWordListEntryJSON) RawJSON() string { + return r.raw +} + +func (r DLPProfilePredefinedGetResponseEntriesWordListEntry) implementsDLPProfilePredefinedGetResponseEntry() { +} + +type DLPProfilePredefinedGetResponseEntriesWordListEntryType string + +const ( + DLPProfilePredefinedGetResponseEntriesWordListEntryTypeWordList DLPProfilePredefinedGetResponseEntriesWordListEntryType = "word_list" +) + +func (r DLPProfilePredefinedGetResponseEntriesWordListEntryType) IsKnown() bool { + switch r { + case DLPProfilePredefinedGetResponseEntriesWordListEntryTypeWordList: + return true + } + return false +} + +type DLPProfilePredefinedGetResponseEntriesType string + +const ( + DLPProfilePredefinedGetResponseEntriesTypeCustom DLPProfilePredefinedGetResponseEntriesType = "custom" + DLPProfilePredefinedGetResponseEntriesTypePredefined DLPProfilePredefinedGetResponseEntriesType = "predefined" + DLPProfilePredefinedGetResponseEntriesTypeIntegration DLPProfilePredefinedGetResponseEntriesType = "integration" + DLPProfilePredefinedGetResponseEntriesTypeExactData DLPProfilePredefinedGetResponseEntriesType = "exact_data" + DLPProfilePredefinedGetResponseEntriesTypeDocumentFingerprint DLPProfilePredefinedGetResponseEntriesType = "document_fingerprint" + DLPProfilePredefinedGetResponseEntriesTypeWordList DLPProfilePredefinedGetResponseEntriesType = "word_list" +) + +func (r DLPProfilePredefinedGetResponseEntriesType) IsKnown() bool { + switch r { + case DLPProfilePredefinedGetResponseEntriesTypeCustom, DLPProfilePredefinedGetResponseEntriesTypePredefined, DLPProfilePredefinedGetResponseEntriesTypeIntegration, DLPProfilePredefinedGetResponseEntriesTypeExactData, DLPProfilePredefinedGetResponseEntriesTypeDocumentFingerprint, DLPProfilePredefinedGetResponseEntriesTypeWordList: + return true + } + return false +} + type DLPProfilePredefinedUpdateParams struct { AccountID param.Field[string] `path:"account_id,required"` AIContextEnabled param.Field[bool] `json:"ai_context_enabled"` @@ -686,7 +1261,7 @@ type DLPProfilePredefinedUpdateResponseEnvelope struct { Messages []DLPProfilePredefinedUpdateResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPProfilePredefinedUpdateResponseEnvelopeSuccess `json:"success,required"` - Result PredefinedProfile `json:"result"` + Result DLPProfilePredefinedUpdateResponse `json:"result"` JSON dlpProfilePredefinedUpdateResponseEnvelopeJSON `json:"-"` } @@ -974,7 +1549,7 @@ type DLPProfilePredefinedGetResponseEnvelope struct { Messages []DLPProfilePredefinedGetResponseEnvelopeMessages `json:"messages,required"` // Whether the API call was successful. Success DLPProfilePredefinedGetResponseEnvelopeSuccess `json:"success,required"` - Result PredefinedProfile `json:"result"` + Result DLPProfilePredefinedGetResponse `json:"result"` JSON dlpProfilePredefinedGetResponseEnvelopeJSON `json:"-"` } From 045bbc8627312415933485a424a57e33b009d7e3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 16:00:31 +0000 Subject: [PATCH 06/10] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a16977bbb0f..2426d5ccea2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1883 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e425e4abe3f3161feed50a8cd861dd25c6ec32ee162b4eb4d225c4e5cb7b3ca9.yml openapi_spec_hash: 955676955a801dbe5084d8ffe2730791 -config_hash: e4fdda880afe9a26b032ec5128e42dc2 +config_hash: e5f14d696339c225c2501e82e164e640 From 245d301a5d394d8d60bb3787346d9ece899e7dbd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 21:57:33 +0000 Subject: [PATCH 07/10] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2426d5ccea2..7e91b9cd3e8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1883 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e425e4abe3f3161feed50a8cd861dd25c6ec32ee162b4eb4d225c4e5cb7b3ca9.yml openapi_spec_hash: 955676955a801dbe5084d8ffe2730791 -config_hash: e5f14d696339c225c2501e82e164e640 +config_hash: 11d91f2aa4a7f5ff6a0d863f572946ad From d1b1eab741593d97221a099b07e120cc205999dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:45:13 +0000 Subject: [PATCH 08/10] feat: feat(r2_data_catalog): Configure SDKs/Terraform to use R2 Data Catalog routes * feat(r2_data_catalog): Configure SDKs/Terraform to use R2 Data Catalog routes --- .stats.yml | 8 +- api.md | 227 ++++ client.go | 3 + email_security/investigate.go | 864 ++++++++++++ email_security/investigate_test.go | 87 ++ email_security/investigatedetection.go | 357 +++++ email_security/investigatedetection_test.go | 44 + email_security/investigatemove.go | 192 +++ email_security/investigatemove_test.go | 72 + email_security/investigatepreview.go | 163 +++ email_security/investigatepreview_test.go | 70 + email_security/investigateraw.go | 85 ++ email_security/investigateraw_test.go | 44 + email_security/investigatereclassify.go | 92 ++ email_security/investigatereclassify_test.go | 47 + email_security/investigaterelease.go | 76 ++ email_security/investigaterelease_test.go | 41 + email_security/investigatetrace.go | 183 +++ email_security/investigatetrace_test.go | 44 + email_security/settingallowpolicy.go | 718 ++++++++++ email_security/settingallowpolicy_test.go | 185 +++ email_security/settingblocksender.go | 590 +++++++++ email_security/settingblocksender_test.go | 167 +++ email_security/settingdomain.go | 1156 +++++++++++++++++ email_security/settingdomain_test.go | 172 +++ .../settingimpersonationregistry.go | 517 ++++++++ .../settingimpersonationregistry_test.go | 164 +++ email_security/settingtrusteddomain.go | 615 +++++++++ email_security/settingtrusteddomain_test.go | 173 +++ email_security/submission.go | 250 ++++ email_security/submission_test.go | 52 + r2_data_catalog/aliases.go | 467 +++++++ r2_data_catalog/credential.go | 150 +++ r2_data_catalog/credential_test.go | 45 + r2_data_catalog/maintenanceconfig.go | 512 ++++++++ r2_data_catalog/maintenanceconfig_test.go | 77 ++ r2_data_catalog/namespace.go | 239 ++++ r2_data_catalog/namespace_test.go | 49 + r2_data_catalog/namespacetable.go | 300 +++++ r2_data_catalog/namespacetable_test.go | 49 + .../namespacetablemaintenanceconfig.go | 515 ++++++++ .../namespacetablemaintenanceconfig_test.go | 81 ++ r2_data_catalog/r2datacatalog.go | 742 +++++++++++ r2_data_catalog/r2datacatalog_test.go | 127 ++ scripts/detect-breaking-changes | 20 + 45 files changed, 10827 insertions(+), 4 deletions(-) create mode 100644 email_security/investigate_test.go create mode 100644 email_security/investigatedetection_test.go create mode 100644 email_security/investigatemove_test.go create mode 100644 email_security/investigatepreview_test.go create mode 100644 email_security/investigateraw_test.go create mode 100644 email_security/investigatereclassify_test.go create mode 100644 email_security/investigaterelease_test.go create mode 100644 email_security/investigatetrace_test.go create mode 100644 email_security/settingallowpolicy_test.go create mode 100644 email_security/settingblocksender_test.go create mode 100644 email_security/settingdomain_test.go create mode 100644 email_security/settingimpersonationregistry_test.go create mode 100644 email_security/settingtrusteddomain_test.go create mode 100644 email_security/submission_test.go create mode 100644 r2_data_catalog/aliases.go create mode 100644 r2_data_catalog/credential.go create mode 100644 r2_data_catalog/credential_test.go create mode 100644 r2_data_catalog/maintenanceconfig.go create mode 100644 r2_data_catalog/maintenanceconfig_test.go create mode 100644 r2_data_catalog/namespace.go create mode 100644 r2_data_catalog/namespace_test.go create mode 100644 r2_data_catalog/namespacetable.go create mode 100644 r2_data_catalog/namespacetable_test.go create mode 100644 r2_data_catalog/namespacetablemaintenanceconfig.go create mode 100644 r2_data_catalog/namespacetablemaintenanceconfig_test.go create mode 100644 r2_data_catalog/r2datacatalog.go create mode 100644 r2_data_catalog/r2datacatalog_test.go diff --git a/.stats.yml b/.stats.yml index 7e91b9cd3e8..d5f31810161 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1883 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e425e4abe3f3161feed50a8cd861dd25c6ec32ee162b4eb4d225c4e5cb7b3ca9.yml -openapi_spec_hash: 955676955a801dbe5084d8ffe2730791 -config_hash: 11d91f2aa4a7f5ff6a0d863f572946ad +configured_endpoints: 1931 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d01829c5ff74f82c372d7c132f3c9adcef9a7ac392e1dc7ff431f3397c94b6fb.yml +openapi_spec_hash: 36f226c48f0fda588903ef75a766ccb1 +config_hash: bfa05f973c1b1797df33a05f942d5fac diff --git a/api.md b/api.md index beabc5cc836..c0f74288256 100644 --- a/api.md +++ b/api.md @@ -1351,34 +1351,192 @@ Methods: ## Investigate +Response Types: + +- email_security.InvestigateListResponse +- email_security.InvestigateGetResponse + +Methods: + +- client.EmailSecurity.Investigate.List(ctx context.Context, params email_security.InvestigateListParams) (pagination.V4PagePaginationArray[email_security.InvestigateListResponse], error) +- client.EmailSecurity.Investigate.Get(ctx context.Context, postfixID string, query email_security.InvestigateGetParams) (email_security.InvestigateGetResponse, error) + ### Detections +Response Types: + +- email_security.InvestigateDetectionGetResponse + +Methods: + +- client.EmailSecurity.Investigate.Detections.Get(ctx context.Context, postfixID string, query email_security.InvestigateDetectionGetParams) (email_security.InvestigateDetectionGetResponse, error) + ### Preview +Response Types: + +- email_security.InvestigatePreviewNewResponse +- email_security.InvestigatePreviewGetResponse + +Methods: + +- client.EmailSecurity.Investigate.Preview.New(ctx context.Context, params email_security.InvestigatePreviewNewParams) (email_security.InvestigatePreviewNewResponse, error) +- client.EmailSecurity.Investigate.Preview.Get(ctx context.Context, postfixID string, query email_security.InvestigatePreviewGetParams) (email_security.InvestigatePreviewGetResponse, error) + ### Raw +Response Types: + +- email_security.InvestigateRawGetResponse + +Methods: + +- client.EmailSecurity.Investigate.Raw.Get(ctx context.Context, postfixID string, query email_security.InvestigateRawGetParams) (email_security.InvestigateRawGetResponse, error) + ### Trace +Response Types: + +- email_security.InvestigateTraceGetResponse + +Methods: + +- client.EmailSecurity.Investigate.Trace.Get(ctx context.Context, postfixID string, query email_security.InvestigateTraceGetParams) (email_security.InvestigateTraceGetResponse, error) + ### Move +Response Types: + +- email_security.InvestigateMoveNewResponse +- email_security.InvestigateMoveBulkResponse + +Methods: + +- client.EmailSecurity.Investigate.Move.New(ctx context.Context, postfixID string, params email_security.InvestigateMoveNewParams) (pagination.SinglePage[email_security.InvestigateMoveNewResponse], error) +- client.EmailSecurity.Investigate.Move.Bulk(ctx context.Context, params email_security.InvestigateMoveBulkParams) (pagination.SinglePage[email_security.InvestigateMoveBulkResponse], error) + ### Reclassify +Response Types: + +- email_security.InvestigateReclassifyNewResponse + +Methods: + +- client.EmailSecurity.Investigate.Reclassify.New(ctx context.Context, postfixID string, params email_security.InvestigateReclassifyNewParams) (email_security.InvestigateReclassifyNewResponse, error) + ### Release +Response Types: + +- email_security.InvestigateReleaseBulkResponse + +Methods: + +- client.EmailSecurity.Investigate.Release.Bulk(ctx context.Context, params email_security.InvestigateReleaseBulkParams) (pagination.SinglePage[email_security.InvestigateReleaseBulkResponse], error) + ## Settings ### AllowPolicies +Response Types: + +- email_security.SettingAllowPolicyNewResponse +- email_security.SettingAllowPolicyListResponse +- email_security.SettingAllowPolicyDeleteResponse +- email_security.SettingAllowPolicyEditResponse +- email_security.SettingAllowPolicyGetResponse + +Methods: + +- client.EmailSecurity.Settings.AllowPolicies.New(ctx context.Context, params email_security.SettingAllowPolicyNewParams) (email_security.SettingAllowPolicyNewResponse, error) +- client.EmailSecurity.Settings.AllowPolicies.List(ctx context.Context, params email_security.SettingAllowPolicyListParams) (pagination.V4PagePaginationArray[email_security.SettingAllowPolicyListResponse], error) +- client.EmailSecurity.Settings.AllowPolicies.Delete(ctx context.Context, policyID int64, body email_security.SettingAllowPolicyDeleteParams) (email_security.SettingAllowPolicyDeleteResponse, error) +- client.EmailSecurity.Settings.AllowPolicies.Edit(ctx context.Context, policyID int64, params email_security.SettingAllowPolicyEditParams) (email_security.SettingAllowPolicyEditResponse, error) +- client.EmailSecurity.Settings.AllowPolicies.Get(ctx context.Context, policyID int64, query email_security.SettingAllowPolicyGetParams) (email_security.SettingAllowPolicyGetResponse, error) + ### BlockSenders +Response Types: + +- email_security.SettingBlockSenderNewResponse +- email_security.SettingBlockSenderListResponse +- email_security.SettingBlockSenderDeleteResponse +- email_security.SettingBlockSenderEditResponse +- email_security.SettingBlockSenderGetResponse + +Methods: + +- client.EmailSecurity.Settings.BlockSenders.New(ctx context.Context, params email_security.SettingBlockSenderNewParams) (email_security.SettingBlockSenderNewResponse, error) +- client.EmailSecurity.Settings.BlockSenders.List(ctx context.Context, params email_security.SettingBlockSenderListParams) (pagination.V4PagePaginationArray[email_security.SettingBlockSenderListResponse], error) +- client.EmailSecurity.Settings.BlockSenders.Delete(ctx context.Context, patternID int64, body email_security.SettingBlockSenderDeleteParams) (email_security.SettingBlockSenderDeleteResponse, error) +- client.EmailSecurity.Settings.BlockSenders.Edit(ctx context.Context, patternID int64, params email_security.SettingBlockSenderEditParams) (email_security.SettingBlockSenderEditResponse, error) +- client.EmailSecurity.Settings.BlockSenders.Get(ctx context.Context, patternID int64, query email_security.SettingBlockSenderGetParams) (email_security.SettingBlockSenderGetResponse, error) + ### Domains +Response Types: + +- email_security.SettingDomainListResponse +- email_security.SettingDomainDeleteResponse +- email_security.SettingDomainBulkDeleteResponse +- email_security.SettingDomainEditResponse +- email_security.SettingDomainGetResponse + +Methods: + +- client.EmailSecurity.Settings.Domains.List(ctx context.Context, params email_security.SettingDomainListParams) (pagination.V4PagePaginationArray[email_security.SettingDomainListResponse], error) +- client.EmailSecurity.Settings.Domains.Delete(ctx context.Context, domainID int64, body email_security.SettingDomainDeleteParams) (email_security.SettingDomainDeleteResponse, error) +- client.EmailSecurity.Settings.Domains.BulkDelete(ctx context.Context, body email_security.SettingDomainBulkDeleteParams) (pagination.SinglePage[email_security.SettingDomainBulkDeleteResponse], error) +- client.EmailSecurity.Settings.Domains.Edit(ctx context.Context, domainID int64, params email_security.SettingDomainEditParams) (email_security.SettingDomainEditResponse, error) +- client.EmailSecurity.Settings.Domains.Get(ctx context.Context, domainID int64, query email_security.SettingDomainGetParams) (email_security.SettingDomainGetResponse, error) + ### ImpersonationRegistry +Response Types: + +- email_security.SettingImpersonationRegistryNewResponse +- email_security.SettingImpersonationRegistryListResponse +- email_security.SettingImpersonationRegistryDeleteResponse +- email_security.SettingImpersonationRegistryEditResponse +- email_security.SettingImpersonationRegistryGetResponse + +Methods: + +- client.EmailSecurity.Settings.ImpersonationRegistry.New(ctx context.Context, params email_security.SettingImpersonationRegistryNewParams) (email_security.SettingImpersonationRegistryNewResponse, error) +- client.EmailSecurity.Settings.ImpersonationRegistry.List(ctx context.Context, params email_security.SettingImpersonationRegistryListParams) (pagination.V4PagePaginationArray[email_security.SettingImpersonationRegistryListResponse], error) +- client.EmailSecurity.Settings.ImpersonationRegistry.Delete(ctx context.Context, displayNameID int64, body email_security.SettingImpersonationRegistryDeleteParams) (email_security.SettingImpersonationRegistryDeleteResponse, error) +- client.EmailSecurity.Settings.ImpersonationRegistry.Edit(ctx context.Context, displayNameID int64, params email_security.SettingImpersonationRegistryEditParams) (email_security.SettingImpersonationRegistryEditResponse, error) +- client.EmailSecurity.Settings.ImpersonationRegistry.Get(ctx context.Context, displayNameID int64, query email_security.SettingImpersonationRegistryGetParams) (email_security.SettingImpersonationRegistryGetResponse, error) + ### TrustedDomains +Response Types: + +- email_security.SettingTrustedDomainNewResponseUnion +- email_security.SettingTrustedDomainListResponse +- email_security.SettingTrustedDomainDeleteResponse +- email_security.SettingTrustedDomainEditResponse +- email_security.SettingTrustedDomainGetResponse + +Methods: + +- client.EmailSecurity.Settings.TrustedDomains.New(ctx context.Context, params email_security.SettingTrustedDomainNewParams) (email_security.SettingTrustedDomainNewResponseUnion, error) +- client.EmailSecurity.Settings.TrustedDomains.List(ctx context.Context, params email_security.SettingTrustedDomainListParams) (pagination.V4PagePaginationArray[email_security.SettingTrustedDomainListResponse], error) +- client.EmailSecurity.Settings.TrustedDomains.Delete(ctx context.Context, trustedDomainID int64, body email_security.SettingTrustedDomainDeleteParams) (email_security.SettingTrustedDomainDeleteResponse, error) +- client.EmailSecurity.Settings.TrustedDomains.Edit(ctx context.Context, trustedDomainID int64, params email_security.SettingTrustedDomainEditParams) (email_security.SettingTrustedDomainEditResponse, error) +- client.EmailSecurity.Settings.TrustedDomains.Get(ctx context.Context, trustedDomainID int64, query email_security.SettingTrustedDomainGetParams) (email_security.SettingTrustedDomainGetResponse, error) + ## Submissions +Response Types: + +- email_security.SubmissionListResponse + +Methods: + +- client.EmailSecurity.Submissions.List(ctx context.Context, params email_security.SubmissionListParams) (pagination.V4PagePaginationArray[email_security.SubmissionListResponse], error) + # EmailRouting Response Types: @@ -4760,6 +4918,75 @@ Methods: - client.R2.SuperSlurper.ConnectivityPrecheck.Source(ctx context.Context, params r2.SuperSlurperConnectivityPrecheckSourceParams) (r2.SuperSlurperConnectivityPrecheckSourceResponse, error) - client.R2.SuperSlurper.ConnectivityPrecheck.Target(ctx context.Context, params r2.SuperSlurperConnectivityPrecheckTargetParams) (r2.SuperSlurperConnectivityPrecheckTargetResponse, error) +# R2DataCatalog + +Response Types: + +- r2_data_catalog.R2DataCatalogListResponse +- r2_data_catalog.R2DataCatalogEnableResponse +- r2_data_catalog.R2DataCatalogGetResponse + +Methods: + +- client.R2DataCatalog.List(ctx context.Context, query r2_data_catalog.R2DataCatalogListParams) (r2_data_catalog.R2DataCatalogListResponse, error) +- client.R2DataCatalog.Disable(ctx context.Context, bucketName string, body r2_data_catalog.R2DataCatalogDisableParams) error +- client.R2DataCatalog.Enable(ctx context.Context, bucketName string, body r2_data_catalog.R2DataCatalogEnableParams) (r2_data_catalog.R2DataCatalogEnableResponse, error) +- client.R2DataCatalog.Get(ctx context.Context, bucketName string, query r2_data_catalog.R2DataCatalogGetParams) (r2_data_catalog.R2DataCatalogGetResponse, error) + +## MaintenanceConfigs + +Response Types: + +- r2_data_catalog.MaintenanceConfigUpdateResponse +- r2_data_catalog.MaintenanceConfigGetResponse + +Methods: + +- client.R2DataCatalog.MaintenanceConfigs.Update(ctx context.Context, bucketName string, params r2_data_catalog.MaintenanceConfigUpdateParams) (r2_data_catalog.MaintenanceConfigUpdateResponse, error) +- client.R2DataCatalog.MaintenanceConfigs.Get(ctx context.Context, bucketName string, query r2_data_catalog.MaintenanceConfigGetParams) (r2_data_catalog.MaintenanceConfigGetResponse, error) + +## Credentials + +Response Types: + +- r2_data_catalog.CredentialNewResponse + +Methods: + +- client.R2DataCatalog.Credentials.New(ctx context.Context, bucketName string, params r2_data_catalog.CredentialNewParams) (r2_data_catalog.CredentialNewResponse, error) + +## Namespaces + +Response Types: + +- r2_data_catalog.NamespaceListResponse + +Methods: + +- client.R2DataCatalog.Namespaces.List(ctx context.Context, bucketName string, params r2_data_catalog.NamespaceListParams) (r2_data_catalog.NamespaceListResponse, error) + +### Tables + +Response Types: + +- r2_data_catalog.NamespaceTableListResponse + +Methods: + +- client.R2DataCatalog.Namespaces.Tables.List(ctx context.Context, bucketName string, namespace string, params r2_data_catalog.NamespaceTableListParams) (r2_data_catalog.NamespaceTableListResponse, error) + +#### MaintenanceConfigs + +Response Types: + +- r2_data_catalog.NamespaceTableMaintenanceConfigUpdateResponse +- r2_data_catalog.NamespaceTableMaintenanceConfigGetResponse + +Methods: + +- client.R2DataCatalog.Namespaces.Tables.MaintenanceConfigs.Update(ctx context.Context, bucketName string, namespace string, tableName string, params r2_data_catalog.NamespaceTableMaintenanceConfigUpdateParams) (r2_data_catalog.NamespaceTableMaintenanceConfigUpdateResponse, error) +- client.R2DataCatalog.Namespaces.Tables.MaintenanceConfigs.Get(ctx context.Context, bucketName string, namespace string, tableName string, query r2_data_catalog.NamespaceTableMaintenanceConfigGetParams) (r2_data_catalog.NamespaceTableMaintenanceConfigGetResponse, error) + # WorkersForPlatforms ## Dispatch diff --git a/client.go b/client.go index d1c627ab28c..96266b899e1 100644 --- a/client.go +++ b/client.go @@ -77,6 +77,7 @@ import ( "github.com/cloudflare/cloudflare-go/v6/pipelines" "github.com/cloudflare/cloudflare-go/v6/queues" "github.com/cloudflare/cloudflare-go/v6/r2" + "github.com/cloudflare/cloudflare-go/v6/r2_data_catalog" "github.com/cloudflare/cloudflare-go/v6/radar" "github.com/cloudflare/cloudflare-go/v6/rate_limits" "github.com/cloudflare/cloudflare-go/v6/realtime_kit" @@ -186,6 +187,7 @@ type Client struct { Alerting *alerting.AlertingService D1 *d1.D1Service R2 *r2.R2Service + R2DataCatalog *r2_data_catalog.R2DataCatalogService WorkersForPlatforms *workers_for_platforms.WorkersForPlatformService ZeroTrust *zero_trust.ZeroTrustService Turnstile *turnstile.TurnstileService @@ -320,6 +322,7 @@ func NewClient(opts ...option.RequestOption) (r *Client) { r.Alerting = alerting.NewAlertingService(opts...) r.D1 = d1.NewD1Service(opts...) r.R2 = r2.NewR2Service(opts...) + r.R2DataCatalog = r2_data_catalog.NewR2DataCatalogService(opts...) r.WorkersForPlatforms = workers_for_platforms.NewWorkersForPlatformService(opts...) r.ZeroTrust = zero_trust.NewZeroTrustService(opts...) r.Turnstile = turnstile.NewTurnstileService(opts...) diff --git a/email_security/investigate.go b/email_security/investigate.go index b9ff03dcf53..2392851f567 100644 --- a/email_security/investigate.go +++ b/email_security/investigate.go @@ -3,7 +3,21 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateService contains methods and other services that help with @@ -38,3 +52,853 @@ func NewInvestigateService(opts ...option.RequestOption) (r *InvestigateService) r.Release = NewInvestigateReleaseService(opts...) return } + +// Returns information for each email that matches the search parameter(s). +func (r *InvestigateService) List(ctx context.Context, params InvestigateListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[InvestigateListResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Returns information for each email that matches the search parameter(s). +func (r *InvestigateService) ListAutoPaging(ctx context.Context, params InvestigateListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[InvestigateListResponse] { + return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) +} + +// Get message details +func (r *InvestigateService) Get(ctx context.Context, postfixID string, query InvestigateGetParams, opts ...option.RequestOption) (res *InvestigateGetResponse, err error) { + var env InvestigateGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if postfixID == "" { + err = errors.New("missing required postfix_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/%s", query.AccountID, postfixID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type InvestigateListResponse struct { + ID string `json:"id,required"` + ActionLog interface{} `json:"action_log,required"` + ClientRecipients []string `json:"client_recipients,required"` + DetectionReasons []string `json:"detection_reasons,required"` + IsPhishSubmission bool `json:"is_phish_submission,required"` + IsQuarantined bool `json:"is_quarantined,required"` + // The identifier of the message. + PostfixID string `json:"postfix_id,required"` + Properties InvestigateListResponseProperties `json:"properties,required"` + Ts string `json:"ts,required"` + AlertID string `json:"alert_id,nullable"` + DeliveryMode InvestigateListResponseDeliveryMode `json:"delivery_mode,nullable"` + EdfHash string `json:"edf_hash,nullable"` + EnvelopeFrom string `json:"envelope_from,nullable"` + EnvelopeTo []string `json:"envelope_to,nullable"` + FinalDisposition InvestigateListResponseFinalDisposition `json:"final_disposition,nullable"` + Findings []InvestigateListResponseFinding `json:"findings,nullable"` + From string `json:"from,nullable"` + FromName string `json:"from_name,nullable"` + HtmltextStructureHash string `json:"htmltext_structure_hash,nullable"` + MessageID string `json:"message_id,nullable"` + PostfixIDOutbound string `json:"postfix_id_outbound,nullable"` + Replyto string `json:"replyto,nullable"` + SentDate string `json:"sent_date,nullable"` + Subject string `json:"subject,nullable"` + ThreatCategories []string `json:"threat_categories,nullable"` + To []string `json:"to,nullable"` + ToName []string `json:"to_name,nullable"` + Validation InvestigateListResponseValidation `json:"validation,nullable"` + JSON investigateListResponseJSON `json:"-"` +} + +// investigateListResponseJSON contains the JSON metadata for the struct +// [InvestigateListResponse] +type investigateListResponseJSON struct { + ID apijson.Field + ActionLog apijson.Field + ClientRecipients apijson.Field + DetectionReasons apijson.Field + IsPhishSubmission apijson.Field + IsQuarantined apijson.Field + PostfixID apijson.Field + Properties apijson.Field + Ts apijson.Field + AlertID apijson.Field + DeliveryMode apijson.Field + EdfHash apijson.Field + EnvelopeFrom apijson.Field + EnvelopeTo apijson.Field + FinalDisposition apijson.Field + Findings apijson.Field + From apijson.Field + FromName apijson.Field + HtmltextStructureHash apijson.Field + MessageID apijson.Field + PostfixIDOutbound apijson.Field + Replyto apijson.Field + SentDate apijson.Field + Subject apijson.Field + ThreatCategories apijson.Field + To apijson.Field + ToName apijson.Field + Validation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateListResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigateListResponseProperties struct { + AllowlistedPattern string `json:"allowlisted_pattern"` + AllowlistedPatternType InvestigateListResponsePropertiesAllowlistedPatternType `json:"allowlisted_pattern_type"` + BlocklistedMessage bool `json:"blocklisted_message"` + BlocklistedPattern string `json:"blocklisted_pattern"` + WhitelistedPatternType InvestigateListResponsePropertiesWhitelistedPatternType `json:"whitelisted_pattern_type"` + JSON investigateListResponsePropertiesJSON `json:"-"` +} + +// investigateListResponsePropertiesJSON contains the JSON metadata for the struct +// [InvestigateListResponseProperties] +type investigateListResponsePropertiesJSON struct { + AllowlistedPattern apijson.Field + AllowlistedPatternType apijson.Field + BlocklistedMessage apijson.Field + BlocklistedPattern apijson.Field + WhitelistedPatternType apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateListResponseProperties) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateListResponsePropertiesJSON) RawJSON() string { + return r.raw +} + +type InvestigateListResponsePropertiesAllowlistedPatternType string + +const ( + InvestigateListResponsePropertiesAllowlistedPatternTypeQuarantineRelease InvestigateListResponsePropertiesAllowlistedPatternType = "quarantine_release" + InvestigateListResponsePropertiesAllowlistedPatternTypeAcceptableSender InvestigateListResponsePropertiesAllowlistedPatternType = "acceptable_sender" + InvestigateListResponsePropertiesAllowlistedPatternTypeAllowedSender InvestigateListResponsePropertiesAllowlistedPatternType = "allowed_sender" + InvestigateListResponsePropertiesAllowlistedPatternTypeAllowedRecipient InvestigateListResponsePropertiesAllowlistedPatternType = "allowed_recipient" + InvestigateListResponsePropertiesAllowlistedPatternTypeDomainSimilarity InvestigateListResponsePropertiesAllowlistedPatternType = "domain_similarity" + InvestigateListResponsePropertiesAllowlistedPatternTypeDomainRecency InvestigateListResponsePropertiesAllowlistedPatternType = "domain_recency" + InvestigateListResponsePropertiesAllowlistedPatternTypeManagedAcceptableSender InvestigateListResponsePropertiesAllowlistedPatternType = "managed_acceptable_sender" + InvestigateListResponsePropertiesAllowlistedPatternTypeOutboundNdr InvestigateListResponsePropertiesAllowlistedPatternType = "outbound_ndr" +) + +func (r InvestigateListResponsePropertiesAllowlistedPatternType) IsKnown() bool { + switch r { + case InvestigateListResponsePropertiesAllowlistedPatternTypeQuarantineRelease, InvestigateListResponsePropertiesAllowlistedPatternTypeAcceptableSender, InvestigateListResponsePropertiesAllowlistedPatternTypeAllowedSender, InvestigateListResponsePropertiesAllowlistedPatternTypeAllowedRecipient, InvestigateListResponsePropertiesAllowlistedPatternTypeDomainSimilarity, InvestigateListResponsePropertiesAllowlistedPatternTypeDomainRecency, InvestigateListResponsePropertiesAllowlistedPatternTypeManagedAcceptableSender, InvestigateListResponsePropertiesAllowlistedPatternTypeOutboundNdr: + return true + } + return false +} + +type InvestigateListResponsePropertiesWhitelistedPatternType string + +const ( + InvestigateListResponsePropertiesWhitelistedPatternTypeQuarantineRelease InvestigateListResponsePropertiesWhitelistedPatternType = "quarantine_release" + InvestigateListResponsePropertiesWhitelistedPatternTypeAcceptableSender InvestigateListResponsePropertiesWhitelistedPatternType = "acceptable_sender" + InvestigateListResponsePropertiesWhitelistedPatternTypeAllowedSender InvestigateListResponsePropertiesWhitelistedPatternType = "allowed_sender" + InvestigateListResponsePropertiesWhitelistedPatternTypeAllowedRecipient InvestigateListResponsePropertiesWhitelistedPatternType = "allowed_recipient" + InvestigateListResponsePropertiesWhitelistedPatternTypeDomainSimilarity InvestigateListResponsePropertiesWhitelistedPatternType = "domain_similarity" + InvestigateListResponsePropertiesWhitelistedPatternTypeDomainRecency InvestigateListResponsePropertiesWhitelistedPatternType = "domain_recency" + InvestigateListResponsePropertiesWhitelistedPatternTypeManagedAcceptableSender InvestigateListResponsePropertiesWhitelistedPatternType = "managed_acceptable_sender" + InvestigateListResponsePropertiesWhitelistedPatternTypeOutboundNdr InvestigateListResponsePropertiesWhitelistedPatternType = "outbound_ndr" +) + +func (r InvestigateListResponsePropertiesWhitelistedPatternType) IsKnown() bool { + switch r { + case InvestigateListResponsePropertiesWhitelistedPatternTypeQuarantineRelease, InvestigateListResponsePropertiesWhitelistedPatternTypeAcceptableSender, InvestigateListResponsePropertiesWhitelistedPatternTypeAllowedSender, InvestigateListResponsePropertiesWhitelistedPatternTypeAllowedRecipient, InvestigateListResponsePropertiesWhitelistedPatternTypeDomainSimilarity, InvestigateListResponsePropertiesWhitelistedPatternTypeDomainRecency, InvestigateListResponsePropertiesWhitelistedPatternTypeManagedAcceptableSender, InvestigateListResponsePropertiesWhitelistedPatternTypeOutboundNdr: + return true + } + return false +} + +type InvestigateListResponseDeliveryMode string + +const ( + InvestigateListResponseDeliveryModeDirect InvestigateListResponseDeliveryMode = "DIRECT" + InvestigateListResponseDeliveryModeBcc InvestigateListResponseDeliveryMode = "BCC" + InvestigateListResponseDeliveryModeJournal InvestigateListResponseDeliveryMode = "JOURNAL" + InvestigateListResponseDeliveryModeReviewSubmission InvestigateListResponseDeliveryMode = "REVIEW_SUBMISSION" + InvestigateListResponseDeliveryModeDMARCUnverified InvestigateListResponseDeliveryMode = "DMARC_UNVERIFIED" + InvestigateListResponseDeliveryModeDMARCFailureReport InvestigateListResponseDeliveryMode = "DMARC_FAILURE_REPORT" + InvestigateListResponseDeliveryModeDMARCAggregateReport InvestigateListResponseDeliveryMode = "DMARC_AGGREGATE_REPORT" + InvestigateListResponseDeliveryModeThreatIntelSubmission InvestigateListResponseDeliveryMode = "THREAT_INTEL_SUBMISSION" + InvestigateListResponseDeliveryModeSimulationSubmission InvestigateListResponseDeliveryMode = "SIMULATION_SUBMISSION" + InvestigateListResponseDeliveryModeAPI InvestigateListResponseDeliveryMode = "API" + InvestigateListResponseDeliveryModeRetroScan InvestigateListResponseDeliveryMode = "RETRO_SCAN" +) + +func (r InvestigateListResponseDeliveryMode) IsKnown() bool { + switch r { + case InvestigateListResponseDeliveryModeDirect, InvestigateListResponseDeliveryModeBcc, InvestigateListResponseDeliveryModeJournal, InvestigateListResponseDeliveryModeReviewSubmission, InvestigateListResponseDeliveryModeDMARCUnverified, InvestigateListResponseDeliveryModeDMARCFailureReport, InvestigateListResponseDeliveryModeDMARCAggregateReport, InvestigateListResponseDeliveryModeThreatIntelSubmission, InvestigateListResponseDeliveryModeSimulationSubmission, InvestigateListResponseDeliveryModeAPI, InvestigateListResponseDeliveryModeRetroScan: + return true + } + return false +} + +type InvestigateListResponseFinalDisposition string + +const ( + InvestigateListResponseFinalDispositionMalicious InvestigateListResponseFinalDisposition = "MALICIOUS" + InvestigateListResponseFinalDispositionMaliciousBec InvestigateListResponseFinalDisposition = "MALICIOUS-BEC" + InvestigateListResponseFinalDispositionSuspicious InvestigateListResponseFinalDisposition = "SUSPICIOUS" + InvestigateListResponseFinalDispositionSpoof InvestigateListResponseFinalDisposition = "SPOOF" + InvestigateListResponseFinalDispositionSpam InvestigateListResponseFinalDisposition = "SPAM" + InvestigateListResponseFinalDispositionBulk InvestigateListResponseFinalDisposition = "BULK" + InvestigateListResponseFinalDispositionEncrypted InvestigateListResponseFinalDisposition = "ENCRYPTED" + InvestigateListResponseFinalDispositionExternal InvestigateListResponseFinalDisposition = "EXTERNAL" + InvestigateListResponseFinalDispositionUnknown InvestigateListResponseFinalDisposition = "UNKNOWN" + InvestigateListResponseFinalDispositionNone InvestigateListResponseFinalDisposition = "NONE" +) + +func (r InvestigateListResponseFinalDisposition) IsKnown() bool { + switch r { + case InvestigateListResponseFinalDispositionMalicious, InvestigateListResponseFinalDispositionMaliciousBec, InvestigateListResponseFinalDispositionSuspicious, InvestigateListResponseFinalDispositionSpoof, InvestigateListResponseFinalDispositionSpam, InvestigateListResponseFinalDispositionBulk, InvestigateListResponseFinalDispositionEncrypted, InvestigateListResponseFinalDispositionExternal, InvestigateListResponseFinalDispositionUnknown, InvestigateListResponseFinalDispositionNone: + return true + } + return false +} + +type InvestigateListResponseFinding struct { + Attachment string `json:"attachment,nullable"` + Detail string `json:"detail,nullable"` + Detection InvestigateListResponseFindingsDetection `json:"detection,nullable"` + Field string `json:"field,nullable"` + Name string `json:"name,nullable"` + Portion string `json:"portion,nullable"` + Reason string `json:"reason,nullable"` + Score float64 `json:"score,nullable"` + Value string `json:"value,nullable"` + JSON investigateListResponseFindingJSON `json:"-"` +} + +// investigateListResponseFindingJSON contains the JSON metadata for the struct +// [InvestigateListResponseFinding] +type investigateListResponseFindingJSON struct { + Attachment apijson.Field + Detail apijson.Field + Detection apijson.Field + Field apijson.Field + Name apijson.Field + Portion apijson.Field + Reason apijson.Field + Score apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateListResponseFinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateListResponseFindingJSON) RawJSON() string { + return r.raw +} + +type InvestigateListResponseFindingsDetection string + +const ( + InvestigateListResponseFindingsDetectionMalicious InvestigateListResponseFindingsDetection = "MALICIOUS" + InvestigateListResponseFindingsDetectionMaliciousBec InvestigateListResponseFindingsDetection = "MALICIOUS-BEC" + InvestigateListResponseFindingsDetectionSuspicious InvestigateListResponseFindingsDetection = "SUSPICIOUS" + InvestigateListResponseFindingsDetectionSpoof InvestigateListResponseFindingsDetection = "SPOOF" + InvestigateListResponseFindingsDetectionSpam InvestigateListResponseFindingsDetection = "SPAM" + InvestigateListResponseFindingsDetectionBulk InvestigateListResponseFindingsDetection = "BULK" + InvestigateListResponseFindingsDetectionEncrypted InvestigateListResponseFindingsDetection = "ENCRYPTED" + InvestigateListResponseFindingsDetectionExternal InvestigateListResponseFindingsDetection = "EXTERNAL" + InvestigateListResponseFindingsDetectionUnknown InvestigateListResponseFindingsDetection = "UNKNOWN" + InvestigateListResponseFindingsDetectionNone InvestigateListResponseFindingsDetection = "NONE" +) + +func (r InvestigateListResponseFindingsDetection) IsKnown() bool { + switch r { + case InvestigateListResponseFindingsDetectionMalicious, InvestigateListResponseFindingsDetectionMaliciousBec, InvestigateListResponseFindingsDetectionSuspicious, InvestigateListResponseFindingsDetectionSpoof, InvestigateListResponseFindingsDetectionSpam, InvestigateListResponseFindingsDetectionBulk, InvestigateListResponseFindingsDetectionEncrypted, InvestigateListResponseFindingsDetectionExternal, InvestigateListResponseFindingsDetectionUnknown, InvestigateListResponseFindingsDetectionNone: + return true + } + return false +} + +type InvestigateListResponseValidation struct { + Comment string `json:"comment,nullable"` + DKIM InvestigateListResponseValidationDKIM `json:"dkim,nullable"` + DMARC InvestigateListResponseValidationDMARC `json:"dmarc,nullable"` + SPF InvestigateListResponseValidationSPF `json:"spf,nullable"` + JSON investigateListResponseValidationJSON `json:"-"` +} + +// investigateListResponseValidationJSON contains the JSON metadata for the struct +// [InvestigateListResponseValidation] +type investigateListResponseValidationJSON struct { + Comment apijson.Field + DKIM apijson.Field + DMARC apijson.Field + SPF apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateListResponseValidation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateListResponseValidationJSON) RawJSON() string { + return r.raw +} + +type InvestigateListResponseValidationDKIM string + +const ( + InvestigateListResponseValidationDKIMPass InvestigateListResponseValidationDKIM = "pass" + InvestigateListResponseValidationDKIMNeutral InvestigateListResponseValidationDKIM = "neutral" + InvestigateListResponseValidationDKIMFail InvestigateListResponseValidationDKIM = "fail" + InvestigateListResponseValidationDKIMError InvestigateListResponseValidationDKIM = "error" + InvestigateListResponseValidationDKIMNone InvestigateListResponseValidationDKIM = "none" +) + +func (r InvestigateListResponseValidationDKIM) IsKnown() bool { + switch r { + case InvestigateListResponseValidationDKIMPass, InvestigateListResponseValidationDKIMNeutral, InvestigateListResponseValidationDKIMFail, InvestigateListResponseValidationDKIMError, InvestigateListResponseValidationDKIMNone: + return true + } + return false +} + +type InvestigateListResponseValidationDMARC string + +const ( + InvestigateListResponseValidationDMARCPass InvestigateListResponseValidationDMARC = "pass" + InvestigateListResponseValidationDMARCNeutral InvestigateListResponseValidationDMARC = "neutral" + InvestigateListResponseValidationDMARCFail InvestigateListResponseValidationDMARC = "fail" + InvestigateListResponseValidationDMARCError InvestigateListResponseValidationDMARC = "error" + InvestigateListResponseValidationDMARCNone InvestigateListResponseValidationDMARC = "none" +) + +func (r InvestigateListResponseValidationDMARC) IsKnown() bool { + switch r { + case InvestigateListResponseValidationDMARCPass, InvestigateListResponseValidationDMARCNeutral, InvestigateListResponseValidationDMARCFail, InvestigateListResponseValidationDMARCError, InvestigateListResponseValidationDMARCNone: + return true + } + return false +} + +type InvestigateListResponseValidationSPF string + +const ( + InvestigateListResponseValidationSPFPass InvestigateListResponseValidationSPF = "pass" + InvestigateListResponseValidationSPFNeutral InvestigateListResponseValidationSPF = "neutral" + InvestigateListResponseValidationSPFFail InvestigateListResponseValidationSPF = "fail" + InvestigateListResponseValidationSPFError InvestigateListResponseValidationSPF = "error" + InvestigateListResponseValidationSPFNone InvestigateListResponseValidationSPF = "none" +) + +func (r InvestigateListResponseValidationSPF) IsKnown() bool { + switch r { + case InvestigateListResponseValidationSPFPass, InvestigateListResponseValidationSPFNeutral, InvestigateListResponseValidationSPFFail, InvestigateListResponseValidationSPFError, InvestigateListResponseValidationSPFNone: + return true + } + return false +} + +type InvestigateGetResponse struct { + ID string `json:"id,required"` + ActionLog interface{} `json:"action_log,required"` + ClientRecipients []string `json:"client_recipients,required"` + DetectionReasons []string `json:"detection_reasons,required"` + IsPhishSubmission bool `json:"is_phish_submission,required"` + IsQuarantined bool `json:"is_quarantined,required"` + // The identifier of the message. + PostfixID string `json:"postfix_id,required"` + Properties InvestigateGetResponseProperties `json:"properties,required"` + Ts string `json:"ts,required"` + AlertID string `json:"alert_id,nullable"` + DeliveryMode InvestigateGetResponseDeliveryMode `json:"delivery_mode,nullable"` + EdfHash string `json:"edf_hash,nullable"` + EnvelopeFrom string `json:"envelope_from,nullable"` + EnvelopeTo []string `json:"envelope_to,nullable"` + FinalDisposition InvestigateGetResponseFinalDisposition `json:"final_disposition,nullable"` + Findings []InvestigateGetResponseFinding `json:"findings,nullable"` + From string `json:"from,nullable"` + FromName string `json:"from_name,nullable"` + HtmltextStructureHash string `json:"htmltext_structure_hash,nullable"` + MessageID string `json:"message_id,nullable"` + PostfixIDOutbound string `json:"postfix_id_outbound,nullable"` + Replyto string `json:"replyto,nullable"` + SentDate string `json:"sent_date,nullable"` + Subject string `json:"subject,nullable"` + ThreatCategories []string `json:"threat_categories,nullable"` + To []string `json:"to,nullable"` + ToName []string `json:"to_name,nullable"` + Validation InvestigateGetResponseValidation `json:"validation,nullable"` + JSON investigateGetResponseJSON `json:"-"` +} + +// investigateGetResponseJSON contains the JSON metadata for the struct +// [InvestigateGetResponse] +type investigateGetResponseJSON struct { + ID apijson.Field + ActionLog apijson.Field + ClientRecipients apijson.Field + DetectionReasons apijson.Field + IsPhishSubmission apijson.Field + IsQuarantined apijson.Field + PostfixID apijson.Field + Properties apijson.Field + Ts apijson.Field + AlertID apijson.Field + DeliveryMode apijson.Field + EdfHash apijson.Field + EnvelopeFrom apijson.Field + EnvelopeTo apijson.Field + FinalDisposition apijson.Field + Findings apijson.Field + From apijson.Field + FromName apijson.Field + HtmltextStructureHash apijson.Field + MessageID apijson.Field + PostfixIDOutbound apijson.Field + Replyto apijson.Field + SentDate apijson.Field + Subject apijson.Field + ThreatCategories apijson.Field + To apijson.Field + ToName apijson.Field + Validation apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateGetResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigateGetResponseProperties struct { + AllowlistedPattern string `json:"allowlisted_pattern"` + AllowlistedPatternType InvestigateGetResponsePropertiesAllowlistedPatternType `json:"allowlisted_pattern_type"` + BlocklistedMessage bool `json:"blocklisted_message"` + BlocklistedPattern string `json:"blocklisted_pattern"` + WhitelistedPatternType InvestigateGetResponsePropertiesWhitelistedPatternType `json:"whitelisted_pattern_type"` + JSON investigateGetResponsePropertiesJSON `json:"-"` +} + +// investigateGetResponsePropertiesJSON contains the JSON metadata for the struct +// [InvestigateGetResponseProperties] +type investigateGetResponsePropertiesJSON struct { + AllowlistedPattern apijson.Field + AllowlistedPatternType apijson.Field + BlocklistedMessage apijson.Field + BlocklistedPattern apijson.Field + WhitelistedPatternType apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateGetResponseProperties) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateGetResponsePropertiesJSON) RawJSON() string { + return r.raw +} + +type InvestigateGetResponsePropertiesAllowlistedPatternType string + +const ( + InvestigateGetResponsePropertiesAllowlistedPatternTypeQuarantineRelease InvestigateGetResponsePropertiesAllowlistedPatternType = "quarantine_release" + InvestigateGetResponsePropertiesAllowlistedPatternTypeAcceptableSender InvestigateGetResponsePropertiesAllowlistedPatternType = "acceptable_sender" + InvestigateGetResponsePropertiesAllowlistedPatternTypeAllowedSender InvestigateGetResponsePropertiesAllowlistedPatternType = "allowed_sender" + InvestigateGetResponsePropertiesAllowlistedPatternTypeAllowedRecipient InvestigateGetResponsePropertiesAllowlistedPatternType = "allowed_recipient" + InvestigateGetResponsePropertiesAllowlistedPatternTypeDomainSimilarity InvestigateGetResponsePropertiesAllowlistedPatternType = "domain_similarity" + InvestigateGetResponsePropertiesAllowlistedPatternTypeDomainRecency InvestigateGetResponsePropertiesAllowlistedPatternType = "domain_recency" + InvestigateGetResponsePropertiesAllowlistedPatternTypeManagedAcceptableSender InvestigateGetResponsePropertiesAllowlistedPatternType = "managed_acceptable_sender" + InvestigateGetResponsePropertiesAllowlistedPatternTypeOutboundNdr InvestigateGetResponsePropertiesAllowlistedPatternType = "outbound_ndr" +) + +func (r InvestigateGetResponsePropertiesAllowlistedPatternType) IsKnown() bool { + switch r { + case InvestigateGetResponsePropertiesAllowlistedPatternTypeQuarantineRelease, InvestigateGetResponsePropertiesAllowlistedPatternTypeAcceptableSender, InvestigateGetResponsePropertiesAllowlistedPatternTypeAllowedSender, InvestigateGetResponsePropertiesAllowlistedPatternTypeAllowedRecipient, InvestigateGetResponsePropertiesAllowlistedPatternTypeDomainSimilarity, InvestigateGetResponsePropertiesAllowlistedPatternTypeDomainRecency, InvestigateGetResponsePropertiesAllowlistedPatternTypeManagedAcceptableSender, InvestigateGetResponsePropertiesAllowlistedPatternTypeOutboundNdr: + return true + } + return false +} + +type InvestigateGetResponsePropertiesWhitelistedPatternType string + +const ( + InvestigateGetResponsePropertiesWhitelistedPatternTypeQuarantineRelease InvestigateGetResponsePropertiesWhitelistedPatternType = "quarantine_release" + InvestigateGetResponsePropertiesWhitelistedPatternTypeAcceptableSender InvestigateGetResponsePropertiesWhitelistedPatternType = "acceptable_sender" + InvestigateGetResponsePropertiesWhitelistedPatternTypeAllowedSender InvestigateGetResponsePropertiesWhitelistedPatternType = "allowed_sender" + InvestigateGetResponsePropertiesWhitelistedPatternTypeAllowedRecipient InvestigateGetResponsePropertiesWhitelistedPatternType = "allowed_recipient" + InvestigateGetResponsePropertiesWhitelistedPatternTypeDomainSimilarity InvestigateGetResponsePropertiesWhitelistedPatternType = "domain_similarity" + InvestigateGetResponsePropertiesWhitelistedPatternTypeDomainRecency InvestigateGetResponsePropertiesWhitelistedPatternType = "domain_recency" + InvestigateGetResponsePropertiesWhitelistedPatternTypeManagedAcceptableSender InvestigateGetResponsePropertiesWhitelistedPatternType = "managed_acceptable_sender" + InvestigateGetResponsePropertiesWhitelistedPatternTypeOutboundNdr InvestigateGetResponsePropertiesWhitelistedPatternType = "outbound_ndr" +) + +func (r InvestigateGetResponsePropertiesWhitelistedPatternType) IsKnown() bool { + switch r { + case InvestigateGetResponsePropertiesWhitelistedPatternTypeQuarantineRelease, InvestigateGetResponsePropertiesWhitelistedPatternTypeAcceptableSender, InvestigateGetResponsePropertiesWhitelistedPatternTypeAllowedSender, InvestigateGetResponsePropertiesWhitelistedPatternTypeAllowedRecipient, InvestigateGetResponsePropertiesWhitelistedPatternTypeDomainSimilarity, InvestigateGetResponsePropertiesWhitelistedPatternTypeDomainRecency, InvestigateGetResponsePropertiesWhitelistedPatternTypeManagedAcceptableSender, InvestigateGetResponsePropertiesWhitelistedPatternTypeOutboundNdr: + return true + } + return false +} + +type InvestigateGetResponseDeliveryMode string + +const ( + InvestigateGetResponseDeliveryModeDirect InvestigateGetResponseDeliveryMode = "DIRECT" + InvestigateGetResponseDeliveryModeBcc InvestigateGetResponseDeliveryMode = "BCC" + InvestigateGetResponseDeliveryModeJournal InvestigateGetResponseDeliveryMode = "JOURNAL" + InvestigateGetResponseDeliveryModeReviewSubmission InvestigateGetResponseDeliveryMode = "REVIEW_SUBMISSION" + InvestigateGetResponseDeliveryModeDMARCUnverified InvestigateGetResponseDeliveryMode = "DMARC_UNVERIFIED" + InvestigateGetResponseDeliveryModeDMARCFailureReport InvestigateGetResponseDeliveryMode = "DMARC_FAILURE_REPORT" + InvestigateGetResponseDeliveryModeDMARCAggregateReport InvestigateGetResponseDeliveryMode = "DMARC_AGGREGATE_REPORT" + InvestigateGetResponseDeliveryModeThreatIntelSubmission InvestigateGetResponseDeliveryMode = "THREAT_INTEL_SUBMISSION" + InvestigateGetResponseDeliveryModeSimulationSubmission InvestigateGetResponseDeliveryMode = "SIMULATION_SUBMISSION" + InvestigateGetResponseDeliveryModeAPI InvestigateGetResponseDeliveryMode = "API" + InvestigateGetResponseDeliveryModeRetroScan InvestigateGetResponseDeliveryMode = "RETRO_SCAN" +) + +func (r InvestigateGetResponseDeliveryMode) IsKnown() bool { + switch r { + case InvestigateGetResponseDeliveryModeDirect, InvestigateGetResponseDeliveryModeBcc, InvestigateGetResponseDeliveryModeJournal, InvestigateGetResponseDeliveryModeReviewSubmission, InvestigateGetResponseDeliveryModeDMARCUnverified, InvestigateGetResponseDeliveryModeDMARCFailureReport, InvestigateGetResponseDeliveryModeDMARCAggregateReport, InvestigateGetResponseDeliveryModeThreatIntelSubmission, InvestigateGetResponseDeliveryModeSimulationSubmission, InvestigateGetResponseDeliveryModeAPI, InvestigateGetResponseDeliveryModeRetroScan: + return true + } + return false +} + +type InvestigateGetResponseFinalDisposition string + +const ( + InvestigateGetResponseFinalDispositionMalicious InvestigateGetResponseFinalDisposition = "MALICIOUS" + InvestigateGetResponseFinalDispositionMaliciousBec InvestigateGetResponseFinalDisposition = "MALICIOUS-BEC" + InvestigateGetResponseFinalDispositionSuspicious InvestigateGetResponseFinalDisposition = "SUSPICIOUS" + InvestigateGetResponseFinalDispositionSpoof InvestigateGetResponseFinalDisposition = "SPOOF" + InvestigateGetResponseFinalDispositionSpam InvestigateGetResponseFinalDisposition = "SPAM" + InvestigateGetResponseFinalDispositionBulk InvestigateGetResponseFinalDisposition = "BULK" + InvestigateGetResponseFinalDispositionEncrypted InvestigateGetResponseFinalDisposition = "ENCRYPTED" + InvestigateGetResponseFinalDispositionExternal InvestigateGetResponseFinalDisposition = "EXTERNAL" + InvestigateGetResponseFinalDispositionUnknown InvestigateGetResponseFinalDisposition = "UNKNOWN" + InvestigateGetResponseFinalDispositionNone InvestigateGetResponseFinalDisposition = "NONE" +) + +func (r InvestigateGetResponseFinalDisposition) IsKnown() bool { + switch r { + case InvestigateGetResponseFinalDispositionMalicious, InvestigateGetResponseFinalDispositionMaliciousBec, InvestigateGetResponseFinalDispositionSuspicious, InvestigateGetResponseFinalDispositionSpoof, InvestigateGetResponseFinalDispositionSpam, InvestigateGetResponseFinalDispositionBulk, InvestigateGetResponseFinalDispositionEncrypted, InvestigateGetResponseFinalDispositionExternal, InvestigateGetResponseFinalDispositionUnknown, InvestigateGetResponseFinalDispositionNone: + return true + } + return false +} + +type InvestigateGetResponseFinding struct { + Attachment string `json:"attachment,nullable"` + Detail string `json:"detail,nullable"` + Detection InvestigateGetResponseFindingsDetection `json:"detection,nullable"` + Field string `json:"field,nullable"` + Name string `json:"name,nullable"` + Portion string `json:"portion,nullable"` + Reason string `json:"reason,nullable"` + Score float64 `json:"score,nullable"` + Value string `json:"value,nullable"` + JSON investigateGetResponseFindingJSON `json:"-"` +} + +// investigateGetResponseFindingJSON contains the JSON metadata for the struct +// [InvestigateGetResponseFinding] +type investigateGetResponseFindingJSON struct { + Attachment apijson.Field + Detail apijson.Field + Detection apijson.Field + Field apijson.Field + Name apijson.Field + Portion apijson.Field + Reason apijson.Field + Score apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateGetResponseFinding) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateGetResponseFindingJSON) RawJSON() string { + return r.raw +} + +type InvestigateGetResponseFindingsDetection string + +const ( + InvestigateGetResponseFindingsDetectionMalicious InvestigateGetResponseFindingsDetection = "MALICIOUS" + InvestigateGetResponseFindingsDetectionMaliciousBec InvestigateGetResponseFindingsDetection = "MALICIOUS-BEC" + InvestigateGetResponseFindingsDetectionSuspicious InvestigateGetResponseFindingsDetection = "SUSPICIOUS" + InvestigateGetResponseFindingsDetectionSpoof InvestigateGetResponseFindingsDetection = "SPOOF" + InvestigateGetResponseFindingsDetectionSpam InvestigateGetResponseFindingsDetection = "SPAM" + InvestigateGetResponseFindingsDetectionBulk InvestigateGetResponseFindingsDetection = "BULK" + InvestigateGetResponseFindingsDetectionEncrypted InvestigateGetResponseFindingsDetection = "ENCRYPTED" + InvestigateGetResponseFindingsDetectionExternal InvestigateGetResponseFindingsDetection = "EXTERNAL" + InvestigateGetResponseFindingsDetectionUnknown InvestigateGetResponseFindingsDetection = "UNKNOWN" + InvestigateGetResponseFindingsDetectionNone InvestigateGetResponseFindingsDetection = "NONE" +) + +func (r InvestigateGetResponseFindingsDetection) IsKnown() bool { + switch r { + case InvestigateGetResponseFindingsDetectionMalicious, InvestigateGetResponseFindingsDetectionMaliciousBec, InvestigateGetResponseFindingsDetectionSuspicious, InvestigateGetResponseFindingsDetectionSpoof, InvestigateGetResponseFindingsDetectionSpam, InvestigateGetResponseFindingsDetectionBulk, InvestigateGetResponseFindingsDetectionEncrypted, InvestigateGetResponseFindingsDetectionExternal, InvestigateGetResponseFindingsDetectionUnknown, InvestigateGetResponseFindingsDetectionNone: + return true + } + return false +} + +type InvestigateGetResponseValidation struct { + Comment string `json:"comment,nullable"` + DKIM InvestigateGetResponseValidationDKIM `json:"dkim,nullable"` + DMARC InvestigateGetResponseValidationDMARC `json:"dmarc,nullable"` + SPF InvestigateGetResponseValidationSPF `json:"spf,nullable"` + JSON investigateGetResponseValidationJSON `json:"-"` +} + +// investigateGetResponseValidationJSON contains the JSON metadata for the struct +// [InvestigateGetResponseValidation] +type investigateGetResponseValidationJSON struct { + Comment apijson.Field + DKIM apijson.Field + DMARC apijson.Field + SPF apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateGetResponseValidation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateGetResponseValidationJSON) RawJSON() string { + return r.raw +} + +type InvestigateGetResponseValidationDKIM string + +const ( + InvestigateGetResponseValidationDKIMPass InvestigateGetResponseValidationDKIM = "pass" + InvestigateGetResponseValidationDKIMNeutral InvestigateGetResponseValidationDKIM = "neutral" + InvestigateGetResponseValidationDKIMFail InvestigateGetResponseValidationDKIM = "fail" + InvestigateGetResponseValidationDKIMError InvestigateGetResponseValidationDKIM = "error" + InvestigateGetResponseValidationDKIMNone InvestigateGetResponseValidationDKIM = "none" +) + +func (r InvestigateGetResponseValidationDKIM) IsKnown() bool { + switch r { + case InvestigateGetResponseValidationDKIMPass, InvestigateGetResponseValidationDKIMNeutral, InvestigateGetResponseValidationDKIMFail, InvestigateGetResponseValidationDKIMError, InvestigateGetResponseValidationDKIMNone: + return true + } + return false +} + +type InvestigateGetResponseValidationDMARC string + +const ( + InvestigateGetResponseValidationDMARCPass InvestigateGetResponseValidationDMARC = "pass" + InvestigateGetResponseValidationDMARCNeutral InvestigateGetResponseValidationDMARC = "neutral" + InvestigateGetResponseValidationDMARCFail InvestigateGetResponseValidationDMARC = "fail" + InvestigateGetResponseValidationDMARCError InvestigateGetResponseValidationDMARC = "error" + InvestigateGetResponseValidationDMARCNone InvestigateGetResponseValidationDMARC = "none" +) + +func (r InvestigateGetResponseValidationDMARC) IsKnown() bool { + switch r { + case InvestigateGetResponseValidationDMARCPass, InvestigateGetResponseValidationDMARCNeutral, InvestigateGetResponseValidationDMARCFail, InvestigateGetResponseValidationDMARCError, InvestigateGetResponseValidationDMARCNone: + return true + } + return false +} + +type InvestigateGetResponseValidationSPF string + +const ( + InvestigateGetResponseValidationSPFPass InvestigateGetResponseValidationSPF = "pass" + InvestigateGetResponseValidationSPFNeutral InvestigateGetResponseValidationSPF = "neutral" + InvestigateGetResponseValidationSPFFail InvestigateGetResponseValidationSPF = "fail" + InvestigateGetResponseValidationSPFError InvestigateGetResponseValidationSPF = "error" + InvestigateGetResponseValidationSPFNone InvestigateGetResponseValidationSPF = "none" +) + +func (r InvestigateGetResponseValidationSPF) IsKnown() bool { + switch r { + case InvestigateGetResponseValidationSPFPass, InvestigateGetResponseValidationSPFNeutral, InvestigateGetResponseValidationSPFFail, InvestigateGetResponseValidationSPFError, InvestigateGetResponseValidationSPFNone: + return true + } + return false +} + +type InvestigateListParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // Determines if the message action log is included in the response. + ActionLog param.Field[bool] `query:"action_log"` + AlertID param.Field[string] `query:"alert_id"` + Cursor param.Field[string] `query:"cursor"` + // Determines if the search results will include detections or not. + DetectionsOnly param.Field[bool] `query:"detections_only"` + // The sender domains the search filters by. + Domain param.Field[string] `query:"domain"` + // The end of the search date range. Defaults to `now`. + End param.Field[time.Time] `query:"end" format:"date-time"` + // The dispositions the search filters by. + FinalDisposition param.Field[InvestigateListParamsFinalDisposition] `query:"final_disposition"` + // The message actions the search filters by. + MessageAction param.Field[InvestigateListParamsMessageAction] `query:"message_action"` + MessageID param.Field[string] `query:"message_id"` + Metric param.Field[string] `query:"metric"` + // Deprecated: Use cursor pagination instead. + Page param.Field[int64] `query:"page"` + // The number of results per page. + PerPage param.Field[int64] `query:"per_page"` + // The space-delimited term used in the query. The search is case-insensitive. + // + // The content of the following email metadata fields are searched: + // + // - alert_id + // - CC + // - From (envelope_from) + // - From Name + // - final_disposition + // - md5 hash (of any attachment) + // - sha1 hash (of any attachment) + // - sha256 hash (of any attachment) + // - name (of any attachment) + // - Reason + // - Received DateTime (yyyy-mm-ddThh:mm:ss) + // - Sent DateTime (yyyy-mm-ddThh:mm:ss) + // - ReplyTo + // - To (envelope_to) + // - To Name + // - Message-ID + // - smtp_helo_server_ip + // - smtp_previous_hop_ip + // - x_originating_ip + // - Subject + Query param.Field[string] `query:"query"` + Recipient param.Field[string] `query:"recipient"` + Sender param.Field[string] `query:"sender"` + // The beginning of the search date range. Defaults to `now - 30 days`. + Start param.Field[time.Time] `query:"start" format:"date-time"` + Subject param.Field[string] `query:"subject"` +} + +// URLQuery serializes [InvestigateListParams]'s query parameters as `url.Values`. +func (r InvestigateListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + +// The dispositions the search filters by. +type InvestigateListParamsFinalDisposition string + +const ( + InvestigateListParamsFinalDispositionMalicious InvestigateListParamsFinalDisposition = "MALICIOUS" + InvestigateListParamsFinalDispositionSuspicious InvestigateListParamsFinalDisposition = "SUSPICIOUS" + InvestigateListParamsFinalDispositionSpoof InvestigateListParamsFinalDisposition = "SPOOF" + InvestigateListParamsFinalDispositionSpam InvestigateListParamsFinalDisposition = "SPAM" + InvestigateListParamsFinalDispositionBulk InvestigateListParamsFinalDisposition = "BULK" + InvestigateListParamsFinalDispositionNone InvestigateListParamsFinalDisposition = "NONE" +) + +func (r InvestigateListParamsFinalDisposition) IsKnown() bool { + switch r { + case InvestigateListParamsFinalDispositionMalicious, InvestigateListParamsFinalDispositionSuspicious, InvestigateListParamsFinalDispositionSpoof, InvestigateListParamsFinalDispositionSpam, InvestigateListParamsFinalDispositionBulk, InvestigateListParamsFinalDispositionNone: + return true + } + return false +} + +// The message actions the search filters by. +type InvestigateListParamsMessageAction string + +const ( + InvestigateListParamsMessageActionPreview InvestigateListParamsMessageAction = "PREVIEW" + InvestigateListParamsMessageActionQuarantineReleased InvestigateListParamsMessageAction = "QUARANTINE_RELEASED" + InvestigateListParamsMessageActionMoved InvestigateListParamsMessageAction = "MOVED" +) + +func (r InvestigateListParamsMessageAction) IsKnown() bool { + switch r { + case InvestigateListParamsMessageActionPreview, InvestigateListParamsMessageActionQuarantineReleased, InvestigateListParamsMessageActionMoved: + return true + } + return false +} + +type InvestigateGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type InvestigateGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result InvestigateGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON investigateGetResponseEnvelopeJSON `json:"-"` +} + +// investigateGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [InvestigateGetResponseEnvelope] +type investigateGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/investigate_test.go b/email_security/investigate_test.go new file mode 100644 index 00000000000..8ad43fa8bc5 --- /dev/null +++ b/email_security/investigate_test.go @@ -0,0 +1,87 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + "time" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestInvestigateListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.List(context.TODO(), email_security.InvestigateListParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + ActionLog: cloudflare.F(true), + AlertID: cloudflare.F("alert_id"), + Cursor: cloudflare.F("cursor"), + DetectionsOnly: cloudflare.F(true), + Domain: cloudflare.F("domain"), + End: cloudflare.F(time.Now()), + FinalDisposition: cloudflare.F(email_security.InvestigateListParamsFinalDispositionMalicious), + MessageAction: cloudflare.F(email_security.InvestigateListParamsMessageActionPreview), + MessageID: cloudflare.F("message_id"), + Metric: cloudflare.F("metric"), + Page: cloudflare.F(int64(1)), + PerPage: cloudflare.F(int64(1)), + Query: cloudflare.F("query"), + Recipient: cloudflare.F("recipient"), + Sender: cloudflare.F("sender"), + Start: cloudflare.F(time.Now()), + Subject: cloudflare.F("subject"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestInvestigateGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Get( + context.TODO(), + "4Njp3P0STMz2c02Q", + email_security.InvestigateGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/investigatedetection.go b/email_security/investigatedetection.go index 8eee4be324e..1e6eb15e08c 100644 --- a/email_security/investigatedetection.go +++ b/email_security/investigatedetection.go @@ -3,7 +3,17 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateDetectionService contains methods and other services that help with @@ -24,3 +34,350 @@ func NewInvestigateDetectionService(opts ...option.RequestOption) (r *Investigat r.Options = opts return } + +// Returns detection details such as threat categories and sender information for +// non-benign messages. +func (r *InvestigateDetectionService) Get(ctx context.Context, postfixID string, query InvestigateDetectionGetParams, opts ...option.RequestOption) (res *InvestigateDetectionGetResponse, err error) { + var env InvestigateDetectionGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if postfixID == "" { + err = errors.New("missing required postfix_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/detections", query.AccountID, postfixID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type InvestigateDetectionGetResponse struct { + Action string `json:"action,required"` + Attachments []InvestigateDetectionGetResponseAttachment `json:"attachments,required"` + Headers []InvestigateDetectionGetResponseHeader `json:"headers,required"` + Links []InvestigateDetectionGetResponseLink `json:"links,required"` + SenderInfo InvestigateDetectionGetResponseSenderInfo `json:"sender_info,required"` + ThreatCategories []InvestigateDetectionGetResponseThreatCategory `json:"threat_categories,required"` + Validation InvestigateDetectionGetResponseValidation `json:"validation,required"` + FinalDisposition InvestigateDetectionGetResponseFinalDisposition `json:"final_disposition,nullable"` + JSON investigateDetectionGetResponseJSON `json:"-"` +} + +// investigateDetectionGetResponseJSON contains the JSON metadata for the struct +// [InvestigateDetectionGetResponse] +type investigateDetectionGetResponseJSON struct { + Action apijson.Field + Attachments apijson.Field + Headers apijson.Field + Links apijson.Field + SenderInfo apijson.Field + ThreatCategories apijson.Field + Validation apijson.Field + FinalDisposition apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateDetectionGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateDetectionGetResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigateDetectionGetResponseAttachment struct { + Size int64 `json:"size,required"` + ContentType string `json:"content_type,nullable"` + Detection InvestigateDetectionGetResponseAttachmentsDetection `json:"detection,nullable"` + Encrypted bool `json:"encrypted,nullable"` + Name string `json:"name,nullable"` + JSON investigateDetectionGetResponseAttachmentJSON `json:"-"` +} + +// investigateDetectionGetResponseAttachmentJSON contains the JSON metadata for the +// struct [InvestigateDetectionGetResponseAttachment] +type investigateDetectionGetResponseAttachmentJSON struct { + Size apijson.Field + ContentType apijson.Field + Detection apijson.Field + Encrypted apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateDetectionGetResponseAttachment) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateDetectionGetResponseAttachmentJSON) RawJSON() string { + return r.raw +} + +type InvestigateDetectionGetResponseAttachmentsDetection string + +const ( + InvestigateDetectionGetResponseAttachmentsDetectionMalicious InvestigateDetectionGetResponseAttachmentsDetection = "MALICIOUS" + InvestigateDetectionGetResponseAttachmentsDetectionMaliciousBec InvestigateDetectionGetResponseAttachmentsDetection = "MALICIOUS-BEC" + InvestigateDetectionGetResponseAttachmentsDetectionSuspicious InvestigateDetectionGetResponseAttachmentsDetection = "SUSPICIOUS" + InvestigateDetectionGetResponseAttachmentsDetectionSpoof InvestigateDetectionGetResponseAttachmentsDetection = "SPOOF" + InvestigateDetectionGetResponseAttachmentsDetectionSpam InvestigateDetectionGetResponseAttachmentsDetection = "SPAM" + InvestigateDetectionGetResponseAttachmentsDetectionBulk InvestigateDetectionGetResponseAttachmentsDetection = "BULK" + InvestigateDetectionGetResponseAttachmentsDetectionEncrypted InvestigateDetectionGetResponseAttachmentsDetection = "ENCRYPTED" + InvestigateDetectionGetResponseAttachmentsDetectionExternal InvestigateDetectionGetResponseAttachmentsDetection = "EXTERNAL" + InvestigateDetectionGetResponseAttachmentsDetectionUnknown InvestigateDetectionGetResponseAttachmentsDetection = "UNKNOWN" + InvestigateDetectionGetResponseAttachmentsDetectionNone InvestigateDetectionGetResponseAttachmentsDetection = "NONE" +) + +func (r InvestigateDetectionGetResponseAttachmentsDetection) IsKnown() bool { + switch r { + case InvestigateDetectionGetResponseAttachmentsDetectionMalicious, InvestigateDetectionGetResponseAttachmentsDetectionMaliciousBec, InvestigateDetectionGetResponseAttachmentsDetectionSuspicious, InvestigateDetectionGetResponseAttachmentsDetectionSpoof, InvestigateDetectionGetResponseAttachmentsDetectionSpam, InvestigateDetectionGetResponseAttachmentsDetectionBulk, InvestigateDetectionGetResponseAttachmentsDetectionEncrypted, InvestigateDetectionGetResponseAttachmentsDetectionExternal, InvestigateDetectionGetResponseAttachmentsDetectionUnknown, InvestigateDetectionGetResponseAttachmentsDetectionNone: + return true + } + return false +} + +type InvestigateDetectionGetResponseHeader struct { + Name string `json:"name,required"` + Value string `json:"value,required"` + JSON investigateDetectionGetResponseHeaderJSON `json:"-"` +} + +// investigateDetectionGetResponseHeaderJSON contains the JSON metadata for the +// struct [InvestigateDetectionGetResponseHeader] +type investigateDetectionGetResponseHeaderJSON struct { + Name apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateDetectionGetResponseHeader) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateDetectionGetResponseHeaderJSON) RawJSON() string { + return r.raw +} + +type InvestigateDetectionGetResponseLink struct { + Href string `json:"href,required"` + Text string `json:"text,nullable"` + JSON investigateDetectionGetResponseLinkJSON `json:"-"` +} + +// investigateDetectionGetResponseLinkJSON contains the JSON metadata for the +// struct [InvestigateDetectionGetResponseLink] +type investigateDetectionGetResponseLinkJSON struct { + Href apijson.Field + Text apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateDetectionGetResponseLink) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateDetectionGetResponseLinkJSON) RawJSON() string { + return r.raw +} + +type InvestigateDetectionGetResponseSenderInfo struct { + // The name of the autonomous system. + AsName string `json:"as_name,nullable"` + // The number of the autonomous system. + AsNumber int64 `json:"as_number,nullable"` + Geo string `json:"geo,nullable"` + IP string `json:"ip,nullable"` + Pld string `json:"pld,nullable"` + JSON investigateDetectionGetResponseSenderInfoJSON `json:"-"` +} + +// investigateDetectionGetResponseSenderInfoJSON contains the JSON metadata for the +// struct [InvestigateDetectionGetResponseSenderInfo] +type investigateDetectionGetResponseSenderInfoJSON struct { + AsName apijson.Field + AsNumber apijson.Field + Geo apijson.Field + IP apijson.Field + Pld apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateDetectionGetResponseSenderInfo) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateDetectionGetResponseSenderInfoJSON) RawJSON() string { + return r.raw +} + +type InvestigateDetectionGetResponseThreatCategory struct { + ID int64 `json:"id,required"` + Description string `json:"description,nullable"` + Name string `json:"name,nullable"` + JSON investigateDetectionGetResponseThreatCategoryJSON `json:"-"` +} + +// investigateDetectionGetResponseThreatCategoryJSON contains the JSON metadata for +// the struct [InvestigateDetectionGetResponseThreatCategory] +type investigateDetectionGetResponseThreatCategoryJSON struct { + ID apijson.Field + Description apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateDetectionGetResponseThreatCategory) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateDetectionGetResponseThreatCategoryJSON) RawJSON() string { + return r.raw +} + +type InvestigateDetectionGetResponseValidation struct { + Comment string `json:"comment,nullable"` + DKIM InvestigateDetectionGetResponseValidationDKIM `json:"dkim,nullable"` + DMARC InvestigateDetectionGetResponseValidationDMARC `json:"dmarc,nullable"` + SPF InvestigateDetectionGetResponseValidationSPF `json:"spf,nullable"` + JSON investigateDetectionGetResponseValidationJSON `json:"-"` +} + +// investigateDetectionGetResponseValidationJSON contains the JSON metadata for the +// struct [InvestigateDetectionGetResponseValidation] +type investigateDetectionGetResponseValidationJSON struct { + Comment apijson.Field + DKIM apijson.Field + DMARC apijson.Field + SPF apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateDetectionGetResponseValidation) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateDetectionGetResponseValidationJSON) RawJSON() string { + return r.raw +} + +type InvestigateDetectionGetResponseValidationDKIM string + +const ( + InvestigateDetectionGetResponseValidationDKIMPass InvestigateDetectionGetResponseValidationDKIM = "pass" + InvestigateDetectionGetResponseValidationDKIMNeutral InvestigateDetectionGetResponseValidationDKIM = "neutral" + InvestigateDetectionGetResponseValidationDKIMFail InvestigateDetectionGetResponseValidationDKIM = "fail" + InvestigateDetectionGetResponseValidationDKIMError InvestigateDetectionGetResponseValidationDKIM = "error" + InvestigateDetectionGetResponseValidationDKIMNone InvestigateDetectionGetResponseValidationDKIM = "none" +) + +func (r InvestigateDetectionGetResponseValidationDKIM) IsKnown() bool { + switch r { + case InvestigateDetectionGetResponseValidationDKIMPass, InvestigateDetectionGetResponseValidationDKIMNeutral, InvestigateDetectionGetResponseValidationDKIMFail, InvestigateDetectionGetResponseValidationDKIMError, InvestigateDetectionGetResponseValidationDKIMNone: + return true + } + return false +} + +type InvestigateDetectionGetResponseValidationDMARC string + +const ( + InvestigateDetectionGetResponseValidationDMARCPass InvestigateDetectionGetResponseValidationDMARC = "pass" + InvestigateDetectionGetResponseValidationDMARCNeutral InvestigateDetectionGetResponseValidationDMARC = "neutral" + InvestigateDetectionGetResponseValidationDMARCFail InvestigateDetectionGetResponseValidationDMARC = "fail" + InvestigateDetectionGetResponseValidationDMARCError InvestigateDetectionGetResponseValidationDMARC = "error" + InvestigateDetectionGetResponseValidationDMARCNone InvestigateDetectionGetResponseValidationDMARC = "none" +) + +func (r InvestigateDetectionGetResponseValidationDMARC) IsKnown() bool { + switch r { + case InvestigateDetectionGetResponseValidationDMARCPass, InvestigateDetectionGetResponseValidationDMARCNeutral, InvestigateDetectionGetResponseValidationDMARCFail, InvestigateDetectionGetResponseValidationDMARCError, InvestigateDetectionGetResponseValidationDMARCNone: + return true + } + return false +} + +type InvestigateDetectionGetResponseValidationSPF string + +const ( + InvestigateDetectionGetResponseValidationSPFPass InvestigateDetectionGetResponseValidationSPF = "pass" + InvestigateDetectionGetResponseValidationSPFNeutral InvestigateDetectionGetResponseValidationSPF = "neutral" + InvestigateDetectionGetResponseValidationSPFFail InvestigateDetectionGetResponseValidationSPF = "fail" + InvestigateDetectionGetResponseValidationSPFError InvestigateDetectionGetResponseValidationSPF = "error" + InvestigateDetectionGetResponseValidationSPFNone InvestigateDetectionGetResponseValidationSPF = "none" +) + +func (r InvestigateDetectionGetResponseValidationSPF) IsKnown() bool { + switch r { + case InvestigateDetectionGetResponseValidationSPFPass, InvestigateDetectionGetResponseValidationSPFNeutral, InvestigateDetectionGetResponseValidationSPFFail, InvestigateDetectionGetResponseValidationSPFError, InvestigateDetectionGetResponseValidationSPFNone: + return true + } + return false +} + +type InvestigateDetectionGetResponseFinalDisposition string + +const ( + InvestigateDetectionGetResponseFinalDispositionMalicious InvestigateDetectionGetResponseFinalDisposition = "MALICIOUS" + InvestigateDetectionGetResponseFinalDispositionMaliciousBec InvestigateDetectionGetResponseFinalDisposition = "MALICIOUS-BEC" + InvestigateDetectionGetResponseFinalDispositionSuspicious InvestigateDetectionGetResponseFinalDisposition = "SUSPICIOUS" + InvestigateDetectionGetResponseFinalDispositionSpoof InvestigateDetectionGetResponseFinalDisposition = "SPOOF" + InvestigateDetectionGetResponseFinalDispositionSpam InvestigateDetectionGetResponseFinalDisposition = "SPAM" + InvestigateDetectionGetResponseFinalDispositionBulk InvestigateDetectionGetResponseFinalDisposition = "BULK" + InvestigateDetectionGetResponseFinalDispositionEncrypted InvestigateDetectionGetResponseFinalDisposition = "ENCRYPTED" + InvestigateDetectionGetResponseFinalDispositionExternal InvestigateDetectionGetResponseFinalDisposition = "EXTERNAL" + InvestigateDetectionGetResponseFinalDispositionUnknown InvestigateDetectionGetResponseFinalDisposition = "UNKNOWN" + InvestigateDetectionGetResponseFinalDispositionNone InvestigateDetectionGetResponseFinalDisposition = "NONE" +) + +func (r InvestigateDetectionGetResponseFinalDisposition) IsKnown() bool { + switch r { + case InvestigateDetectionGetResponseFinalDispositionMalicious, InvestigateDetectionGetResponseFinalDispositionMaliciousBec, InvestigateDetectionGetResponseFinalDispositionSuspicious, InvestigateDetectionGetResponseFinalDispositionSpoof, InvestigateDetectionGetResponseFinalDispositionSpam, InvestigateDetectionGetResponseFinalDispositionBulk, InvestigateDetectionGetResponseFinalDispositionEncrypted, InvestigateDetectionGetResponseFinalDispositionExternal, InvestigateDetectionGetResponseFinalDispositionUnknown, InvestigateDetectionGetResponseFinalDispositionNone: + return true + } + return false +} + +type InvestigateDetectionGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type InvestigateDetectionGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result InvestigateDetectionGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON investigateDetectionGetResponseEnvelopeJSON `json:"-"` +} + +// investigateDetectionGetResponseEnvelopeJSON contains the JSON metadata for the +// struct [InvestigateDetectionGetResponseEnvelope] +type investigateDetectionGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateDetectionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateDetectionGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/investigatedetection_test.go b/email_security/investigatedetection_test.go new file mode 100644 index 00000000000..cbb832b3b21 --- /dev/null +++ b/email_security/investigatedetection_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestInvestigateDetectionGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Detections.Get( + context.TODO(), + "4Njp3P0STMz2c02Q", + email_security.InvestigateDetectionGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/investigatemove.go b/email_security/investigatemove.go index 4947fecfc3a..eded6b83526 100644 --- a/email_security/investigatemove.go +++ b/email_security/investigatemove.go @@ -3,7 +3,18 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" ) // InvestigateMoveService contains methods and other services that help with @@ -24,3 +35,184 @@ func NewInvestigateMoveService(opts ...option.RequestOption) (r *InvestigateMove r.Options = opts return } + +// Move a message +func (r *InvestigateMoveService) New(ctx context.Context, postfixID string, params InvestigateMoveNewParams, opts ...option.RequestOption) (res *pagination.SinglePage[InvestigateMoveNewResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if postfixID == "" { + err = errors.New("missing required postfix_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/move", params.AccountID, postfixID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Move a message +func (r *InvestigateMoveService) NewAutoPaging(ctx context.Context, postfixID string, params InvestigateMoveNewParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InvestigateMoveNewResponse] { + return pagination.NewSinglePageAutoPager(r.New(ctx, postfixID, params, opts...)) +} + +// Move multiple messages +func (r *InvestigateMoveService) Bulk(ctx context.Context, params InvestigateMoveBulkParams, opts ...option.RequestOption) (res *pagination.SinglePage[InvestigateMoveBulkResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/move", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Move multiple messages +func (r *InvestigateMoveService) BulkAutoPaging(ctx context.Context, params InvestigateMoveBulkParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InvestigateMoveBulkResponse] { + return pagination.NewSinglePageAutoPager(r.Bulk(ctx, params, opts...)) +} + +type InvestigateMoveNewResponse struct { + CompletedTimestamp time.Time `json:"completed_timestamp,required" format:"date-time"` + ItemCount int64 `json:"item_count,required"` + Destination string `json:"destination,nullable"` + MessageID string `json:"message_id,nullable"` + Operation string `json:"operation,nullable"` + Recipient string `json:"recipient,nullable"` + Status string `json:"status,nullable"` + JSON investigateMoveNewResponseJSON `json:"-"` +} + +// investigateMoveNewResponseJSON contains the JSON metadata for the struct +// [InvestigateMoveNewResponse] +type investigateMoveNewResponseJSON struct { + CompletedTimestamp apijson.Field + ItemCount apijson.Field + Destination apijson.Field + MessageID apijson.Field + Operation apijson.Field + Recipient apijson.Field + Status apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateMoveNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateMoveNewResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigateMoveBulkResponse struct { + CompletedTimestamp time.Time `json:"completed_timestamp,required" format:"date-time"` + ItemCount int64 `json:"item_count,required"` + Destination string `json:"destination,nullable"` + MessageID string `json:"message_id,nullable"` + Operation string `json:"operation,nullable"` + Recipient string `json:"recipient,nullable"` + Status string `json:"status,nullable"` + JSON investigateMoveBulkResponseJSON `json:"-"` +} + +// investigateMoveBulkResponseJSON contains the JSON metadata for the struct +// [InvestigateMoveBulkResponse] +type investigateMoveBulkResponseJSON struct { + CompletedTimestamp apijson.Field + ItemCount apijson.Field + Destination apijson.Field + MessageID apijson.Field + Operation apijson.Field + Recipient apijson.Field + Status apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateMoveBulkResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateMoveBulkResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigateMoveNewParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + Destination param.Field[InvestigateMoveNewParamsDestination] `json:"destination,required"` +} + +func (r InvestigateMoveNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type InvestigateMoveNewParamsDestination string + +const ( + InvestigateMoveNewParamsDestinationInbox InvestigateMoveNewParamsDestination = "Inbox" + InvestigateMoveNewParamsDestinationJunkEmail InvestigateMoveNewParamsDestination = "JunkEmail" + InvestigateMoveNewParamsDestinationDeletedItems InvestigateMoveNewParamsDestination = "DeletedItems" + InvestigateMoveNewParamsDestinationRecoverableItemsDeletions InvestigateMoveNewParamsDestination = "RecoverableItemsDeletions" + InvestigateMoveNewParamsDestinationRecoverableItemsPurges InvestigateMoveNewParamsDestination = "RecoverableItemsPurges" +) + +func (r InvestigateMoveNewParamsDestination) IsKnown() bool { + switch r { + case InvestigateMoveNewParamsDestinationInbox, InvestigateMoveNewParamsDestinationJunkEmail, InvestigateMoveNewParamsDestinationDeletedItems, InvestigateMoveNewParamsDestinationRecoverableItemsDeletions, InvestigateMoveNewParamsDestinationRecoverableItemsPurges: + return true + } + return false +} + +type InvestigateMoveBulkParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + Destination param.Field[InvestigateMoveBulkParamsDestination] `json:"destination,required"` + PostfixIDs param.Field[[]string] `json:"postfix_ids,required"` +} + +func (r InvestigateMoveBulkParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type InvestigateMoveBulkParamsDestination string + +const ( + InvestigateMoveBulkParamsDestinationInbox InvestigateMoveBulkParamsDestination = "Inbox" + InvestigateMoveBulkParamsDestinationJunkEmail InvestigateMoveBulkParamsDestination = "JunkEmail" + InvestigateMoveBulkParamsDestinationDeletedItems InvestigateMoveBulkParamsDestination = "DeletedItems" + InvestigateMoveBulkParamsDestinationRecoverableItemsDeletions InvestigateMoveBulkParamsDestination = "RecoverableItemsDeletions" + InvestigateMoveBulkParamsDestinationRecoverableItemsPurges InvestigateMoveBulkParamsDestination = "RecoverableItemsPurges" +) + +func (r InvestigateMoveBulkParamsDestination) IsKnown() bool { + switch r { + case InvestigateMoveBulkParamsDestinationInbox, InvestigateMoveBulkParamsDestinationJunkEmail, InvestigateMoveBulkParamsDestinationDeletedItems, InvestigateMoveBulkParamsDestinationRecoverableItemsDeletions, InvestigateMoveBulkParamsDestinationRecoverableItemsPurges: + return true + } + return false +} diff --git a/email_security/investigatemove_test.go b/email_security/investigatemove_test.go new file mode 100644 index 00000000000..d9d94ce541a --- /dev/null +++ b/email_security/investigatemove_test.go @@ -0,0 +1,72 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestInvestigateMoveNew(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Move.New( + context.TODO(), + "4Njp3P0STMz2c02Q", + email_security.InvestigateMoveNewParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Destination: cloudflare.F(email_security.InvestigateMoveNewParamsDestinationInbox), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestInvestigateMoveBulk(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Move.Bulk(context.TODO(), email_security.InvestigateMoveBulkParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Destination: cloudflare.F(email_security.InvestigateMoveBulkParamsDestinationInbox), + PostfixIDs: cloudflare.F([]string{"4Njp3P0STMz2c02Q"}), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/investigatepreview.go b/email_security/investigatepreview.go index a747f4bb367..a9ae4c08e57 100644 --- a/email_security/investigatepreview.go +++ b/email_security/investigatepreview.go @@ -3,7 +3,17 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigatePreviewService contains methods and other services that help with @@ -24,3 +34,156 @@ func NewInvestigatePreviewService(opts ...option.RequestOption) (r *InvestigateP r.Options = opts return } + +// Preview for non-detection messages +func (r *InvestigatePreviewService) New(ctx context.Context, params InvestigatePreviewNewParams, opts ...option.RequestOption) (res *InvestigatePreviewNewResponse, err error) { + var env InvestigatePreviewNewResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/preview", params.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Returns a preview of the message body as a base64 encoded PNG image for +// non-benign messages. +func (r *InvestigatePreviewService) Get(ctx context.Context, postfixID string, query InvestigatePreviewGetParams, opts ...option.RequestOption) (res *InvestigatePreviewGetResponse, err error) { + var env InvestigatePreviewGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if postfixID == "" { + err = errors.New("missing required postfix_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/preview", query.AccountID, postfixID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type InvestigatePreviewNewResponse struct { + // A base64 encoded PNG image of the email. + Screenshot string `json:"screenshot,required"` + JSON investigatePreviewNewResponseJSON `json:"-"` +} + +// investigatePreviewNewResponseJSON contains the JSON metadata for the struct +// [InvestigatePreviewNewResponse] +type investigatePreviewNewResponseJSON struct { + Screenshot apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigatePreviewNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigatePreviewNewResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigatePreviewGetResponse struct { + // A base64 encoded PNG image of the email. + Screenshot string `json:"screenshot,required"` + JSON investigatePreviewGetResponseJSON `json:"-"` +} + +// investigatePreviewGetResponseJSON contains the JSON metadata for the struct +// [InvestigatePreviewGetResponse] +type investigatePreviewGetResponseJSON struct { + Screenshot apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigatePreviewGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigatePreviewGetResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigatePreviewNewParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // The identifier of the message. + PostfixID param.Field[string] `json:"postfix_id,required"` +} + +func (r InvestigatePreviewNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type InvestigatePreviewNewResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result InvestigatePreviewNewResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON investigatePreviewNewResponseEnvelopeJSON `json:"-"` +} + +// investigatePreviewNewResponseEnvelopeJSON contains the JSON metadata for the +// struct [InvestigatePreviewNewResponseEnvelope] +type investigatePreviewNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigatePreviewNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigatePreviewNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type InvestigatePreviewGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type InvestigatePreviewGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result InvestigatePreviewGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON investigatePreviewGetResponseEnvelopeJSON `json:"-"` +} + +// investigatePreviewGetResponseEnvelopeJSON contains the JSON metadata for the +// struct [InvestigatePreviewGetResponseEnvelope] +type investigatePreviewGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigatePreviewGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigatePreviewGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/investigatepreview_test.go b/email_security/investigatepreview_test.go new file mode 100644 index 00000000000..5758440a6fa --- /dev/null +++ b/email_security/investigatepreview_test.go @@ -0,0 +1,70 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestInvestigatePreviewNew(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Preview.New(context.TODO(), email_security.InvestigatePreviewNewParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + PostfixID: cloudflare.F("4Njp3P0STMz2c02Q"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestInvestigatePreviewGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Preview.Get( + context.TODO(), + "4Njp3P0STMz2c02Q", + email_security.InvestigatePreviewGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/investigateraw.go b/email_security/investigateraw.go index 5a45d4e3e64..617214c27be 100644 --- a/email_security/investigateraw.go +++ b/email_security/investigateraw.go @@ -3,7 +3,17 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateRawService contains methods and other services that help with @@ -24,3 +34,78 @@ func NewInvestigateRawService(opts ...option.RequestOption) (r *InvestigateRawSe r.Options = opts return } + +// Returns the raw eml of any non-benign message. +func (r *InvestigateRawService) Get(ctx context.Context, postfixID string, query InvestigateRawGetParams, opts ...option.RequestOption) (res *InvestigateRawGetResponse, err error) { + var env InvestigateRawGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if postfixID == "" { + err = errors.New("missing required postfix_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/raw", query.AccountID, postfixID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type InvestigateRawGetResponse struct { + // A UTF-8 encoded eml file of the email. + Raw string `json:"raw,required"` + JSON investigateRawGetResponseJSON `json:"-"` +} + +// investigateRawGetResponseJSON contains the JSON metadata for the struct +// [InvestigateRawGetResponse] +type investigateRawGetResponseJSON struct { + Raw apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateRawGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateRawGetResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigateRawGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type InvestigateRawGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result InvestigateRawGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON investigateRawGetResponseEnvelopeJSON `json:"-"` +} + +// investigateRawGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [InvestigateRawGetResponseEnvelope] +type investigateRawGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateRawGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateRawGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/investigateraw_test.go b/email_security/investigateraw_test.go new file mode 100644 index 00000000000..5a3dbfe0ae4 --- /dev/null +++ b/email_security/investigateraw_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestInvestigateRawGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Raw.Get( + context.TODO(), + "4Njp3P0STMz2c02Q", + email_security.InvestigateRawGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/investigatereclassify.go b/email_security/investigatereclassify.go index 18347853284..5edde70bb25 100644 --- a/email_security/investigatereclassify.go +++ b/email_security/investigatereclassify.go @@ -3,7 +3,17 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateReclassifyService contains methods and other services that help with @@ -24,3 +34,85 @@ func NewInvestigateReclassifyService(opts ...option.RequestOption) (r *Investiga r.Options = opts return } + +// Change email classfication +func (r *InvestigateReclassifyService) New(ctx context.Context, postfixID string, params InvestigateReclassifyNewParams, opts ...option.RequestOption) (res *InvestigateReclassifyNewResponse, err error) { + var env InvestigateReclassifyNewResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if postfixID == "" { + err = errors.New("missing required postfix_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/reclassify", params.AccountID, postfixID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type InvestigateReclassifyNewResponse = interface{} + +type InvestigateReclassifyNewParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + ExpectedDisposition param.Field[InvestigateReclassifyNewParamsExpectedDisposition] `json:"expected_disposition,required"` + // Base64 encoded content of the EML file + EmlContent param.Field[string] `json:"eml_content"` + EscalatedSubmissionID param.Field[string] `json:"escalated_submission_id"` +} + +func (r InvestigateReclassifyNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type InvestigateReclassifyNewParamsExpectedDisposition string + +const ( + InvestigateReclassifyNewParamsExpectedDispositionNone InvestigateReclassifyNewParamsExpectedDisposition = "NONE" + InvestigateReclassifyNewParamsExpectedDispositionBulk InvestigateReclassifyNewParamsExpectedDisposition = "BULK" + InvestigateReclassifyNewParamsExpectedDispositionMalicious InvestigateReclassifyNewParamsExpectedDisposition = "MALICIOUS" + InvestigateReclassifyNewParamsExpectedDispositionSpam InvestigateReclassifyNewParamsExpectedDisposition = "SPAM" + InvestigateReclassifyNewParamsExpectedDispositionSpoof InvestigateReclassifyNewParamsExpectedDisposition = "SPOOF" + InvestigateReclassifyNewParamsExpectedDispositionSuspicious InvestigateReclassifyNewParamsExpectedDisposition = "SUSPICIOUS" +) + +func (r InvestigateReclassifyNewParamsExpectedDisposition) IsKnown() bool { + switch r { + case InvestigateReclassifyNewParamsExpectedDispositionNone, InvestigateReclassifyNewParamsExpectedDispositionBulk, InvestigateReclassifyNewParamsExpectedDispositionMalicious, InvestigateReclassifyNewParamsExpectedDispositionSpam, InvestigateReclassifyNewParamsExpectedDispositionSpoof, InvestigateReclassifyNewParamsExpectedDispositionSuspicious: + return true + } + return false +} + +type InvestigateReclassifyNewResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result InvestigateReclassifyNewResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON investigateReclassifyNewResponseEnvelopeJSON `json:"-"` +} + +// investigateReclassifyNewResponseEnvelopeJSON contains the JSON metadata for the +// struct [InvestigateReclassifyNewResponseEnvelope] +type investigateReclassifyNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateReclassifyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateReclassifyNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/investigatereclassify_test.go b/email_security/investigatereclassify_test.go new file mode 100644 index 00000000000..3ce85a26db1 --- /dev/null +++ b/email_security/investigatereclassify_test.go @@ -0,0 +1,47 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestInvestigateReclassifyNewWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Reclassify.New( + context.TODO(), + "4Njp3P0STMz2c02Q", + email_security.InvestigateReclassifyNewParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + ExpectedDisposition: cloudflare.F(email_security.InvestigateReclassifyNewParamsExpectedDispositionNone), + EmlContent: cloudflare.F("eml_content"), + EscalatedSubmissionID: cloudflare.F("escalated_submission_id"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/investigaterelease.go b/email_security/investigaterelease.go index 32a37279d07..f63258bb919 100644 --- a/email_security/investigaterelease.go +++ b/email_security/investigaterelease.go @@ -3,7 +3,17 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" ) // InvestigateReleaseService contains methods and other services that help with @@ -24,3 +34,69 @@ func NewInvestigateReleaseService(opts ...option.RequestOption) (r *InvestigateR r.Options = opts return } + +// Release messages from quarantine +func (r *InvestigateReleaseService) Bulk(ctx context.Context, params InvestigateReleaseBulkParams, opts ...option.RequestOption) (res *pagination.SinglePage[InvestigateReleaseBulkResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/release", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Release messages from quarantine +func (r *InvestigateReleaseService) BulkAutoPaging(ctx context.Context, params InvestigateReleaseBulkParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InvestigateReleaseBulkResponse] { + return pagination.NewSinglePageAutoPager(r.Bulk(ctx, params, opts...)) +} + +type InvestigateReleaseBulkResponse struct { + // The identifier of the message. + PostfixID string `json:"postfix_id,required"` + Delivered []string `json:"delivered,nullable"` + Failed []string `json:"failed,nullable"` + Undelivered []string `json:"undelivered,nullable"` + JSON investigateReleaseBulkResponseJSON `json:"-"` +} + +// investigateReleaseBulkResponseJSON contains the JSON metadata for the struct +// [InvestigateReleaseBulkResponse] +type investigateReleaseBulkResponseJSON struct { + PostfixID apijson.Field + Delivered apijson.Field + Failed apijson.Field + Undelivered apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateReleaseBulkResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateReleaseBulkResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigateReleaseBulkParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // A list of messages identfied by their `postfix_id`s that should be released. + Body []string `json:"body,required"` +} + +func (r InvestigateReleaseBulkParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.Body) +} diff --git a/email_security/investigaterelease_test.go b/email_security/investigaterelease_test.go new file mode 100644 index 00000000000..a46eb511d24 --- /dev/null +++ b/email_security/investigaterelease_test.go @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestInvestigateReleaseBulk(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Release.Bulk(context.TODO(), email_security.InvestigateReleaseBulkParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Body: []string{"4Njp3P0STMz2c02Q"}, + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/investigatetrace.go b/email_security/investigatetrace.go index b8b525a385f..62b31290a1b 100644 --- a/email_security/investigatetrace.go +++ b/email_security/investigatetrace.go @@ -3,7 +3,18 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // InvestigateTraceService contains methods and other services that help with @@ -24,3 +35,175 @@ func NewInvestigateTraceService(opts ...option.RequestOption) (r *InvestigateTra r.Options = opts return } + +// Get email trace +func (r *InvestigateTraceService) Get(ctx context.Context, postfixID string, query InvestigateTraceGetParams, opts ...option.RequestOption) (res *InvestigateTraceGetResponse, err error) { + var env InvestigateTraceGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if postfixID == "" { + err = errors.New("missing required postfix_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/investigate/%s/trace", query.AccountID, postfixID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type InvestigateTraceGetResponse struct { + Inbound InvestigateTraceGetResponseInbound `json:"inbound,required"` + Outbound InvestigateTraceGetResponseOutbound `json:"outbound,required"` + JSON investigateTraceGetResponseJSON `json:"-"` +} + +// investigateTraceGetResponseJSON contains the JSON metadata for the struct +// [InvestigateTraceGetResponse] +type investigateTraceGetResponseJSON struct { + Inbound apijson.Field + Outbound apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateTraceGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateTraceGetResponseJSON) RawJSON() string { + return r.raw +} + +type InvestigateTraceGetResponseInbound struct { + Lines []InvestigateTraceGetResponseInboundLine `json:"lines,nullable"` + Pending bool `json:"pending,nullable"` + JSON investigateTraceGetResponseInboundJSON `json:"-"` +} + +// investigateTraceGetResponseInboundJSON contains the JSON metadata for the struct +// [InvestigateTraceGetResponseInbound] +type investigateTraceGetResponseInboundJSON struct { + Lines apijson.Field + Pending apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateTraceGetResponseInbound) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateTraceGetResponseInboundJSON) RawJSON() string { + return r.raw +} + +type InvestigateTraceGetResponseInboundLine struct { + Lineno int64 `json:"lineno,required"` + Message string `json:"message,required"` + Ts time.Time `json:"ts,required" format:"date-time"` + JSON investigateTraceGetResponseInboundLineJSON `json:"-"` +} + +// investigateTraceGetResponseInboundLineJSON contains the JSON metadata for the +// struct [InvestigateTraceGetResponseInboundLine] +type investigateTraceGetResponseInboundLineJSON struct { + Lineno apijson.Field + Message apijson.Field + Ts apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateTraceGetResponseInboundLine) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateTraceGetResponseInboundLineJSON) RawJSON() string { + return r.raw +} + +type InvestigateTraceGetResponseOutbound struct { + Lines []InvestigateTraceGetResponseOutboundLine `json:"lines,nullable"` + Pending bool `json:"pending,nullable"` + JSON investigateTraceGetResponseOutboundJSON `json:"-"` +} + +// investigateTraceGetResponseOutboundJSON contains the JSON metadata for the +// struct [InvestigateTraceGetResponseOutbound] +type investigateTraceGetResponseOutboundJSON struct { + Lines apijson.Field + Pending apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateTraceGetResponseOutbound) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateTraceGetResponseOutboundJSON) RawJSON() string { + return r.raw +} + +type InvestigateTraceGetResponseOutboundLine struct { + Lineno int64 `json:"lineno,required"` + Message string `json:"message,required"` + Ts time.Time `json:"ts,required" format:"date-time"` + JSON investigateTraceGetResponseOutboundLineJSON `json:"-"` +} + +// investigateTraceGetResponseOutboundLineJSON contains the JSON metadata for the +// struct [InvestigateTraceGetResponseOutboundLine] +type investigateTraceGetResponseOutboundLineJSON struct { + Lineno apijson.Field + Message apijson.Field + Ts apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateTraceGetResponseOutboundLine) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateTraceGetResponseOutboundLineJSON) RawJSON() string { + return r.raw +} + +type InvestigateTraceGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type InvestigateTraceGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result InvestigateTraceGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON investigateTraceGetResponseEnvelopeJSON `json:"-"` +} + +// investigateTraceGetResponseEnvelopeJSON contains the JSON metadata for the +// struct [InvestigateTraceGetResponseEnvelope] +type investigateTraceGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *InvestigateTraceGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r investigateTraceGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/investigatetrace_test.go b/email_security/investigatetrace_test.go new file mode 100644 index 00000000000..2a10829143f --- /dev/null +++ b/email_security/investigatetrace_test.go @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestInvestigateTraceGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Investigate.Trace.Get( + context.TODO(), + "4Njp3P0STMz2c02Q", + email_security.InvestigateTraceGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/settingallowpolicy.go b/email_security/settingallowpolicy.go index 71a236d883a..5c84e79faf7 100644 --- a/email_security/settingallowpolicy.go +++ b/email_security/settingallowpolicy.go @@ -3,7 +3,21 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // SettingAllowPolicyService contains methods and other services that help with @@ -24,3 +38,707 @@ func NewSettingAllowPolicyService(opts ...option.RequestOption) (r *SettingAllow r.Options = opts return } + +// Create an email allow policy +func (r *SettingAllowPolicyService) New(ctx context.Context, params SettingAllowPolicyNewParams, opts ...option.RequestOption) (res *SettingAllowPolicyNewResponse, err error) { + var env SettingAllowPolicyNewResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies", params.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Lists, searches, and sorts an account’s email allow policies. +func (r *SettingAllowPolicyService) List(ctx context.Context, params SettingAllowPolicyListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingAllowPolicyListResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Lists, searches, and sorts an account’s email allow policies. +func (r *SettingAllowPolicyService) ListAutoPaging(ctx context.Context, params SettingAllowPolicyListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingAllowPolicyListResponse] { + return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) +} + +// Delete an email allow policy +func (r *SettingAllowPolicyService) Delete(ctx context.Context, policyID int64, body SettingAllowPolicyDeleteParams, opts ...option.RequestOption) (res *SettingAllowPolicyDeleteResponse, err error) { + var env SettingAllowPolicyDeleteResponseEnvelope + opts = slices.Concat(r.Options, opts) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies/%v", body.AccountID, policyID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Update an email allow policy +func (r *SettingAllowPolicyService) Edit(ctx context.Context, policyID int64, params SettingAllowPolicyEditParams, opts ...option.RequestOption) (res *SettingAllowPolicyEditResponse, err error) { + var env SettingAllowPolicyEditResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies/%v", params.AccountID, policyID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Get an email allow policy +func (r *SettingAllowPolicyService) Get(ctx context.Context, policyID int64, query SettingAllowPolicyGetParams, opts ...option.RequestOption) (res *SettingAllowPolicyGetResponse, err error) { + var env SettingAllowPolicyGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/allow_policies/%v", query.AccountID, policyID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type SettingAllowPolicyNewResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // Messages from this sender will be exempted from Spam, Spoof and Bulk + // dispositions. Note: This will not exempt messages with Malicious or Suspicious + // dispositions. + IsAcceptableSender bool `json:"is_acceptable_sender,required"` + // Messages to this recipient will bypass all detections. + IsExemptRecipient bool `json:"is_exempt_recipient,required"` + IsRegex bool `json:"is_regex,required"` + // Messages from this sender will bypass all detections and link following. + IsTrustedSender bool `json:"is_trusted_sender,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + PatternType SettingAllowPolicyNewResponsePatternType `json:"pattern_type,required"` + // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors + // policies that pass authentication. + VerifySender bool `json:"verify_sender,required"` + Comments string `json:"comments,nullable"` + // Deprecated: deprecated + IsRecipient bool `json:"is_recipient"` + // Deprecated: deprecated + IsSender bool `json:"is_sender"` + // Deprecated: deprecated + IsSpoof bool `json:"is_spoof"` + JSON settingAllowPolicyNewResponseJSON `json:"-"` +} + +// settingAllowPolicyNewResponseJSON contains the JSON metadata for the struct +// [SettingAllowPolicyNewResponse] +type settingAllowPolicyNewResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsAcceptableSender apijson.Field + IsExemptRecipient apijson.Field + IsRegex apijson.Field + IsTrustedSender apijson.Field + LastModified apijson.Field + Pattern apijson.Field + PatternType apijson.Field + VerifySender apijson.Field + Comments apijson.Field + IsRecipient apijson.Field + IsSender apijson.Field + IsSpoof apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingAllowPolicyNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingAllowPolicyNewResponseJSON) RawJSON() string { + return r.raw +} + +type SettingAllowPolicyNewResponsePatternType string + +const ( + SettingAllowPolicyNewResponsePatternTypeEmail SettingAllowPolicyNewResponsePatternType = "EMAIL" + SettingAllowPolicyNewResponsePatternTypeDomain SettingAllowPolicyNewResponsePatternType = "DOMAIN" + SettingAllowPolicyNewResponsePatternTypeIP SettingAllowPolicyNewResponsePatternType = "IP" + SettingAllowPolicyNewResponsePatternTypeUnknown SettingAllowPolicyNewResponsePatternType = "UNKNOWN" +) + +func (r SettingAllowPolicyNewResponsePatternType) IsKnown() bool { + switch r { + case SettingAllowPolicyNewResponsePatternTypeEmail, SettingAllowPolicyNewResponsePatternTypeDomain, SettingAllowPolicyNewResponsePatternTypeIP, SettingAllowPolicyNewResponsePatternTypeUnknown: + return true + } + return false +} + +type SettingAllowPolicyListResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // Messages from this sender will be exempted from Spam, Spoof and Bulk + // dispositions. Note: This will not exempt messages with Malicious or Suspicious + // dispositions. + IsAcceptableSender bool `json:"is_acceptable_sender,required"` + // Messages to this recipient will bypass all detections. + IsExemptRecipient bool `json:"is_exempt_recipient,required"` + IsRegex bool `json:"is_regex,required"` + // Messages from this sender will bypass all detections and link following. + IsTrustedSender bool `json:"is_trusted_sender,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + PatternType SettingAllowPolicyListResponsePatternType `json:"pattern_type,required"` + // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors + // policies that pass authentication. + VerifySender bool `json:"verify_sender,required"` + Comments string `json:"comments,nullable"` + // Deprecated: deprecated + IsRecipient bool `json:"is_recipient"` + // Deprecated: deprecated + IsSender bool `json:"is_sender"` + // Deprecated: deprecated + IsSpoof bool `json:"is_spoof"` + JSON settingAllowPolicyListResponseJSON `json:"-"` +} + +// settingAllowPolicyListResponseJSON contains the JSON metadata for the struct +// [SettingAllowPolicyListResponse] +type settingAllowPolicyListResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsAcceptableSender apijson.Field + IsExemptRecipient apijson.Field + IsRegex apijson.Field + IsTrustedSender apijson.Field + LastModified apijson.Field + Pattern apijson.Field + PatternType apijson.Field + VerifySender apijson.Field + Comments apijson.Field + IsRecipient apijson.Field + IsSender apijson.Field + IsSpoof apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingAllowPolicyListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingAllowPolicyListResponseJSON) RawJSON() string { + return r.raw +} + +type SettingAllowPolicyListResponsePatternType string + +const ( + SettingAllowPolicyListResponsePatternTypeEmail SettingAllowPolicyListResponsePatternType = "EMAIL" + SettingAllowPolicyListResponsePatternTypeDomain SettingAllowPolicyListResponsePatternType = "DOMAIN" + SettingAllowPolicyListResponsePatternTypeIP SettingAllowPolicyListResponsePatternType = "IP" + SettingAllowPolicyListResponsePatternTypeUnknown SettingAllowPolicyListResponsePatternType = "UNKNOWN" +) + +func (r SettingAllowPolicyListResponsePatternType) IsKnown() bool { + switch r { + case SettingAllowPolicyListResponsePatternTypeEmail, SettingAllowPolicyListResponsePatternTypeDomain, SettingAllowPolicyListResponsePatternTypeIP, SettingAllowPolicyListResponsePatternTypeUnknown: + return true + } + return false +} + +type SettingAllowPolicyDeleteResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + JSON settingAllowPolicyDeleteResponseJSON `json:"-"` +} + +// settingAllowPolicyDeleteResponseJSON contains the JSON metadata for the struct +// [SettingAllowPolicyDeleteResponse] +type settingAllowPolicyDeleteResponseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingAllowPolicyDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingAllowPolicyDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type SettingAllowPolicyEditResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // Messages from this sender will be exempted from Spam, Spoof and Bulk + // dispositions. Note: This will not exempt messages with Malicious or Suspicious + // dispositions. + IsAcceptableSender bool `json:"is_acceptable_sender,required"` + // Messages to this recipient will bypass all detections. + IsExemptRecipient bool `json:"is_exempt_recipient,required"` + IsRegex bool `json:"is_regex,required"` + // Messages from this sender will bypass all detections and link following. + IsTrustedSender bool `json:"is_trusted_sender,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + PatternType SettingAllowPolicyEditResponsePatternType `json:"pattern_type,required"` + // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors + // policies that pass authentication. + VerifySender bool `json:"verify_sender,required"` + Comments string `json:"comments,nullable"` + // Deprecated: deprecated + IsRecipient bool `json:"is_recipient"` + // Deprecated: deprecated + IsSender bool `json:"is_sender"` + // Deprecated: deprecated + IsSpoof bool `json:"is_spoof"` + JSON settingAllowPolicyEditResponseJSON `json:"-"` +} + +// settingAllowPolicyEditResponseJSON contains the JSON metadata for the struct +// [SettingAllowPolicyEditResponse] +type settingAllowPolicyEditResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsAcceptableSender apijson.Field + IsExemptRecipient apijson.Field + IsRegex apijson.Field + IsTrustedSender apijson.Field + LastModified apijson.Field + Pattern apijson.Field + PatternType apijson.Field + VerifySender apijson.Field + Comments apijson.Field + IsRecipient apijson.Field + IsSender apijson.Field + IsSpoof apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingAllowPolicyEditResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingAllowPolicyEditResponseJSON) RawJSON() string { + return r.raw +} + +type SettingAllowPolicyEditResponsePatternType string + +const ( + SettingAllowPolicyEditResponsePatternTypeEmail SettingAllowPolicyEditResponsePatternType = "EMAIL" + SettingAllowPolicyEditResponsePatternTypeDomain SettingAllowPolicyEditResponsePatternType = "DOMAIN" + SettingAllowPolicyEditResponsePatternTypeIP SettingAllowPolicyEditResponsePatternType = "IP" + SettingAllowPolicyEditResponsePatternTypeUnknown SettingAllowPolicyEditResponsePatternType = "UNKNOWN" +) + +func (r SettingAllowPolicyEditResponsePatternType) IsKnown() bool { + switch r { + case SettingAllowPolicyEditResponsePatternTypeEmail, SettingAllowPolicyEditResponsePatternTypeDomain, SettingAllowPolicyEditResponsePatternTypeIP, SettingAllowPolicyEditResponsePatternTypeUnknown: + return true + } + return false +} + +type SettingAllowPolicyGetResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // Messages from this sender will be exempted from Spam, Spoof and Bulk + // dispositions. Note: This will not exempt messages with Malicious or Suspicious + // dispositions. + IsAcceptableSender bool `json:"is_acceptable_sender,required"` + // Messages to this recipient will bypass all detections. + IsExemptRecipient bool `json:"is_exempt_recipient,required"` + IsRegex bool `json:"is_regex,required"` + // Messages from this sender will bypass all detections and link following. + IsTrustedSender bool `json:"is_trusted_sender,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + PatternType SettingAllowPolicyGetResponsePatternType `json:"pattern_type,required"` + // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors + // policies that pass authentication. + VerifySender bool `json:"verify_sender,required"` + Comments string `json:"comments,nullable"` + // Deprecated: deprecated + IsRecipient bool `json:"is_recipient"` + // Deprecated: deprecated + IsSender bool `json:"is_sender"` + // Deprecated: deprecated + IsSpoof bool `json:"is_spoof"` + JSON settingAllowPolicyGetResponseJSON `json:"-"` +} + +// settingAllowPolicyGetResponseJSON contains the JSON metadata for the struct +// [SettingAllowPolicyGetResponse] +type settingAllowPolicyGetResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsAcceptableSender apijson.Field + IsExemptRecipient apijson.Field + IsRegex apijson.Field + IsTrustedSender apijson.Field + LastModified apijson.Field + Pattern apijson.Field + PatternType apijson.Field + VerifySender apijson.Field + Comments apijson.Field + IsRecipient apijson.Field + IsSender apijson.Field + IsSpoof apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingAllowPolicyGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingAllowPolicyGetResponseJSON) RawJSON() string { + return r.raw +} + +type SettingAllowPolicyGetResponsePatternType string + +const ( + SettingAllowPolicyGetResponsePatternTypeEmail SettingAllowPolicyGetResponsePatternType = "EMAIL" + SettingAllowPolicyGetResponsePatternTypeDomain SettingAllowPolicyGetResponsePatternType = "DOMAIN" + SettingAllowPolicyGetResponsePatternTypeIP SettingAllowPolicyGetResponsePatternType = "IP" + SettingAllowPolicyGetResponsePatternTypeUnknown SettingAllowPolicyGetResponsePatternType = "UNKNOWN" +) + +func (r SettingAllowPolicyGetResponsePatternType) IsKnown() bool { + switch r { + case SettingAllowPolicyGetResponsePatternTypeEmail, SettingAllowPolicyGetResponsePatternTypeDomain, SettingAllowPolicyGetResponsePatternTypeIP, SettingAllowPolicyGetResponsePatternTypeUnknown: + return true + } + return false +} + +type SettingAllowPolicyNewParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // Messages from this sender will be exempted from Spam, Spoof and Bulk + // dispositions. Note: This will not exempt messages with Malicious or Suspicious + // dispositions. + IsAcceptableSender param.Field[bool] `json:"is_acceptable_sender,required"` + // Messages to this recipient will bypass all detections. + IsExemptRecipient param.Field[bool] `json:"is_exempt_recipient,required"` + IsRegex param.Field[bool] `json:"is_regex,required"` + // Messages from this sender will bypass all detections and link following. + IsTrustedSender param.Field[bool] `json:"is_trusted_sender,required"` + Pattern param.Field[string] `json:"pattern,required"` + PatternType param.Field[SettingAllowPolicyNewParamsPatternType] `json:"pattern_type,required"` + // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors + // policies that pass authentication. + VerifySender param.Field[bool] `json:"verify_sender,required"` + Comments param.Field[string] `json:"comments"` + IsRecipient param.Field[bool] `json:"is_recipient"` + IsSender param.Field[bool] `json:"is_sender"` + IsSpoof param.Field[bool] `json:"is_spoof"` +} + +func (r SettingAllowPolicyNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SettingAllowPolicyNewParamsPatternType string + +const ( + SettingAllowPolicyNewParamsPatternTypeEmail SettingAllowPolicyNewParamsPatternType = "EMAIL" + SettingAllowPolicyNewParamsPatternTypeDomain SettingAllowPolicyNewParamsPatternType = "DOMAIN" + SettingAllowPolicyNewParamsPatternTypeIP SettingAllowPolicyNewParamsPatternType = "IP" + SettingAllowPolicyNewParamsPatternTypeUnknown SettingAllowPolicyNewParamsPatternType = "UNKNOWN" +) + +func (r SettingAllowPolicyNewParamsPatternType) IsKnown() bool { + switch r { + case SettingAllowPolicyNewParamsPatternTypeEmail, SettingAllowPolicyNewParamsPatternTypeDomain, SettingAllowPolicyNewParamsPatternTypeIP, SettingAllowPolicyNewParamsPatternTypeUnknown: + return true + } + return false +} + +type SettingAllowPolicyNewResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingAllowPolicyNewResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingAllowPolicyNewResponseEnvelopeJSON `json:"-"` +} + +// settingAllowPolicyNewResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingAllowPolicyNewResponseEnvelope] +type settingAllowPolicyNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingAllowPolicyNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingAllowPolicyNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingAllowPolicyListParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // The sorting direction. + Direction param.Field[SettingAllowPolicyListParamsDirection] `query:"direction"` + IsAcceptableSender param.Field[bool] `query:"is_acceptable_sender"` + IsExemptRecipient param.Field[bool] `query:"is_exempt_recipient"` + IsRecipient param.Field[bool] `query:"is_recipient"` + IsSender param.Field[bool] `query:"is_sender"` + IsSpoof param.Field[bool] `query:"is_spoof"` + IsTrustedSender param.Field[bool] `query:"is_trusted_sender"` + // The field to sort by. + Order param.Field[SettingAllowPolicyListParamsOrder] `query:"order"` + // The page number of paginated results. + Page param.Field[int64] `query:"page"` + Pattern param.Field[string] `query:"pattern"` + PatternType param.Field[SettingAllowPolicyListParamsPatternType] `query:"pattern_type"` + // The number of results per page. + PerPage param.Field[int64] `query:"per_page"` + // Allows searching in multiple properties of a record simultaneously. This + // parameter is intended for human users, not automation. Its exact behavior is + // intentionally left unspecified and is subject to change in the future. + Search param.Field[string] `query:"search"` + VerifySender param.Field[bool] `query:"verify_sender"` +} + +// URLQuery serializes [SettingAllowPolicyListParams]'s query parameters as +// `url.Values`. +func (r SettingAllowPolicyListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + +// The sorting direction. +type SettingAllowPolicyListParamsDirection string + +const ( + SettingAllowPolicyListParamsDirectionAsc SettingAllowPolicyListParamsDirection = "asc" + SettingAllowPolicyListParamsDirectionDesc SettingAllowPolicyListParamsDirection = "desc" +) + +func (r SettingAllowPolicyListParamsDirection) IsKnown() bool { + switch r { + case SettingAllowPolicyListParamsDirectionAsc, SettingAllowPolicyListParamsDirectionDesc: + return true + } + return false +} + +// The field to sort by. +type SettingAllowPolicyListParamsOrder string + +const ( + SettingAllowPolicyListParamsOrderPattern SettingAllowPolicyListParamsOrder = "pattern" + SettingAllowPolicyListParamsOrderCreatedAt SettingAllowPolicyListParamsOrder = "created_at" +) + +func (r SettingAllowPolicyListParamsOrder) IsKnown() bool { + switch r { + case SettingAllowPolicyListParamsOrderPattern, SettingAllowPolicyListParamsOrderCreatedAt: + return true + } + return false +} + +type SettingAllowPolicyListParamsPatternType string + +const ( + SettingAllowPolicyListParamsPatternTypeEmail SettingAllowPolicyListParamsPatternType = "EMAIL" + SettingAllowPolicyListParamsPatternTypeDomain SettingAllowPolicyListParamsPatternType = "DOMAIN" + SettingAllowPolicyListParamsPatternTypeIP SettingAllowPolicyListParamsPatternType = "IP" + SettingAllowPolicyListParamsPatternTypeUnknown SettingAllowPolicyListParamsPatternType = "UNKNOWN" +) + +func (r SettingAllowPolicyListParamsPatternType) IsKnown() bool { + switch r { + case SettingAllowPolicyListParamsPatternTypeEmail, SettingAllowPolicyListParamsPatternTypeDomain, SettingAllowPolicyListParamsPatternTypeIP, SettingAllowPolicyListParamsPatternTypeUnknown: + return true + } + return false +} + +type SettingAllowPolicyDeleteParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingAllowPolicyDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingAllowPolicyDeleteResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingAllowPolicyDeleteResponseEnvelopeJSON `json:"-"` +} + +// settingAllowPolicyDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingAllowPolicyDeleteResponseEnvelope] +type settingAllowPolicyDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingAllowPolicyDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingAllowPolicyDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingAllowPolicyEditParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + Comments param.Field[string] `json:"comments"` + // Messages from this sender will be exempted from Spam, Spoof and Bulk + // dispositions. Note: This will not exempt messages with Malicious or Suspicious + // dispositions. + IsAcceptableSender param.Field[bool] `json:"is_acceptable_sender"` + // Messages to this recipient will bypass all detections. + IsExemptRecipient param.Field[bool] `json:"is_exempt_recipient"` + IsRegex param.Field[bool] `json:"is_regex"` + // Messages from this sender will bypass all detections and link following. + IsTrustedSender param.Field[bool] `json:"is_trusted_sender"` + Pattern param.Field[string] `json:"pattern"` + PatternType param.Field[SettingAllowPolicyEditParamsPatternType] `json:"pattern_type"` + // Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors + // policies that pass authentication. + VerifySender param.Field[bool] `json:"verify_sender"` +} + +func (r SettingAllowPolicyEditParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SettingAllowPolicyEditParamsPatternType string + +const ( + SettingAllowPolicyEditParamsPatternTypeEmail SettingAllowPolicyEditParamsPatternType = "EMAIL" + SettingAllowPolicyEditParamsPatternTypeDomain SettingAllowPolicyEditParamsPatternType = "DOMAIN" + SettingAllowPolicyEditParamsPatternTypeIP SettingAllowPolicyEditParamsPatternType = "IP" + SettingAllowPolicyEditParamsPatternTypeUnknown SettingAllowPolicyEditParamsPatternType = "UNKNOWN" +) + +func (r SettingAllowPolicyEditParamsPatternType) IsKnown() bool { + switch r { + case SettingAllowPolicyEditParamsPatternTypeEmail, SettingAllowPolicyEditParamsPatternTypeDomain, SettingAllowPolicyEditParamsPatternTypeIP, SettingAllowPolicyEditParamsPatternTypeUnknown: + return true + } + return false +} + +type SettingAllowPolicyEditResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingAllowPolicyEditResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingAllowPolicyEditResponseEnvelopeJSON `json:"-"` +} + +// settingAllowPolicyEditResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingAllowPolicyEditResponseEnvelope] +type settingAllowPolicyEditResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingAllowPolicyEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingAllowPolicyEditResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingAllowPolicyGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingAllowPolicyGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingAllowPolicyGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingAllowPolicyGetResponseEnvelopeJSON `json:"-"` +} + +// settingAllowPolicyGetResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingAllowPolicyGetResponseEnvelope] +type settingAllowPolicyGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingAllowPolicyGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingAllowPolicyGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/settingallowpolicy_test.go b/email_security/settingallowpolicy_test.go new file mode 100644 index 00000000000..6612d8ef990 --- /dev/null +++ b/email_security/settingallowpolicy_test.go @@ -0,0 +1,185 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestSettingAllowPolicyNewWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.AllowPolicies.New(context.TODO(), email_security.SettingAllowPolicyNewParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + IsAcceptableSender: cloudflare.F(false), + IsExemptRecipient: cloudflare.F(false), + IsRegex: cloudflare.F(false), + IsTrustedSender: cloudflare.F(true), + Pattern: cloudflare.F("test@example.com"), + PatternType: cloudflare.F(email_security.SettingAllowPolicyNewParamsPatternTypeEmail), + VerifySender: cloudflare.F(true), + Comments: cloudflare.F("Trust all messages send from test@example.com"), + IsRecipient: cloudflare.F(false), + IsSender: cloudflare.F(true), + IsSpoof: cloudflare.F(false), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingAllowPolicyListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.AllowPolicies.List(context.TODO(), email_security.SettingAllowPolicyListParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Direction: cloudflare.F(email_security.SettingAllowPolicyListParamsDirectionAsc), + IsAcceptableSender: cloudflare.F(true), + IsExemptRecipient: cloudflare.F(true), + IsRecipient: cloudflare.F(true), + IsSender: cloudflare.F(true), + IsSpoof: cloudflare.F(true), + IsTrustedSender: cloudflare.F(true), + Order: cloudflare.F(email_security.SettingAllowPolicyListParamsOrderPattern), + Page: cloudflare.F(int64(1)), + Pattern: cloudflare.F("pattern"), + PatternType: cloudflare.F(email_security.SettingAllowPolicyListParamsPatternTypeEmail), + PerPage: cloudflare.F(int64(1)), + Search: cloudflare.F("search"), + VerifySender: cloudflare.F(true), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingAllowPolicyDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.AllowPolicies.Delete( + context.TODO(), + int64(2401), + email_security.SettingAllowPolicyDeleteParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingAllowPolicyEditWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.AllowPolicies.Edit( + context.TODO(), + int64(2401), + email_security.SettingAllowPolicyEditParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Comments: cloudflare.F("comments"), + IsAcceptableSender: cloudflare.F(true), + IsExemptRecipient: cloudflare.F(true), + IsRegex: cloudflare.F(true), + IsTrustedSender: cloudflare.F(true), + Pattern: cloudflare.F("x"), + PatternType: cloudflare.F(email_security.SettingAllowPolicyEditParamsPatternTypeEmail), + VerifySender: cloudflare.F(true), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingAllowPolicyGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.AllowPolicies.Get( + context.TODO(), + int64(2401), + email_security.SettingAllowPolicyGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/settingblocksender.go b/email_security/settingblocksender.go index 309d8a71f67..108a88091ce 100644 --- a/email_security/settingblocksender.go +++ b/email_security/settingblocksender.go @@ -3,7 +3,21 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // SettingBlockSenderService contains methods and other services that help with @@ -24,3 +38,579 @@ func NewSettingBlockSenderService(opts ...option.RequestOption) (r *SettingBlock r.Options = opts return } + +// Create a blocked email sender +func (r *SettingBlockSenderService) New(ctx context.Context, params SettingBlockSenderNewParams, opts ...option.RequestOption) (res *SettingBlockSenderNewResponse, err error) { + var env SettingBlockSenderNewResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders", params.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// List blocked email senders +func (r *SettingBlockSenderService) List(ctx context.Context, params SettingBlockSenderListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingBlockSenderListResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// List blocked email senders +func (r *SettingBlockSenderService) ListAutoPaging(ctx context.Context, params SettingBlockSenderListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingBlockSenderListResponse] { + return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) +} + +// Delete a blocked email sender +func (r *SettingBlockSenderService) Delete(ctx context.Context, patternID int64, body SettingBlockSenderDeleteParams, opts ...option.RequestOption) (res *SettingBlockSenderDeleteResponse, err error) { + var env SettingBlockSenderDeleteResponseEnvelope + opts = slices.Concat(r.Options, opts) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders/%v", body.AccountID, patternID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Update a blocked email sender +func (r *SettingBlockSenderService) Edit(ctx context.Context, patternID int64, params SettingBlockSenderEditParams, opts ...option.RequestOption) (res *SettingBlockSenderEditResponse, err error) { + var env SettingBlockSenderEditResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders/%v", params.AccountID, patternID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Get a blocked email sender +func (r *SettingBlockSenderService) Get(ctx context.Context, patternID int64, query SettingBlockSenderGetParams, opts ...option.RequestOption) (res *SettingBlockSenderGetResponse, err error) { + var env SettingBlockSenderGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/block_senders/%v", query.AccountID, patternID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type SettingBlockSenderNewResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + IsRegex bool `json:"is_regex,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + PatternType SettingBlockSenderNewResponsePatternType `json:"pattern_type,required"` + Comments string `json:"comments,nullable"` + JSON settingBlockSenderNewResponseJSON `json:"-"` +} + +// settingBlockSenderNewResponseJSON contains the JSON metadata for the struct +// [SettingBlockSenderNewResponse] +type settingBlockSenderNewResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsRegex apijson.Field + LastModified apijson.Field + Pattern apijson.Field + PatternType apijson.Field + Comments apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingBlockSenderNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingBlockSenderNewResponseJSON) RawJSON() string { + return r.raw +} + +type SettingBlockSenderNewResponsePatternType string + +const ( + SettingBlockSenderNewResponsePatternTypeEmail SettingBlockSenderNewResponsePatternType = "EMAIL" + SettingBlockSenderNewResponsePatternTypeDomain SettingBlockSenderNewResponsePatternType = "DOMAIN" + SettingBlockSenderNewResponsePatternTypeIP SettingBlockSenderNewResponsePatternType = "IP" + SettingBlockSenderNewResponsePatternTypeUnknown SettingBlockSenderNewResponsePatternType = "UNKNOWN" +) + +func (r SettingBlockSenderNewResponsePatternType) IsKnown() bool { + switch r { + case SettingBlockSenderNewResponsePatternTypeEmail, SettingBlockSenderNewResponsePatternTypeDomain, SettingBlockSenderNewResponsePatternTypeIP, SettingBlockSenderNewResponsePatternTypeUnknown: + return true + } + return false +} + +type SettingBlockSenderListResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + IsRegex bool `json:"is_regex,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + PatternType SettingBlockSenderListResponsePatternType `json:"pattern_type,required"` + Comments string `json:"comments,nullable"` + JSON settingBlockSenderListResponseJSON `json:"-"` +} + +// settingBlockSenderListResponseJSON contains the JSON metadata for the struct +// [SettingBlockSenderListResponse] +type settingBlockSenderListResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsRegex apijson.Field + LastModified apijson.Field + Pattern apijson.Field + PatternType apijson.Field + Comments apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingBlockSenderListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingBlockSenderListResponseJSON) RawJSON() string { + return r.raw +} + +type SettingBlockSenderListResponsePatternType string + +const ( + SettingBlockSenderListResponsePatternTypeEmail SettingBlockSenderListResponsePatternType = "EMAIL" + SettingBlockSenderListResponsePatternTypeDomain SettingBlockSenderListResponsePatternType = "DOMAIN" + SettingBlockSenderListResponsePatternTypeIP SettingBlockSenderListResponsePatternType = "IP" + SettingBlockSenderListResponsePatternTypeUnknown SettingBlockSenderListResponsePatternType = "UNKNOWN" +) + +func (r SettingBlockSenderListResponsePatternType) IsKnown() bool { + switch r { + case SettingBlockSenderListResponsePatternTypeEmail, SettingBlockSenderListResponsePatternTypeDomain, SettingBlockSenderListResponsePatternTypeIP, SettingBlockSenderListResponsePatternTypeUnknown: + return true + } + return false +} + +type SettingBlockSenderDeleteResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + JSON settingBlockSenderDeleteResponseJSON `json:"-"` +} + +// settingBlockSenderDeleteResponseJSON contains the JSON metadata for the struct +// [SettingBlockSenderDeleteResponse] +type settingBlockSenderDeleteResponseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingBlockSenderDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingBlockSenderDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type SettingBlockSenderEditResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + IsRegex bool `json:"is_regex,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + PatternType SettingBlockSenderEditResponsePatternType `json:"pattern_type,required"` + Comments string `json:"comments,nullable"` + JSON settingBlockSenderEditResponseJSON `json:"-"` +} + +// settingBlockSenderEditResponseJSON contains the JSON metadata for the struct +// [SettingBlockSenderEditResponse] +type settingBlockSenderEditResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsRegex apijson.Field + LastModified apijson.Field + Pattern apijson.Field + PatternType apijson.Field + Comments apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingBlockSenderEditResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingBlockSenderEditResponseJSON) RawJSON() string { + return r.raw +} + +type SettingBlockSenderEditResponsePatternType string + +const ( + SettingBlockSenderEditResponsePatternTypeEmail SettingBlockSenderEditResponsePatternType = "EMAIL" + SettingBlockSenderEditResponsePatternTypeDomain SettingBlockSenderEditResponsePatternType = "DOMAIN" + SettingBlockSenderEditResponsePatternTypeIP SettingBlockSenderEditResponsePatternType = "IP" + SettingBlockSenderEditResponsePatternTypeUnknown SettingBlockSenderEditResponsePatternType = "UNKNOWN" +) + +func (r SettingBlockSenderEditResponsePatternType) IsKnown() bool { + switch r { + case SettingBlockSenderEditResponsePatternTypeEmail, SettingBlockSenderEditResponsePatternTypeDomain, SettingBlockSenderEditResponsePatternTypeIP, SettingBlockSenderEditResponsePatternTypeUnknown: + return true + } + return false +} + +type SettingBlockSenderGetResponse struct { + // The unique identifier for the allow policy. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + IsRegex bool `json:"is_regex,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + PatternType SettingBlockSenderGetResponsePatternType `json:"pattern_type,required"` + Comments string `json:"comments,nullable"` + JSON settingBlockSenderGetResponseJSON `json:"-"` +} + +// settingBlockSenderGetResponseJSON contains the JSON metadata for the struct +// [SettingBlockSenderGetResponse] +type settingBlockSenderGetResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsRegex apijson.Field + LastModified apijson.Field + Pattern apijson.Field + PatternType apijson.Field + Comments apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingBlockSenderGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingBlockSenderGetResponseJSON) RawJSON() string { + return r.raw +} + +type SettingBlockSenderGetResponsePatternType string + +const ( + SettingBlockSenderGetResponsePatternTypeEmail SettingBlockSenderGetResponsePatternType = "EMAIL" + SettingBlockSenderGetResponsePatternTypeDomain SettingBlockSenderGetResponsePatternType = "DOMAIN" + SettingBlockSenderGetResponsePatternTypeIP SettingBlockSenderGetResponsePatternType = "IP" + SettingBlockSenderGetResponsePatternTypeUnknown SettingBlockSenderGetResponsePatternType = "UNKNOWN" +) + +func (r SettingBlockSenderGetResponsePatternType) IsKnown() bool { + switch r { + case SettingBlockSenderGetResponsePatternTypeEmail, SettingBlockSenderGetResponsePatternTypeDomain, SettingBlockSenderGetResponsePatternTypeIP, SettingBlockSenderGetResponsePatternTypeUnknown: + return true + } + return false +} + +type SettingBlockSenderNewParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + IsRegex param.Field[bool] `json:"is_regex,required"` + Pattern param.Field[string] `json:"pattern,required"` + PatternType param.Field[SettingBlockSenderNewParamsPatternType] `json:"pattern_type,required"` + Comments param.Field[string] `json:"comments"` +} + +func (r SettingBlockSenderNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SettingBlockSenderNewParamsPatternType string + +const ( + SettingBlockSenderNewParamsPatternTypeEmail SettingBlockSenderNewParamsPatternType = "EMAIL" + SettingBlockSenderNewParamsPatternTypeDomain SettingBlockSenderNewParamsPatternType = "DOMAIN" + SettingBlockSenderNewParamsPatternTypeIP SettingBlockSenderNewParamsPatternType = "IP" + SettingBlockSenderNewParamsPatternTypeUnknown SettingBlockSenderNewParamsPatternType = "UNKNOWN" +) + +func (r SettingBlockSenderNewParamsPatternType) IsKnown() bool { + switch r { + case SettingBlockSenderNewParamsPatternTypeEmail, SettingBlockSenderNewParamsPatternTypeDomain, SettingBlockSenderNewParamsPatternTypeIP, SettingBlockSenderNewParamsPatternTypeUnknown: + return true + } + return false +} + +type SettingBlockSenderNewResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingBlockSenderNewResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingBlockSenderNewResponseEnvelopeJSON `json:"-"` +} + +// settingBlockSenderNewResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingBlockSenderNewResponseEnvelope] +type settingBlockSenderNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingBlockSenderNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingBlockSenderNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingBlockSenderListParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // The sorting direction. + Direction param.Field[SettingBlockSenderListParamsDirection] `query:"direction"` + // The field to sort by. + Order param.Field[SettingBlockSenderListParamsOrder] `query:"order"` + // The page number of paginated results. + Page param.Field[int64] `query:"page"` + Pattern param.Field[string] `query:"pattern"` + PatternType param.Field[SettingBlockSenderListParamsPatternType] `query:"pattern_type"` + // The number of results per page. + PerPage param.Field[int64] `query:"per_page"` + // Allows searching in multiple properties of a record simultaneously. This + // parameter is intended for human users, not automation. Its exact behavior is + // intentionally left unspecified and is subject to change in the future. + Search param.Field[string] `query:"search"` +} + +// URLQuery serializes [SettingBlockSenderListParams]'s query parameters as +// `url.Values`. +func (r SettingBlockSenderListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + +// The sorting direction. +type SettingBlockSenderListParamsDirection string + +const ( + SettingBlockSenderListParamsDirectionAsc SettingBlockSenderListParamsDirection = "asc" + SettingBlockSenderListParamsDirectionDesc SettingBlockSenderListParamsDirection = "desc" +) + +func (r SettingBlockSenderListParamsDirection) IsKnown() bool { + switch r { + case SettingBlockSenderListParamsDirectionAsc, SettingBlockSenderListParamsDirectionDesc: + return true + } + return false +} + +// The field to sort by. +type SettingBlockSenderListParamsOrder string + +const ( + SettingBlockSenderListParamsOrderPattern SettingBlockSenderListParamsOrder = "pattern" + SettingBlockSenderListParamsOrderCreatedAt SettingBlockSenderListParamsOrder = "created_at" +) + +func (r SettingBlockSenderListParamsOrder) IsKnown() bool { + switch r { + case SettingBlockSenderListParamsOrderPattern, SettingBlockSenderListParamsOrderCreatedAt: + return true + } + return false +} + +type SettingBlockSenderListParamsPatternType string + +const ( + SettingBlockSenderListParamsPatternTypeEmail SettingBlockSenderListParamsPatternType = "EMAIL" + SettingBlockSenderListParamsPatternTypeDomain SettingBlockSenderListParamsPatternType = "DOMAIN" + SettingBlockSenderListParamsPatternTypeIP SettingBlockSenderListParamsPatternType = "IP" + SettingBlockSenderListParamsPatternTypeUnknown SettingBlockSenderListParamsPatternType = "UNKNOWN" +) + +func (r SettingBlockSenderListParamsPatternType) IsKnown() bool { + switch r { + case SettingBlockSenderListParamsPatternTypeEmail, SettingBlockSenderListParamsPatternTypeDomain, SettingBlockSenderListParamsPatternTypeIP, SettingBlockSenderListParamsPatternTypeUnknown: + return true + } + return false +} + +type SettingBlockSenderDeleteParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingBlockSenderDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingBlockSenderDeleteResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingBlockSenderDeleteResponseEnvelopeJSON `json:"-"` +} + +// settingBlockSenderDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingBlockSenderDeleteResponseEnvelope] +type settingBlockSenderDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingBlockSenderDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingBlockSenderDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingBlockSenderEditParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + Comments param.Field[string] `json:"comments"` + IsRegex param.Field[bool] `json:"is_regex"` + Pattern param.Field[string] `json:"pattern"` + PatternType param.Field[SettingBlockSenderEditParamsPatternType] `json:"pattern_type"` +} + +func (r SettingBlockSenderEditParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SettingBlockSenderEditParamsPatternType string + +const ( + SettingBlockSenderEditParamsPatternTypeEmail SettingBlockSenderEditParamsPatternType = "EMAIL" + SettingBlockSenderEditParamsPatternTypeDomain SettingBlockSenderEditParamsPatternType = "DOMAIN" + SettingBlockSenderEditParamsPatternTypeIP SettingBlockSenderEditParamsPatternType = "IP" + SettingBlockSenderEditParamsPatternTypeUnknown SettingBlockSenderEditParamsPatternType = "UNKNOWN" +) + +func (r SettingBlockSenderEditParamsPatternType) IsKnown() bool { + switch r { + case SettingBlockSenderEditParamsPatternTypeEmail, SettingBlockSenderEditParamsPatternTypeDomain, SettingBlockSenderEditParamsPatternTypeIP, SettingBlockSenderEditParamsPatternTypeUnknown: + return true + } + return false +} + +type SettingBlockSenderEditResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingBlockSenderEditResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingBlockSenderEditResponseEnvelopeJSON `json:"-"` +} + +// settingBlockSenderEditResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingBlockSenderEditResponseEnvelope] +type settingBlockSenderEditResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingBlockSenderEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingBlockSenderEditResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingBlockSenderGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingBlockSenderGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingBlockSenderGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingBlockSenderGetResponseEnvelopeJSON `json:"-"` +} + +// settingBlockSenderGetResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingBlockSenderGetResponseEnvelope] +type settingBlockSenderGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingBlockSenderGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingBlockSenderGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/settingblocksender_test.go b/email_security/settingblocksender_test.go new file mode 100644 index 00000000000..b8ece48cc0d --- /dev/null +++ b/email_security/settingblocksender_test.go @@ -0,0 +1,167 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestSettingBlockSenderNewWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.BlockSenders.New(context.TODO(), email_security.SettingBlockSenderNewParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + IsRegex: cloudflare.F(false), + Pattern: cloudflare.F("test@example.com"), + PatternType: cloudflare.F(email_security.SettingBlockSenderNewParamsPatternTypeEmail), + Comments: cloudflare.F("block sender with email test@example.com"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingBlockSenderListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.BlockSenders.List(context.TODO(), email_security.SettingBlockSenderListParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Direction: cloudflare.F(email_security.SettingBlockSenderListParamsDirectionAsc), + Order: cloudflare.F(email_security.SettingBlockSenderListParamsOrderPattern), + Page: cloudflare.F(int64(1)), + Pattern: cloudflare.F("pattern"), + PatternType: cloudflare.F(email_security.SettingBlockSenderListParamsPatternTypeEmail), + PerPage: cloudflare.F(int64(1)), + Search: cloudflare.F("search"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingBlockSenderDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.BlockSenders.Delete( + context.TODO(), + int64(2402), + email_security.SettingBlockSenderDeleteParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingBlockSenderEditWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.BlockSenders.Edit( + context.TODO(), + int64(2402), + email_security.SettingBlockSenderEditParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Comments: cloudflare.F("comments"), + IsRegex: cloudflare.F(true), + Pattern: cloudflare.F("x"), + PatternType: cloudflare.F(email_security.SettingBlockSenderEditParamsPatternTypeEmail), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingBlockSenderGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.BlockSenders.Get( + context.TODO(), + int64(2402), + email_security.SettingBlockSenderGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/settingdomain.go b/email_security/settingdomain.go index 17bd5ba4cde..d160cc71b6c 100644 --- a/email_security/settingdomain.go +++ b/email_security/settingdomain.go @@ -3,7 +3,21 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // SettingDomainService contains methods and other services that help with @@ -24,3 +38,1145 @@ func NewSettingDomainService(opts ...option.RequestOption) (r *SettingDomainServ r.Options = opts return } + +// Lists, searches, and sorts an account’s email domains. +func (r *SettingDomainService) List(ctx context.Context, params SettingDomainListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingDomainListResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/domains", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Lists, searches, and sorts an account’s email domains. +func (r *SettingDomainService) ListAutoPaging(ctx context.Context, params SettingDomainListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingDomainListResponse] { + return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) +} + +// Unprotect an email domain +func (r *SettingDomainService) Delete(ctx context.Context, domainID int64, body SettingDomainDeleteParams, opts ...option.RequestOption) (res *SettingDomainDeleteResponse, err error) { + var env SettingDomainDeleteResponseEnvelope + opts = slices.Concat(r.Options, opts) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/domains/%v", body.AccountID, domainID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Unprotect multiple email domains +func (r *SettingDomainService) BulkDelete(ctx context.Context, body SettingDomainBulkDeleteParams, opts ...option.RequestOption) (res *pagination.SinglePage[SettingDomainBulkDeleteResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/domains", body.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodDelete, path, nil, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Unprotect multiple email domains +func (r *SettingDomainService) BulkDeleteAutoPaging(ctx context.Context, body SettingDomainBulkDeleteParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[SettingDomainBulkDeleteResponse] { + return pagination.NewSinglePageAutoPager(r.BulkDelete(ctx, body, opts...)) +} + +// Update an email domain +func (r *SettingDomainService) Edit(ctx context.Context, domainID int64, params SettingDomainEditParams, opts ...option.RequestOption) (res *SettingDomainEditResponse, err error) { + var env SettingDomainEditResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/domains/%v", params.AccountID, domainID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Get an email domain +func (r *SettingDomainService) Get(ctx context.Context, domainID int64, query SettingDomainGetParams, opts ...option.RequestOption) (res *SettingDomainGetResponse, err error) { + var env SettingDomainGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/domains/%v", query.AccountID, domainID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type SettingDomainListResponse struct { + // The unique identifier for the domain. + ID int64 `json:"id,required"` + AllowedDeliveryModes []SettingDomainListResponseAllowedDeliveryMode `json:"allowed_delivery_modes,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Domain string `json:"domain,required"` + DropDispositions []SettingDomainListResponseDropDisposition `json:"drop_dispositions,required"` + IPRestrictions []string `json:"ip_restrictions,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + LookbackHops int64 `json:"lookback_hops,required"` + Regions []SettingDomainListResponseRegion `json:"regions,required"` + Transport string `json:"transport,required"` + Authorization SettingDomainListResponseAuthorization `json:"authorization,nullable"` + DMARCStatus SettingDomainListResponseDMARCStatus `json:"dmarc_status,nullable"` + EmailsProcessed SettingDomainListResponseEmailsProcessed `json:"emails_processed,nullable"` + Folder SettingDomainListResponseFolder `json:"folder,nullable"` + InboxProvider SettingDomainListResponseInboxProvider `json:"inbox_provider,nullable"` + IntegrationID string `json:"integration_id,nullable" format:"uuid"` + O365TenantID string `json:"o365_tenant_id,nullable"` + RequireTLSInbound bool `json:"require_tls_inbound,nullable"` + RequireTLSOutbound bool `json:"require_tls_outbound,nullable"` + SPFStatus SettingDomainListResponseSPFStatus `json:"spf_status,nullable"` + JSON settingDomainListResponseJSON `json:"-"` +} + +// settingDomainListResponseJSON contains the JSON metadata for the struct +// [SettingDomainListResponse] +type settingDomainListResponseJSON struct { + ID apijson.Field + AllowedDeliveryModes apijson.Field + CreatedAt apijson.Field + Domain apijson.Field + DropDispositions apijson.Field + IPRestrictions apijson.Field + LastModified apijson.Field + LookbackHops apijson.Field + Regions apijson.Field + Transport apijson.Field + Authorization apijson.Field + DMARCStatus apijson.Field + EmailsProcessed apijson.Field + Folder apijson.Field + InboxProvider apijson.Field + IntegrationID apijson.Field + O365TenantID apijson.Field + RequireTLSInbound apijson.Field + RequireTLSOutbound apijson.Field + SPFStatus apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainListResponseJSON) RawJSON() string { + return r.raw +} + +type SettingDomainListResponseAllowedDeliveryMode string + +const ( + SettingDomainListResponseAllowedDeliveryModeDirect SettingDomainListResponseAllowedDeliveryMode = "DIRECT" + SettingDomainListResponseAllowedDeliveryModeBcc SettingDomainListResponseAllowedDeliveryMode = "BCC" + SettingDomainListResponseAllowedDeliveryModeJournal SettingDomainListResponseAllowedDeliveryMode = "JOURNAL" + SettingDomainListResponseAllowedDeliveryModeAPI SettingDomainListResponseAllowedDeliveryMode = "API" + SettingDomainListResponseAllowedDeliveryModeRetroScan SettingDomainListResponseAllowedDeliveryMode = "RETRO_SCAN" +) + +func (r SettingDomainListResponseAllowedDeliveryMode) IsKnown() bool { + switch r { + case SettingDomainListResponseAllowedDeliveryModeDirect, SettingDomainListResponseAllowedDeliveryModeBcc, SettingDomainListResponseAllowedDeliveryModeJournal, SettingDomainListResponseAllowedDeliveryModeAPI, SettingDomainListResponseAllowedDeliveryModeRetroScan: + return true + } + return false +} + +type SettingDomainListResponseDropDisposition string + +const ( + SettingDomainListResponseDropDispositionMalicious SettingDomainListResponseDropDisposition = "MALICIOUS" + SettingDomainListResponseDropDispositionMaliciousBec SettingDomainListResponseDropDisposition = "MALICIOUS-BEC" + SettingDomainListResponseDropDispositionSuspicious SettingDomainListResponseDropDisposition = "SUSPICIOUS" + SettingDomainListResponseDropDispositionSpoof SettingDomainListResponseDropDisposition = "SPOOF" + SettingDomainListResponseDropDispositionSpam SettingDomainListResponseDropDisposition = "SPAM" + SettingDomainListResponseDropDispositionBulk SettingDomainListResponseDropDisposition = "BULK" + SettingDomainListResponseDropDispositionEncrypted SettingDomainListResponseDropDisposition = "ENCRYPTED" + SettingDomainListResponseDropDispositionExternal SettingDomainListResponseDropDisposition = "EXTERNAL" + SettingDomainListResponseDropDispositionUnknown SettingDomainListResponseDropDisposition = "UNKNOWN" + SettingDomainListResponseDropDispositionNone SettingDomainListResponseDropDisposition = "NONE" +) + +func (r SettingDomainListResponseDropDisposition) IsKnown() bool { + switch r { + case SettingDomainListResponseDropDispositionMalicious, SettingDomainListResponseDropDispositionMaliciousBec, SettingDomainListResponseDropDispositionSuspicious, SettingDomainListResponseDropDispositionSpoof, SettingDomainListResponseDropDispositionSpam, SettingDomainListResponseDropDispositionBulk, SettingDomainListResponseDropDispositionEncrypted, SettingDomainListResponseDropDispositionExternal, SettingDomainListResponseDropDispositionUnknown, SettingDomainListResponseDropDispositionNone: + return true + } + return false +} + +type SettingDomainListResponseRegion string + +const ( + SettingDomainListResponseRegionGlobal SettingDomainListResponseRegion = "GLOBAL" + SettingDomainListResponseRegionAu SettingDomainListResponseRegion = "AU" + SettingDomainListResponseRegionDe SettingDomainListResponseRegion = "DE" + SettingDomainListResponseRegionIn SettingDomainListResponseRegion = "IN" + SettingDomainListResponseRegionUs SettingDomainListResponseRegion = "US" +) + +func (r SettingDomainListResponseRegion) IsKnown() bool { + switch r { + case SettingDomainListResponseRegionGlobal, SettingDomainListResponseRegionAu, SettingDomainListResponseRegionDe, SettingDomainListResponseRegionIn, SettingDomainListResponseRegionUs: + return true + } + return false +} + +type SettingDomainListResponseAuthorization struct { + Authorized bool `json:"authorized,required"` + Timestamp time.Time `json:"timestamp,required" format:"date-time"` + StatusMessage string `json:"status_message,nullable"` + JSON settingDomainListResponseAuthorizationJSON `json:"-"` +} + +// settingDomainListResponseAuthorizationJSON contains the JSON metadata for the +// struct [SettingDomainListResponseAuthorization] +type settingDomainListResponseAuthorizationJSON struct { + Authorized apijson.Field + Timestamp apijson.Field + StatusMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainListResponseAuthorization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainListResponseAuthorizationJSON) RawJSON() string { + return r.raw +} + +type SettingDomainListResponseDMARCStatus string + +const ( + SettingDomainListResponseDMARCStatusNone SettingDomainListResponseDMARCStatus = "none" + SettingDomainListResponseDMARCStatusGood SettingDomainListResponseDMARCStatus = "good" + SettingDomainListResponseDMARCStatusInvalid SettingDomainListResponseDMARCStatus = "invalid" +) + +func (r SettingDomainListResponseDMARCStatus) IsKnown() bool { + switch r { + case SettingDomainListResponseDMARCStatusNone, SettingDomainListResponseDMARCStatusGood, SettingDomainListResponseDMARCStatusInvalid: + return true + } + return false +} + +type SettingDomainListResponseEmailsProcessed struct { + Timestamp time.Time `json:"timestamp,required" format:"date-time"` + TotalEmailsProcessed int64 `json:"total_emails_processed,required"` + TotalEmailsProcessedPrevious int64 `json:"total_emails_processed_previous,required"` + JSON settingDomainListResponseEmailsProcessedJSON `json:"-"` +} + +// settingDomainListResponseEmailsProcessedJSON contains the JSON metadata for the +// struct [SettingDomainListResponseEmailsProcessed] +type settingDomainListResponseEmailsProcessedJSON struct { + Timestamp apijson.Field + TotalEmailsProcessed apijson.Field + TotalEmailsProcessedPrevious apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainListResponseEmailsProcessed) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainListResponseEmailsProcessedJSON) RawJSON() string { + return r.raw +} + +type SettingDomainListResponseFolder string + +const ( + SettingDomainListResponseFolderAllItems SettingDomainListResponseFolder = "AllItems" + SettingDomainListResponseFolderInbox SettingDomainListResponseFolder = "Inbox" +) + +func (r SettingDomainListResponseFolder) IsKnown() bool { + switch r { + case SettingDomainListResponseFolderAllItems, SettingDomainListResponseFolderInbox: + return true + } + return false +} + +type SettingDomainListResponseInboxProvider string + +const ( + SettingDomainListResponseInboxProviderMicrosoft SettingDomainListResponseInboxProvider = "Microsoft" + SettingDomainListResponseInboxProviderGoogle SettingDomainListResponseInboxProvider = "Google" +) + +func (r SettingDomainListResponseInboxProvider) IsKnown() bool { + switch r { + case SettingDomainListResponseInboxProviderMicrosoft, SettingDomainListResponseInboxProviderGoogle: + return true + } + return false +} + +type SettingDomainListResponseSPFStatus string + +const ( + SettingDomainListResponseSPFStatusNone SettingDomainListResponseSPFStatus = "none" + SettingDomainListResponseSPFStatusGood SettingDomainListResponseSPFStatus = "good" + SettingDomainListResponseSPFStatusNeutral SettingDomainListResponseSPFStatus = "neutral" + SettingDomainListResponseSPFStatusOpen SettingDomainListResponseSPFStatus = "open" + SettingDomainListResponseSPFStatusInvalid SettingDomainListResponseSPFStatus = "invalid" +) + +func (r SettingDomainListResponseSPFStatus) IsKnown() bool { + switch r { + case SettingDomainListResponseSPFStatusNone, SettingDomainListResponseSPFStatusGood, SettingDomainListResponseSPFStatusNeutral, SettingDomainListResponseSPFStatusOpen, SettingDomainListResponseSPFStatusInvalid: + return true + } + return false +} + +type SettingDomainDeleteResponse struct { + // The unique identifier for the domain. + ID int64 `json:"id,required"` + JSON settingDomainDeleteResponseJSON `json:"-"` +} + +// settingDomainDeleteResponseJSON contains the JSON metadata for the struct +// [SettingDomainDeleteResponse] +type settingDomainDeleteResponseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type SettingDomainBulkDeleteResponse struct { + // The unique identifier for the domain. + ID int64 `json:"id,required"` + JSON settingDomainBulkDeleteResponseJSON `json:"-"` +} + +// settingDomainBulkDeleteResponseJSON contains the JSON metadata for the struct +// [SettingDomainBulkDeleteResponse] +type settingDomainBulkDeleteResponseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainBulkDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainBulkDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type SettingDomainEditResponse struct { + // The unique identifier for the domain. + ID int64 `json:"id,required"` + AllowedDeliveryModes []SettingDomainEditResponseAllowedDeliveryMode `json:"allowed_delivery_modes,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Domain string `json:"domain,required"` + DropDispositions []SettingDomainEditResponseDropDisposition `json:"drop_dispositions,required"` + IPRestrictions []string `json:"ip_restrictions,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + LookbackHops int64 `json:"lookback_hops,required"` + Regions []SettingDomainEditResponseRegion `json:"regions,required"` + Transport string `json:"transport,required"` + Authorization SettingDomainEditResponseAuthorization `json:"authorization,nullable"` + DMARCStatus SettingDomainEditResponseDMARCStatus `json:"dmarc_status,nullable"` + EmailsProcessed SettingDomainEditResponseEmailsProcessed `json:"emails_processed,nullable"` + Folder SettingDomainEditResponseFolder `json:"folder,nullable"` + InboxProvider SettingDomainEditResponseInboxProvider `json:"inbox_provider,nullable"` + IntegrationID string `json:"integration_id,nullable" format:"uuid"` + O365TenantID string `json:"o365_tenant_id,nullable"` + RequireTLSInbound bool `json:"require_tls_inbound,nullable"` + RequireTLSOutbound bool `json:"require_tls_outbound,nullable"` + SPFStatus SettingDomainEditResponseSPFStatus `json:"spf_status,nullable"` + JSON settingDomainEditResponseJSON `json:"-"` +} + +// settingDomainEditResponseJSON contains the JSON metadata for the struct +// [SettingDomainEditResponse] +type settingDomainEditResponseJSON struct { + ID apijson.Field + AllowedDeliveryModes apijson.Field + CreatedAt apijson.Field + Domain apijson.Field + DropDispositions apijson.Field + IPRestrictions apijson.Field + LastModified apijson.Field + LookbackHops apijson.Field + Regions apijson.Field + Transport apijson.Field + Authorization apijson.Field + DMARCStatus apijson.Field + EmailsProcessed apijson.Field + Folder apijson.Field + InboxProvider apijson.Field + IntegrationID apijson.Field + O365TenantID apijson.Field + RequireTLSInbound apijson.Field + RequireTLSOutbound apijson.Field + SPFStatus apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainEditResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainEditResponseJSON) RawJSON() string { + return r.raw +} + +type SettingDomainEditResponseAllowedDeliveryMode string + +const ( + SettingDomainEditResponseAllowedDeliveryModeDirect SettingDomainEditResponseAllowedDeliveryMode = "DIRECT" + SettingDomainEditResponseAllowedDeliveryModeBcc SettingDomainEditResponseAllowedDeliveryMode = "BCC" + SettingDomainEditResponseAllowedDeliveryModeJournal SettingDomainEditResponseAllowedDeliveryMode = "JOURNAL" + SettingDomainEditResponseAllowedDeliveryModeAPI SettingDomainEditResponseAllowedDeliveryMode = "API" + SettingDomainEditResponseAllowedDeliveryModeRetroScan SettingDomainEditResponseAllowedDeliveryMode = "RETRO_SCAN" +) + +func (r SettingDomainEditResponseAllowedDeliveryMode) IsKnown() bool { + switch r { + case SettingDomainEditResponseAllowedDeliveryModeDirect, SettingDomainEditResponseAllowedDeliveryModeBcc, SettingDomainEditResponseAllowedDeliveryModeJournal, SettingDomainEditResponseAllowedDeliveryModeAPI, SettingDomainEditResponseAllowedDeliveryModeRetroScan: + return true + } + return false +} + +type SettingDomainEditResponseDropDisposition string + +const ( + SettingDomainEditResponseDropDispositionMalicious SettingDomainEditResponseDropDisposition = "MALICIOUS" + SettingDomainEditResponseDropDispositionMaliciousBec SettingDomainEditResponseDropDisposition = "MALICIOUS-BEC" + SettingDomainEditResponseDropDispositionSuspicious SettingDomainEditResponseDropDisposition = "SUSPICIOUS" + SettingDomainEditResponseDropDispositionSpoof SettingDomainEditResponseDropDisposition = "SPOOF" + SettingDomainEditResponseDropDispositionSpam SettingDomainEditResponseDropDisposition = "SPAM" + SettingDomainEditResponseDropDispositionBulk SettingDomainEditResponseDropDisposition = "BULK" + SettingDomainEditResponseDropDispositionEncrypted SettingDomainEditResponseDropDisposition = "ENCRYPTED" + SettingDomainEditResponseDropDispositionExternal SettingDomainEditResponseDropDisposition = "EXTERNAL" + SettingDomainEditResponseDropDispositionUnknown SettingDomainEditResponseDropDisposition = "UNKNOWN" + SettingDomainEditResponseDropDispositionNone SettingDomainEditResponseDropDisposition = "NONE" +) + +func (r SettingDomainEditResponseDropDisposition) IsKnown() bool { + switch r { + case SettingDomainEditResponseDropDispositionMalicious, SettingDomainEditResponseDropDispositionMaliciousBec, SettingDomainEditResponseDropDispositionSuspicious, SettingDomainEditResponseDropDispositionSpoof, SettingDomainEditResponseDropDispositionSpam, SettingDomainEditResponseDropDispositionBulk, SettingDomainEditResponseDropDispositionEncrypted, SettingDomainEditResponseDropDispositionExternal, SettingDomainEditResponseDropDispositionUnknown, SettingDomainEditResponseDropDispositionNone: + return true + } + return false +} + +type SettingDomainEditResponseRegion string + +const ( + SettingDomainEditResponseRegionGlobal SettingDomainEditResponseRegion = "GLOBAL" + SettingDomainEditResponseRegionAu SettingDomainEditResponseRegion = "AU" + SettingDomainEditResponseRegionDe SettingDomainEditResponseRegion = "DE" + SettingDomainEditResponseRegionIn SettingDomainEditResponseRegion = "IN" + SettingDomainEditResponseRegionUs SettingDomainEditResponseRegion = "US" +) + +func (r SettingDomainEditResponseRegion) IsKnown() bool { + switch r { + case SettingDomainEditResponseRegionGlobal, SettingDomainEditResponseRegionAu, SettingDomainEditResponseRegionDe, SettingDomainEditResponseRegionIn, SettingDomainEditResponseRegionUs: + return true + } + return false +} + +type SettingDomainEditResponseAuthorization struct { + Authorized bool `json:"authorized,required"` + Timestamp time.Time `json:"timestamp,required" format:"date-time"` + StatusMessage string `json:"status_message,nullable"` + JSON settingDomainEditResponseAuthorizationJSON `json:"-"` +} + +// settingDomainEditResponseAuthorizationJSON contains the JSON metadata for the +// struct [SettingDomainEditResponseAuthorization] +type settingDomainEditResponseAuthorizationJSON struct { + Authorized apijson.Field + Timestamp apijson.Field + StatusMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainEditResponseAuthorization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainEditResponseAuthorizationJSON) RawJSON() string { + return r.raw +} + +type SettingDomainEditResponseDMARCStatus string + +const ( + SettingDomainEditResponseDMARCStatusNone SettingDomainEditResponseDMARCStatus = "none" + SettingDomainEditResponseDMARCStatusGood SettingDomainEditResponseDMARCStatus = "good" + SettingDomainEditResponseDMARCStatusInvalid SettingDomainEditResponseDMARCStatus = "invalid" +) + +func (r SettingDomainEditResponseDMARCStatus) IsKnown() bool { + switch r { + case SettingDomainEditResponseDMARCStatusNone, SettingDomainEditResponseDMARCStatusGood, SettingDomainEditResponseDMARCStatusInvalid: + return true + } + return false +} + +type SettingDomainEditResponseEmailsProcessed struct { + Timestamp time.Time `json:"timestamp,required" format:"date-time"` + TotalEmailsProcessed int64 `json:"total_emails_processed,required"` + TotalEmailsProcessedPrevious int64 `json:"total_emails_processed_previous,required"` + JSON settingDomainEditResponseEmailsProcessedJSON `json:"-"` +} + +// settingDomainEditResponseEmailsProcessedJSON contains the JSON metadata for the +// struct [SettingDomainEditResponseEmailsProcessed] +type settingDomainEditResponseEmailsProcessedJSON struct { + Timestamp apijson.Field + TotalEmailsProcessed apijson.Field + TotalEmailsProcessedPrevious apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainEditResponseEmailsProcessed) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainEditResponseEmailsProcessedJSON) RawJSON() string { + return r.raw +} + +type SettingDomainEditResponseFolder string + +const ( + SettingDomainEditResponseFolderAllItems SettingDomainEditResponseFolder = "AllItems" + SettingDomainEditResponseFolderInbox SettingDomainEditResponseFolder = "Inbox" +) + +func (r SettingDomainEditResponseFolder) IsKnown() bool { + switch r { + case SettingDomainEditResponseFolderAllItems, SettingDomainEditResponseFolderInbox: + return true + } + return false +} + +type SettingDomainEditResponseInboxProvider string + +const ( + SettingDomainEditResponseInboxProviderMicrosoft SettingDomainEditResponseInboxProvider = "Microsoft" + SettingDomainEditResponseInboxProviderGoogle SettingDomainEditResponseInboxProvider = "Google" +) + +func (r SettingDomainEditResponseInboxProvider) IsKnown() bool { + switch r { + case SettingDomainEditResponseInboxProviderMicrosoft, SettingDomainEditResponseInboxProviderGoogle: + return true + } + return false +} + +type SettingDomainEditResponseSPFStatus string + +const ( + SettingDomainEditResponseSPFStatusNone SettingDomainEditResponseSPFStatus = "none" + SettingDomainEditResponseSPFStatusGood SettingDomainEditResponseSPFStatus = "good" + SettingDomainEditResponseSPFStatusNeutral SettingDomainEditResponseSPFStatus = "neutral" + SettingDomainEditResponseSPFStatusOpen SettingDomainEditResponseSPFStatus = "open" + SettingDomainEditResponseSPFStatusInvalid SettingDomainEditResponseSPFStatus = "invalid" +) + +func (r SettingDomainEditResponseSPFStatus) IsKnown() bool { + switch r { + case SettingDomainEditResponseSPFStatusNone, SettingDomainEditResponseSPFStatusGood, SettingDomainEditResponseSPFStatusNeutral, SettingDomainEditResponseSPFStatusOpen, SettingDomainEditResponseSPFStatusInvalid: + return true + } + return false +} + +type SettingDomainGetResponse struct { + // The unique identifier for the domain. + ID int64 `json:"id,required"` + AllowedDeliveryModes []SettingDomainGetResponseAllowedDeliveryMode `json:"allowed_delivery_modes,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Domain string `json:"domain,required"` + DropDispositions []SettingDomainGetResponseDropDisposition `json:"drop_dispositions,required"` + IPRestrictions []string `json:"ip_restrictions,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + LookbackHops int64 `json:"lookback_hops,required"` + Regions []SettingDomainGetResponseRegion `json:"regions,required"` + Transport string `json:"transport,required"` + Authorization SettingDomainGetResponseAuthorization `json:"authorization,nullable"` + DMARCStatus SettingDomainGetResponseDMARCStatus `json:"dmarc_status,nullable"` + EmailsProcessed SettingDomainGetResponseEmailsProcessed `json:"emails_processed,nullable"` + Folder SettingDomainGetResponseFolder `json:"folder,nullable"` + InboxProvider SettingDomainGetResponseInboxProvider `json:"inbox_provider,nullable"` + IntegrationID string `json:"integration_id,nullable" format:"uuid"` + O365TenantID string `json:"o365_tenant_id,nullable"` + RequireTLSInbound bool `json:"require_tls_inbound,nullable"` + RequireTLSOutbound bool `json:"require_tls_outbound,nullable"` + SPFStatus SettingDomainGetResponseSPFStatus `json:"spf_status,nullable"` + JSON settingDomainGetResponseJSON `json:"-"` +} + +// settingDomainGetResponseJSON contains the JSON metadata for the struct +// [SettingDomainGetResponse] +type settingDomainGetResponseJSON struct { + ID apijson.Field + AllowedDeliveryModes apijson.Field + CreatedAt apijson.Field + Domain apijson.Field + DropDispositions apijson.Field + IPRestrictions apijson.Field + LastModified apijson.Field + LookbackHops apijson.Field + Regions apijson.Field + Transport apijson.Field + Authorization apijson.Field + DMARCStatus apijson.Field + EmailsProcessed apijson.Field + Folder apijson.Field + InboxProvider apijson.Field + IntegrationID apijson.Field + O365TenantID apijson.Field + RequireTLSInbound apijson.Field + RequireTLSOutbound apijson.Field + SPFStatus apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainGetResponseJSON) RawJSON() string { + return r.raw +} + +type SettingDomainGetResponseAllowedDeliveryMode string + +const ( + SettingDomainGetResponseAllowedDeliveryModeDirect SettingDomainGetResponseAllowedDeliveryMode = "DIRECT" + SettingDomainGetResponseAllowedDeliveryModeBcc SettingDomainGetResponseAllowedDeliveryMode = "BCC" + SettingDomainGetResponseAllowedDeliveryModeJournal SettingDomainGetResponseAllowedDeliveryMode = "JOURNAL" + SettingDomainGetResponseAllowedDeliveryModeAPI SettingDomainGetResponseAllowedDeliveryMode = "API" + SettingDomainGetResponseAllowedDeliveryModeRetroScan SettingDomainGetResponseAllowedDeliveryMode = "RETRO_SCAN" +) + +func (r SettingDomainGetResponseAllowedDeliveryMode) IsKnown() bool { + switch r { + case SettingDomainGetResponseAllowedDeliveryModeDirect, SettingDomainGetResponseAllowedDeliveryModeBcc, SettingDomainGetResponseAllowedDeliveryModeJournal, SettingDomainGetResponseAllowedDeliveryModeAPI, SettingDomainGetResponseAllowedDeliveryModeRetroScan: + return true + } + return false +} + +type SettingDomainGetResponseDropDisposition string + +const ( + SettingDomainGetResponseDropDispositionMalicious SettingDomainGetResponseDropDisposition = "MALICIOUS" + SettingDomainGetResponseDropDispositionMaliciousBec SettingDomainGetResponseDropDisposition = "MALICIOUS-BEC" + SettingDomainGetResponseDropDispositionSuspicious SettingDomainGetResponseDropDisposition = "SUSPICIOUS" + SettingDomainGetResponseDropDispositionSpoof SettingDomainGetResponseDropDisposition = "SPOOF" + SettingDomainGetResponseDropDispositionSpam SettingDomainGetResponseDropDisposition = "SPAM" + SettingDomainGetResponseDropDispositionBulk SettingDomainGetResponseDropDisposition = "BULK" + SettingDomainGetResponseDropDispositionEncrypted SettingDomainGetResponseDropDisposition = "ENCRYPTED" + SettingDomainGetResponseDropDispositionExternal SettingDomainGetResponseDropDisposition = "EXTERNAL" + SettingDomainGetResponseDropDispositionUnknown SettingDomainGetResponseDropDisposition = "UNKNOWN" + SettingDomainGetResponseDropDispositionNone SettingDomainGetResponseDropDisposition = "NONE" +) + +func (r SettingDomainGetResponseDropDisposition) IsKnown() bool { + switch r { + case SettingDomainGetResponseDropDispositionMalicious, SettingDomainGetResponseDropDispositionMaliciousBec, SettingDomainGetResponseDropDispositionSuspicious, SettingDomainGetResponseDropDispositionSpoof, SettingDomainGetResponseDropDispositionSpam, SettingDomainGetResponseDropDispositionBulk, SettingDomainGetResponseDropDispositionEncrypted, SettingDomainGetResponseDropDispositionExternal, SettingDomainGetResponseDropDispositionUnknown, SettingDomainGetResponseDropDispositionNone: + return true + } + return false +} + +type SettingDomainGetResponseRegion string + +const ( + SettingDomainGetResponseRegionGlobal SettingDomainGetResponseRegion = "GLOBAL" + SettingDomainGetResponseRegionAu SettingDomainGetResponseRegion = "AU" + SettingDomainGetResponseRegionDe SettingDomainGetResponseRegion = "DE" + SettingDomainGetResponseRegionIn SettingDomainGetResponseRegion = "IN" + SettingDomainGetResponseRegionUs SettingDomainGetResponseRegion = "US" +) + +func (r SettingDomainGetResponseRegion) IsKnown() bool { + switch r { + case SettingDomainGetResponseRegionGlobal, SettingDomainGetResponseRegionAu, SettingDomainGetResponseRegionDe, SettingDomainGetResponseRegionIn, SettingDomainGetResponseRegionUs: + return true + } + return false +} + +type SettingDomainGetResponseAuthorization struct { + Authorized bool `json:"authorized,required"` + Timestamp time.Time `json:"timestamp,required" format:"date-time"` + StatusMessage string `json:"status_message,nullable"` + JSON settingDomainGetResponseAuthorizationJSON `json:"-"` +} + +// settingDomainGetResponseAuthorizationJSON contains the JSON metadata for the +// struct [SettingDomainGetResponseAuthorization] +type settingDomainGetResponseAuthorizationJSON struct { + Authorized apijson.Field + Timestamp apijson.Field + StatusMessage apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainGetResponseAuthorization) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainGetResponseAuthorizationJSON) RawJSON() string { + return r.raw +} + +type SettingDomainGetResponseDMARCStatus string + +const ( + SettingDomainGetResponseDMARCStatusNone SettingDomainGetResponseDMARCStatus = "none" + SettingDomainGetResponseDMARCStatusGood SettingDomainGetResponseDMARCStatus = "good" + SettingDomainGetResponseDMARCStatusInvalid SettingDomainGetResponseDMARCStatus = "invalid" +) + +func (r SettingDomainGetResponseDMARCStatus) IsKnown() bool { + switch r { + case SettingDomainGetResponseDMARCStatusNone, SettingDomainGetResponseDMARCStatusGood, SettingDomainGetResponseDMARCStatusInvalid: + return true + } + return false +} + +type SettingDomainGetResponseEmailsProcessed struct { + Timestamp time.Time `json:"timestamp,required" format:"date-time"` + TotalEmailsProcessed int64 `json:"total_emails_processed,required"` + TotalEmailsProcessedPrevious int64 `json:"total_emails_processed_previous,required"` + JSON settingDomainGetResponseEmailsProcessedJSON `json:"-"` +} + +// settingDomainGetResponseEmailsProcessedJSON contains the JSON metadata for the +// struct [SettingDomainGetResponseEmailsProcessed] +type settingDomainGetResponseEmailsProcessedJSON struct { + Timestamp apijson.Field + TotalEmailsProcessed apijson.Field + TotalEmailsProcessedPrevious apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainGetResponseEmailsProcessed) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainGetResponseEmailsProcessedJSON) RawJSON() string { + return r.raw +} + +type SettingDomainGetResponseFolder string + +const ( + SettingDomainGetResponseFolderAllItems SettingDomainGetResponseFolder = "AllItems" + SettingDomainGetResponseFolderInbox SettingDomainGetResponseFolder = "Inbox" +) + +func (r SettingDomainGetResponseFolder) IsKnown() bool { + switch r { + case SettingDomainGetResponseFolderAllItems, SettingDomainGetResponseFolderInbox: + return true + } + return false +} + +type SettingDomainGetResponseInboxProvider string + +const ( + SettingDomainGetResponseInboxProviderMicrosoft SettingDomainGetResponseInboxProvider = "Microsoft" + SettingDomainGetResponseInboxProviderGoogle SettingDomainGetResponseInboxProvider = "Google" +) + +func (r SettingDomainGetResponseInboxProvider) IsKnown() bool { + switch r { + case SettingDomainGetResponseInboxProviderMicrosoft, SettingDomainGetResponseInboxProviderGoogle: + return true + } + return false +} + +type SettingDomainGetResponseSPFStatus string + +const ( + SettingDomainGetResponseSPFStatusNone SettingDomainGetResponseSPFStatus = "none" + SettingDomainGetResponseSPFStatusGood SettingDomainGetResponseSPFStatus = "good" + SettingDomainGetResponseSPFStatusNeutral SettingDomainGetResponseSPFStatus = "neutral" + SettingDomainGetResponseSPFStatusOpen SettingDomainGetResponseSPFStatus = "open" + SettingDomainGetResponseSPFStatusInvalid SettingDomainGetResponseSPFStatus = "invalid" +) + +func (r SettingDomainGetResponseSPFStatus) IsKnown() bool { + switch r { + case SettingDomainGetResponseSPFStatusNone, SettingDomainGetResponseSPFStatusGood, SettingDomainGetResponseSPFStatusNeutral, SettingDomainGetResponseSPFStatusOpen, SettingDomainGetResponseSPFStatusInvalid: + return true + } + return false +} + +type SettingDomainListParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // Filters response to domains with the currently active delivery mode. + ActiveDeliveryMode param.Field[SettingDomainListParamsActiveDeliveryMode] `query:"active_delivery_mode"` + // Filters response to domains with the provided delivery mode. + AllowedDeliveryMode param.Field[SettingDomainListParamsAllowedDeliveryMode] `query:"allowed_delivery_mode"` + // The sorting direction. + Direction param.Field[SettingDomainListParamsDirection] `query:"direction"` + // Filters results by the provided domains, allowing for multiple occurrences. + Domain param.Field[[]string] `query:"domain"` + // Filters response to domains with the provided integration ID. + IntegrationID param.Field[string] `query:"integration_id" format:"uuid"` + // The field to sort by. + Order param.Field[SettingDomainListParamsOrder] `query:"order"` + // The page number of paginated results. + Page param.Field[int64] `query:"page"` + // The number of results per page. + PerPage param.Field[int64] `query:"per_page"` + // Allows searching in multiple properties of a record simultaneously. This + // parameter is intended for human users, not automation. Its exact behavior is + // intentionally left unspecified and is subject to change in the future. + Search param.Field[string] `query:"search"` +} + +// URLQuery serializes [SettingDomainListParams]'s query parameters as +// `url.Values`. +func (r SettingDomainListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + +// Filters response to domains with the currently active delivery mode. +type SettingDomainListParamsActiveDeliveryMode string + +const ( + SettingDomainListParamsActiveDeliveryModeDirect SettingDomainListParamsActiveDeliveryMode = "DIRECT" + SettingDomainListParamsActiveDeliveryModeBcc SettingDomainListParamsActiveDeliveryMode = "BCC" + SettingDomainListParamsActiveDeliveryModeJournal SettingDomainListParamsActiveDeliveryMode = "JOURNAL" + SettingDomainListParamsActiveDeliveryModeAPI SettingDomainListParamsActiveDeliveryMode = "API" + SettingDomainListParamsActiveDeliveryModeRetroScan SettingDomainListParamsActiveDeliveryMode = "RETRO_SCAN" +) + +func (r SettingDomainListParamsActiveDeliveryMode) IsKnown() bool { + switch r { + case SettingDomainListParamsActiveDeliveryModeDirect, SettingDomainListParamsActiveDeliveryModeBcc, SettingDomainListParamsActiveDeliveryModeJournal, SettingDomainListParamsActiveDeliveryModeAPI, SettingDomainListParamsActiveDeliveryModeRetroScan: + return true + } + return false +} + +// Filters response to domains with the provided delivery mode. +type SettingDomainListParamsAllowedDeliveryMode string + +const ( + SettingDomainListParamsAllowedDeliveryModeDirect SettingDomainListParamsAllowedDeliveryMode = "DIRECT" + SettingDomainListParamsAllowedDeliveryModeBcc SettingDomainListParamsAllowedDeliveryMode = "BCC" + SettingDomainListParamsAllowedDeliveryModeJournal SettingDomainListParamsAllowedDeliveryMode = "JOURNAL" + SettingDomainListParamsAllowedDeliveryModeAPI SettingDomainListParamsAllowedDeliveryMode = "API" + SettingDomainListParamsAllowedDeliveryModeRetroScan SettingDomainListParamsAllowedDeliveryMode = "RETRO_SCAN" +) + +func (r SettingDomainListParamsAllowedDeliveryMode) IsKnown() bool { + switch r { + case SettingDomainListParamsAllowedDeliveryModeDirect, SettingDomainListParamsAllowedDeliveryModeBcc, SettingDomainListParamsAllowedDeliveryModeJournal, SettingDomainListParamsAllowedDeliveryModeAPI, SettingDomainListParamsAllowedDeliveryModeRetroScan: + return true + } + return false +} + +// The sorting direction. +type SettingDomainListParamsDirection string + +const ( + SettingDomainListParamsDirectionAsc SettingDomainListParamsDirection = "asc" + SettingDomainListParamsDirectionDesc SettingDomainListParamsDirection = "desc" +) + +func (r SettingDomainListParamsDirection) IsKnown() bool { + switch r { + case SettingDomainListParamsDirectionAsc, SettingDomainListParamsDirectionDesc: + return true + } + return false +} + +// The field to sort by. +type SettingDomainListParamsOrder string + +const ( + SettingDomainListParamsOrderDomain SettingDomainListParamsOrder = "domain" + SettingDomainListParamsOrderCreatedAt SettingDomainListParamsOrder = "created_at" +) + +func (r SettingDomainListParamsOrder) IsKnown() bool { + switch r { + case SettingDomainListParamsOrderDomain, SettingDomainListParamsOrderCreatedAt: + return true + } + return false +} + +type SettingDomainDeleteParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingDomainDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingDomainDeleteResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingDomainDeleteResponseEnvelopeJSON `json:"-"` +} + +// settingDomainDeleteResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingDomainDeleteResponseEnvelope] +type settingDomainDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingDomainBulkDeleteParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingDomainEditParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + IPRestrictions param.Field[[]string] `json:"ip_restrictions,required"` + AllowedDeliveryModes param.Field[[]SettingDomainEditParamsAllowedDeliveryMode] `json:"allowed_delivery_modes"` + Domain param.Field[string] `json:"domain"` + DropDispositions param.Field[[]SettingDomainEditParamsDropDisposition] `json:"drop_dispositions"` + Folder param.Field[SettingDomainEditParamsFolder] `json:"folder"` + IntegrationID param.Field[string] `json:"integration_id" format:"uuid"` + LookbackHops param.Field[int64] `json:"lookback_hops"` + Regions param.Field[[]SettingDomainEditParamsRegion] `json:"regions"` + RequireTLSInbound param.Field[bool] `json:"require_tls_inbound"` + RequireTLSOutbound param.Field[bool] `json:"require_tls_outbound"` + Transport param.Field[string] `json:"transport"` +} + +func (r SettingDomainEditParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SettingDomainEditParamsAllowedDeliveryMode string + +const ( + SettingDomainEditParamsAllowedDeliveryModeDirect SettingDomainEditParamsAllowedDeliveryMode = "DIRECT" + SettingDomainEditParamsAllowedDeliveryModeBcc SettingDomainEditParamsAllowedDeliveryMode = "BCC" + SettingDomainEditParamsAllowedDeliveryModeJournal SettingDomainEditParamsAllowedDeliveryMode = "JOURNAL" + SettingDomainEditParamsAllowedDeliveryModeAPI SettingDomainEditParamsAllowedDeliveryMode = "API" + SettingDomainEditParamsAllowedDeliveryModeRetroScan SettingDomainEditParamsAllowedDeliveryMode = "RETRO_SCAN" +) + +func (r SettingDomainEditParamsAllowedDeliveryMode) IsKnown() bool { + switch r { + case SettingDomainEditParamsAllowedDeliveryModeDirect, SettingDomainEditParamsAllowedDeliveryModeBcc, SettingDomainEditParamsAllowedDeliveryModeJournal, SettingDomainEditParamsAllowedDeliveryModeAPI, SettingDomainEditParamsAllowedDeliveryModeRetroScan: + return true + } + return false +} + +type SettingDomainEditParamsDropDisposition string + +const ( + SettingDomainEditParamsDropDispositionMalicious SettingDomainEditParamsDropDisposition = "MALICIOUS" + SettingDomainEditParamsDropDispositionMaliciousBec SettingDomainEditParamsDropDisposition = "MALICIOUS-BEC" + SettingDomainEditParamsDropDispositionSuspicious SettingDomainEditParamsDropDisposition = "SUSPICIOUS" + SettingDomainEditParamsDropDispositionSpoof SettingDomainEditParamsDropDisposition = "SPOOF" + SettingDomainEditParamsDropDispositionSpam SettingDomainEditParamsDropDisposition = "SPAM" + SettingDomainEditParamsDropDispositionBulk SettingDomainEditParamsDropDisposition = "BULK" + SettingDomainEditParamsDropDispositionEncrypted SettingDomainEditParamsDropDisposition = "ENCRYPTED" + SettingDomainEditParamsDropDispositionExternal SettingDomainEditParamsDropDisposition = "EXTERNAL" + SettingDomainEditParamsDropDispositionUnknown SettingDomainEditParamsDropDisposition = "UNKNOWN" + SettingDomainEditParamsDropDispositionNone SettingDomainEditParamsDropDisposition = "NONE" +) + +func (r SettingDomainEditParamsDropDisposition) IsKnown() bool { + switch r { + case SettingDomainEditParamsDropDispositionMalicious, SettingDomainEditParamsDropDispositionMaliciousBec, SettingDomainEditParamsDropDispositionSuspicious, SettingDomainEditParamsDropDispositionSpoof, SettingDomainEditParamsDropDispositionSpam, SettingDomainEditParamsDropDispositionBulk, SettingDomainEditParamsDropDispositionEncrypted, SettingDomainEditParamsDropDispositionExternal, SettingDomainEditParamsDropDispositionUnknown, SettingDomainEditParamsDropDispositionNone: + return true + } + return false +} + +type SettingDomainEditParamsFolder string + +const ( + SettingDomainEditParamsFolderAllItems SettingDomainEditParamsFolder = "AllItems" + SettingDomainEditParamsFolderInbox SettingDomainEditParamsFolder = "Inbox" +) + +func (r SettingDomainEditParamsFolder) IsKnown() bool { + switch r { + case SettingDomainEditParamsFolderAllItems, SettingDomainEditParamsFolderInbox: + return true + } + return false +} + +type SettingDomainEditParamsRegion string + +const ( + SettingDomainEditParamsRegionGlobal SettingDomainEditParamsRegion = "GLOBAL" + SettingDomainEditParamsRegionAu SettingDomainEditParamsRegion = "AU" + SettingDomainEditParamsRegionDe SettingDomainEditParamsRegion = "DE" + SettingDomainEditParamsRegionIn SettingDomainEditParamsRegion = "IN" + SettingDomainEditParamsRegionUs SettingDomainEditParamsRegion = "US" +) + +func (r SettingDomainEditParamsRegion) IsKnown() bool { + switch r { + case SettingDomainEditParamsRegionGlobal, SettingDomainEditParamsRegionAu, SettingDomainEditParamsRegionDe, SettingDomainEditParamsRegionIn, SettingDomainEditParamsRegionUs: + return true + } + return false +} + +type SettingDomainEditResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingDomainEditResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingDomainEditResponseEnvelopeJSON `json:"-"` +} + +// settingDomainEditResponseEnvelopeJSON contains the JSON metadata for the struct +// [SettingDomainEditResponseEnvelope] +type settingDomainEditResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainEditResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingDomainGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingDomainGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingDomainGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingDomainGetResponseEnvelopeJSON `json:"-"` +} + +// settingDomainGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [SettingDomainGetResponseEnvelope] +type settingDomainGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingDomainGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingDomainGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/settingdomain_test.go b/email_security/settingdomain_test.go new file mode 100644 index 00000000000..688bd1d8d34 --- /dev/null +++ b/email_security/settingdomain_test.go @@ -0,0 +1,172 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestSettingDomainListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.Domains.List(context.TODO(), email_security.SettingDomainListParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + ActiveDeliveryMode: cloudflare.F(email_security.SettingDomainListParamsActiveDeliveryModeDirect), + AllowedDeliveryMode: cloudflare.F(email_security.SettingDomainListParamsAllowedDeliveryModeDirect), + Direction: cloudflare.F(email_security.SettingDomainListParamsDirectionAsc), + Domain: cloudflare.F([]string{"string"}), + IntegrationID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), + Order: cloudflare.F(email_security.SettingDomainListParamsOrderDomain), + Page: cloudflare.F(int64(1)), + PerPage: cloudflare.F(int64(1)), + Search: cloudflare.F("search"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingDomainDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.Domains.Delete( + context.TODO(), + int64(2400), + email_security.SettingDomainDeleteParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingDomainBulkDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.Domains.BulkDelete(context.TODO(), email_security.SettingDomainBulkDeleteParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingDomainEditWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.Domains.Edit( + context.TODO(), + int64(2400), + email_security.SettingDomainEditParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + IPRestrictions: cloudflare.F([]string{"192.0.2.0/24", "2001:db8::/32"}), + AllowedDeliveryModes: cloudflare.F([]email_security.SettingDomainEditParamsAllowedDeliveryMode{email_security.SettingDomainEditParamsAllowedDeliveryModeDirect}), + Domain: cloudflare.F("domain"), + DropDispositions: cloudflare.F([]email_security.SettingDomainEditParamsDropDisposition{email_security.SettingDomainEditParamsDropDispositionMalicious}), + Folder: cloudflare.F(email_security.SettingDomainEditParamsFolderAllItems), + IntegrationID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), + LookbackHops: cloudflare.F(int64(1)), + Regions: cloudflare.F([]email_security.SettingDomainEditParamsRegion{email_security.SettingDomainEditParamsRegionGlobal}), + RequireTLSInbound: cloudflare.F(true), + RequireTLSOutbound: cloudflare.F(true), + Transport: cloudflare.F("transport"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingDomainGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.Domains.Get( + context.TODO(), + int64(2400), + email_security.SettingDomainGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/settingimpersonationregistry.go b/email_security/settingimpersonationregistry.go index c8b90b33813..c2c9c8c9441 100644 --- a/email_security/settingimpersonationregistry.go +++ b/email_security/settingimpersonationregistry.go @@ -3,7 +3,21 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" + "github.com/cloudflare/cloudflare-go/v6/shared" ) // SettingImpersonationRegistryService contains methods and other services that @@ -24,3 +38,506 @@ func NewSettingImpersonationRegistryService(opts ...option.RequestOption) (r *Se r.Options = opts return } + +// Create an entry in impersonation registry +func (r *SettingImpersonationRegistryService) New(ctx context.Context, params SettingImpersonationRegistryNewParams, opts ...option.RequestOption) (res *SettingImpersonationRegistryNewResponse, err error) { + var env SettingImpersonationRegistryNewResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry", params.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Lists, searches, and sorts entries in the impersonation registry. +func (r *SettingImpersonationRegistryService) List(ctx context.Context, params SettingImpersonationRegistryListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingImpersonationRegistryListResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Lists, searches, and sorts entries in the impersonation registry. +func (r *SettingImpersonationRegistryService) ListAutoPaging(ctx context.Context, params SettingImpersonationRegistryListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingImpersonationRegistryListResponse] { + return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) +} + +// Delete an entry from impersonation registry +func (r *SettingImpersonationRegistryService) Delete(ctx context.Context, displayNameID int64, body SettingImpersonationRegistryDeleteParams, opts ...option.RequestOption) (res *SettingImpersonationRegistryDeleteResponse, err error) { + var env SettingImpersonationRegistryDeleteResponseEnvelope + opts = slices.Concat(r.Options, opts) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry/%v", body.AccountID, displayNameID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Update an entry in impersonation registry +func (r *SettingImpersonationRegistryService) Edit(ctx context.Context, displayNameID int64, params SettingImpersonationRegistryEditParams, opts ...option.RequestOption) (res *SettingImpersonationRegistryEditResponse, err error) { + var env SettingImpersonationRegistryEditResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry/%v", params.AccountID, displayNameID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Get an entry in impersonation registry +func (r *SettingImpersonationRegistryService) Get(ctx context.Context, displayNameID int64, query SettingImpersonationRegistryGetParams, opts ...option.RequestOption) (res *SettingImpersonationRegistryGetResponse, err error) { + var env SettingImpersonationRegistryGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/impersonation_registry/%v", query.AccountID, displayNameID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type SettingImpersonationRegistryNewResponse struct { + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Email string `json:"email,required"` + IsEmailRegex bool `json:"is_email_regex,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Name string `json:"name,required"` + Comments string `json:"comments,nullable"` + DirectoryID int64 `json:"directory_id,nullable"` + DirectoryNodeID int64 `json:"directory_node_id,nullable"` + // Deprecated: deprecated + ExternalDirectoryNodeID string `json:"external_directory_node_id,nullable"` + Provenance string `json:"provenance,nullable"` + JSON settingImpersonationRegistryNewResponseJSON `json:"-"` +} + +// settingImpersonationRegistryNewResponseJSON contains the JSON metadata for the +// struct [SettingImpersonationRegistryNewResponse] +type settingImpersonationRegistryNewResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Email apijson.Field + IsEmailRegex apijson.Field + LastModified apijson.Field + Name apijson.Field + Comments apijson.Field + DirectoryID apijson.Field + DirectoryNodeID apijson.Field + ExternalDirectoryNodeID apijson.Field + Provenance apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingImpersonationRegistryNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingImpersonationRegistryNewResponseJSON) RawJSON() string { + return r.raw +} + +type SettingImpersonationRegistryListResponse struct { + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Email string `json:"email,required"` + IsEmailRegex bool `json:"is_email_regex,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Name string `json:"name,required"` + Comments string `json:"comments,nullable"` + DirectoryID int64 `json:"directory_id,nullable"` + DirectoryNodeID int64 `json:"directory_node_id,nullable"` + // Deprecated: deprecated + ExternalDirectoryNodeID string `json:"external_directory_node_id,nullable"` + Provenance string `json:"provenance,nullable"` + JSON settingImpersonationRegistryListResponseJSON `json:"-"` +} + +// settingImpersonationRegistryListResponseJSON contains the JSON metadata for the +// struct [SettingImpersonationRegistryListResponse] +type settingImpersonationRegistryListResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Email apijson.Field + IsEmailRegex apijson.Field + LastModified apijson.Field + Name apijson.Field + Comments apijson.Field + DirectoryID apijson.Field + DirectoryNodeID apijson.Field + ExternalDirectoryNodeID apijson.Field + Provenance apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingImpersonationRegistryListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingImpersonationRegistryListResponseJSON) RawJSON() string { + return r.raw +} + +type SettingImpersonationRegistryDeleteResponse struct { + ID int64 `json:"id,required"` + JSON settingImpersonationRegistryDeleteResponseJSON `json:"-"` +} + +// settingImpersonationRegistryDeleteResponseJSON contains the JSON metadata for +// the struct [SettingImpersonationRegistryDeleteResponse] +type settingImpersonationRegistryDeleteResponseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingImpersonationRegistryDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingImpersonationRegistryDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type SettingImpersonationRegistryEditResponse struct { + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Email string `json:"email,required"` + IsEmailRegex bool `json:"is_email_regex,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Name string `json:"name,required"` + Comments string `json:"comments,nullable"` + DirectoryID int64 `json:"directory_id,nullable"` + DirectoryNodeID int64 `json:"directory_node_id,nullable"` + // Deprecated: deprecated + ExternalDirectoryNodeID string `json:"external_directory_node_id,nullable"` + Provenance string `json:"provenance,nullable"` + JSON settingImpersonationRegistryEditResponseJSON `json:"-"` +} + +// settingImpersonationRegistryEditResponseJSON contains the JSON metadata for the +// struct [SettingImpersonationRegistryEditResponse] +type settingImpersonationRegistryEditResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Email apijson.Field + IsEmailRegex apijson.Field + LastModified apijson.Field + Name apijson.Field + Comments apijson.Field + DirectoryID apijson.Field + DirectoryNodeID apijson.Field + ExternalDirectoryNodeID apijson.Field + Provenance apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingImpersonationRegistryEditResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingImpersonationRegistryEditResponseJSON) RawJSON() string { + return r.raw +} + +type SettingImpersonationRegistryGetResponse struct { + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Email string `json:"email,required"` + IsEmailRegex bool `json:"is_email_regex,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Name string `json:"name,required"` + Comments string `json:"comments,nullable"` + DirectoryID int64 `json:"directory_id,nullable"` + DirectoryNodeID int64 `json:"directory_node_id,nullable"` + // Deprecated: deprecated + ExternalDirectoryNodeID string `json:"external_directory_node_id,nullable"` + Provenance string `json:"provenance,nullable"` + JSON settingImpersonationRegistryGetResponseJSON `json:"-"` +} + +// settingImpersonationRegistryGetResponseJSON contains the JSON metadata for the +// struct [SettingImpersonationRegistryGetResponse] +type settingImpersonationRegistryGetResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + Email apijson.Field + IsEmailRegex apijson.Field + LastModified apijson.Field + Name apijson.Field + Comments apijson.Field + DirectoryID apijson.Field + DirectoryNodeID apijson.Field + ExternalDirectoryNodeID apijson.Field + Provenance apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingImpersonationRegistryGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingImpersonationRegistryGetResponseJSON) RawJSON() string { + return r.raw +} + +type SettingImpersonationRegistryNewParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + Email param.Field[string] `json:"email,required"` + IsEmailRegex param.Field[bool] `json:"is_email_regex,required"` + Name param.Field[string] `json:"name,required"` +} + +func (r SettingImpersonationRegistryNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SettingImpersonationRegistryNewResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingImpersonationRegistryNewResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingImpersonationRegistryNewResponseEnvelopeJSON `json:"-"` +} + +// settingImpersonationRegistryNewResponseEnvelopeJSON contains the JSON metadata +// for the struct [SettingImpersonationRegistryNewResponseEnvelope] +type settingImpersonationRegistryNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingImpersonationRegistryNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingImpersonationRegistryNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingImpersonationRegistryListParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // The sorting direction. + Direction param.Field[SettingImpersonationRegistryListParamsDirection] `query:"direction"` + // The field to sort by. + Order param.Field[SettingImpersonationRegistryListParamsOrder] `query:"order"` + // The page number of paginated results. + Page param.Field[int64] `query:"page"` + // The number of results per page. + PerPage param.Field[int64] `query:"per_page"` + Provenance param.Field[SettingImpersonationRegistryListParamsProvenance] `query:"provenance"` + // Allows searching in multiple properties of a record simultaneously. This + // parameter is intended for human users, not automation. Its exact behavior is + // intentionally left unspecified and is subject to change in the future. + Search param.Field[string] `query:"search"` +} + +// URLQuery serializes [SettingImpersonationRegistryListParams]'s query parameters +// as `url.Values`. +func (r SettingImpersonationRegistryListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + +// The sorting direction. +type SettingImpersonationRegistryListParamsDirection string + +const ( + SettingImpersonationRegistryListParamsDirectionAsc SettingImpersonationRegistryListParamsDirection = "asc" + SettingImpersonationRegistryListParamsDirectionDesc SettingImpersonationRegistryListParamsDirection = "desc" +) + +func (r SettingImpersonationRegistryListParamsDirection) IsKnown() bool { + switch r { + case SettingImpersonationRegistryListParamsDirectionAsc, SettingImpersonationRegistryListParamsDirectionDesc: + return true + } + return false +} + +// The field to sort by. +type SettingImpersonationRegistryListParamsOrder string + +const ( + SettingImpersonationRegistryListParamsOrderName SettingImpersonationRegistryListParamsOrder = "name" + SettingImpersonationRegistryListParamsOrderEmail SettingImpersonationRegistryListParamsOrder = "email" + SettingImpersonationRegistryListParamsOrderCreatedAt SettingImpersonationRegistryListParamsOrder = "created_at" +) + +func (r SettingImpersonationRegistryListParamsOrder) IsKnown() bool { + switch r { + case SettingImpersonationRegistryListParamsOrderName, SettingImpersonationRegistryListParamsOrderEmail, SettingImpersonationRegistryListParamsOrderCreatedAt: + return true + } + return false +} + +type SettingImpersonationRegistryListParamsProvenance string + +const ( + SettingImpersonationRegistryListParamsProvenanceA1SInternal SettingImpersonationRegistryListParamsProvenance = "A1S_INTERNAL" + SettingImpersonationRegistryListParamsProvenanceSnoopyCasbOffice365 SettingImpersonationRegistryListParamsProvenance = "SNOOPY-CASB_OFFICE_365" + SettingImpersonationRegistryListParamsProvenanceSnoopyOffice365 SettingImpersonationRegistryListParamsProvenance = "SNOOPY-OFFICE_365" + SettingImpersonationRegistryListParamsProvenanceSnoopyGoogleDirectory SettingImpersonationRegistryListParamsProvenance = "SNOOPY-GOOGLE_DIRECTORY" +) + +func (r SettingImpersonationRegistryListParamsProvenance) IsKnown() bool { + switch r { + case SettingImpersonationRegistryListParamsProvenanceA1SInternal, SettingImpersonationRegistryListParamsProvenanceSnoopyCasbOffice365, SettingImpersonationRegistryListParamsProvenanceSnoopyOffice365, SettingImpersonationRegistryListParamsProvenanceSnoopyGoogleDirectory: + return true + } + return false +} + +type SettingImpersonationRegistryDeleteParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingImpersonationRegistryDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingImpersonationRegistryDeleteResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingImpersonationRegistryDeleteResponseEnvelopeJSON `json:"-"` +} + +// settingImpersonationRegistryDeleteResponseEnvelopeJSON contains the JSON +// metadata for the struct [SettingImpersonationRegistryDeleteResponseEnvelope] +type settingImpersonationRegistryDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingImpersonationRegistryDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingImpersonationRegistryDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingImpersonationRegistryEditParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + Email param.Field[string] `json:"email"` + IsEmailRegex param.Field[bool] `json:"is_email_regex"` + Name param.Field[string] `json:"name"` +} + +func (r SettingImpersonationRegistryEditParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SettingImpersonationRegistryEditResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingImpersonationRegistryEditResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingImpersonationRegistryEditResponseEnvelopeJSON `json:"-"` +} + +// settingImpersonationRegistryEditResponseEnvelopeJSON contains the JSON metadata +// for the struct [SettingImpersonationRegistryEditResponseEnvelope] +type settingImpersonationRegistryEditResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingImpersonationRegistryEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingImpersonationRegistryEditResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingImpersonationRegistryGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingImpersonationRegistryGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingImpersonationRegistryGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingImpersonationRegistryGetResponseEnvelopeJSON `json:"-"` +} + +// settingImpersonationRegistryGetResponseEnvelopeJSON contains the JSON metadata +// for the struct [SettingImpersonationRegistryGetResponseEnvelope] +type settingImpersonationRegistryGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingImpersonationRegistryGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingImpersonationRegistryGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/settingimpersonationregistry_test.go b/email_security/settingimpersonationregistry_test.go new file mode 100644 index 00000000000..a88127488b8 --- /dev/null +++ b/email_security/settingimpersonationregistry_test.go @@ -0,0 +1,164 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestSettingImpersonationRegistryNew(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.ImpersonationRegistry.New(context.TODO(), email_security.SettingImpersonationRegistryNewParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Email: cloudflare.F("email"), + IsEmailRegex: cloudflare.F(true), + Name: cloudflare.F("name"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingImpersonationRegistryListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.ImpersonationRegistry.List(context.TODO(), email_security.SettingImpersonationRegistryListParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Direction: cloudflare.F(email_security.SettingImpersonationRegistryListParamsDirectionAsc), + Order: cloudflare.F(email_security.SettingImpersonationRegistryListParamsOrderName), + Page: cloudflare.F(int64(1)), + PerPage: cloudflare.F(int64(1)), + Provenance: cloudflare.F(email_security.SettingImpersonationRegistryListParamsProvenanceA1SInternal), + Search: cloudflare.F("search"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingImpersonationRegistryDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.ImpersonationRegistry.Delete( + context.TODO(), + int64(2403), + email_security.SettingImpersonationRegistryDeleteParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingImpersonationRegistryEditWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.ImpersonationRegistry.Edit( + context.TODO(), + int64(2403), + email_security.SettingImpersonationRegistryEditParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Email: cloudflare.F("email"), + IsEmailRegex: cloudflare.F(true), + Name: cloudflare.F("name"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingImpersonationRegistryGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.ImpersonationRegistry.Get( + context.TODO(), + int64(2403), + email_security.SettingImpersonationRegistryGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/settingtrusteddomain.go b/email_security/settingtrusteddomain.go index 26ddc2eb8b2..f4549ace03d 100644 --- a/email_security/settingtrusteddomain.go +++ b/email_security/settingtrusteddomain.go @@ -3,7 +3,23 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "reflect" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" + "github.com/cloudflare/cloudflare-go/v6/shared" + "github.com/tidwall/gjson" ) // SettingTrustedDomainService contains methods and other services that help with @@ -24,3 +40,602 @@ func NewSettingTrustedDomainService(opts ...option.RequestOption) (r *SettingTru r.Options = opts return } + +// Create a trusted email domain +func (r *SettingTrustedDomainService) New(ctx context.Context, params SettingTrustedDomainNewParams, opts ...option.RequestOption) (res *SettingTrustedDomainNewResponseUnion, err error) { + var env SettingTrustedDomainNewResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains", params.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Lists, searches, and sorts an account’s trusted email domains. +func (r *SettingTrustedDomainService) List(ctx context.Context, params SettingTrustedDomainListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingTrustedDomainListResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// Lists, searches, and sorts an account’s trusted email domains. +func (r *SettingTrustedDomainService) ListAutoPaging(ctx context.Context, params SettingTrustedDomainListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingTrustedDomainListResponse] { + return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) +} + +// Delete a trusted email domain +func (r *SettingTrustedDomainService) Delete(ctx context.Context, trustedDomainID int64, body SettingTrustedDomainDeleteParams, opts ...option.RequestOption) (res *SettingTrustedDomainDeleteResponse, err error) { + var env SettingTrustedDomainDeleteResponseEnvelope + opts = slices.Concat(r.Options, opts) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains/%v", body.AccountID, trustedDomainID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Update a trusted email domain +func (r *SettingTrustedDomainService) Edit(ctx context.Context, trustedDomainID int64, params SettingTrustedDomainEditParams, opts ...option.RequestOption) (res *SettingTrustedDomainEditResponse, err error) { + var env SettingTrustedDomainEditResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains/%v", params.AccountID, trustedDomainID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPatch, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Get a trusted email domain +func (r *SettingTrustedDomainService) Get(ctx context.Context, trustedDomainID int64, query SettingTrustedDomainGetParams, opts ...option.RequestOption) (res *SettingTrustedDomainGetResponse, err error) { + var env SettingTrustedDomainGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/settings/trusted_domains/%v", query.AccountID, trustedDomainID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Union satisfied by [SettingTrustedDomainNewResponseEmailSecurityTrustedDomain] +// or [SettingTrustedDomainNewResponseArray]. +type SettingTrustedDomainNewResponseUnion interface { + implementsSettingTrustedDomainNewResponseUnion() +} + +func init() { + apijson.RegisterUnion( + reflect.TypeOf((*SettingTrustedDomainNewResponseUnion)(nil)).Elem(), + "", + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(SettingTrustedDomainNewResponseEmailSecurityTrustedDomain{}), + }, + apijson.UnionVariant{ + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(SettingTrustedDomainNewResponseArray{}), + }, + ) +} + +type SettingTrustedDomainNewResponseEmailSecurityTrustedDomain struct { + // The unique identifier for the trusted domain. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // Select to prevent recently registered domains from triggering a Suspicious or + // Malicious disposition. + IsRecent bool `json:"is_recent,required"` + IsRegex bool `json:"is_regex,required"` + // Select for partner or other approved domains that have similar spelling to your + // connected domains. Prevents listed domains from triggering a Spoof disposition. + IsSimilarity bool `json:"is_similarity,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + Comments string `json:"comments,nullable"` + JSON settingTrustedDomainNewResponseEmailSecurityTrustedDomainJSON `json:"-"` +} + +// settingTrustedDomainNewResponseEmailSecurityTrustedDomainJSON contains the JSON +// metadata for the struct +// [SettingTrustedDomainNewResponseEmailSecurityTrustedDomain] +type settingTrustedDomainNewResponseEmailSecurityTrustedDomainJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsRecent apijson.Field + IsRegex apijson.Field + IsSimilarity apijson.Field + LastModified apijson.Field + Pattern apijson.Field + Comments apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainNewResponseEmailSecurityTrustedDomain) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainNewResponseEmailSecurityTrustedDomainJSON) RawJSON() string { + return r.raw +} + +func (r SettingTrustedDomainNewResponseEmailSecurityTrustedDomain) implementsSettingTrustedDomainNewResponseUnion() { +} + +type SettingTrustedDomainNewResponseArray []SettingTrustedDomainNewResponseArrayItem + +func (r SettingTrustedDomainNewResponseArray) implementsSettingTrustedDomainNewResponseUnion() {} + +type SettingTrustedDomainNewResponseArrayItem struct { + // The unique identifier for the trusted domain. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // Select to prevent recently registered domains from triggering a Suspicious or + // Malicious disposition. + IsRecent bool `json:"is_recent,required"` + IsRegex bool `json:"is_regex,required"` + // Select for partner or other approved domains that have similar spelling to your + // connected domains. Prevents listed domains from triggering a Spoof disposition. + IsSimilarity bool `json:"is_similarity,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + Comments string `json:"comments,nullable"` + JSON settingTrustedDomainNewResponseArrayItemJSON `json:"-"` +} + +// settingTrustedDomainNewResponseArrayItemJSON contains the JSON metadata for the +// struct [SettingTrustedDomainNewResponseArrayItem] +type settingTrustedDomainNewResponseArrayItemJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsRecent apijson.Field + IsRegex apijson.Field + IsSimilarity apijson.Field + LastModified apijson.Field + Pattern apijson.Field + Comments apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainNewResponseArrayItem) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainNewResponseArrayItemJSON) RawJSON() string { + return r.raw +} + +type SettingTrustedDomainListResponse struct { + // The unique identifier for the trusted domain. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // Select to prevent recently registered domains from triggering a Suspicious or + // Malicious disposition. + IsRecent bool `json:"is_recent,required"` + IsRegex bool `json:"is_regex,required"` + // Select for partner or other approved domains that have similar spelling to your + // connected domains. Prevents listed domains from triggering a Spoof disposition. + IsSimilarity bool `json:"is_similarity,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + Comments string `json:"comments,nullable"` + JSON settingTrustedDomainListResponseJSON `json:"-"` +} + +// settingTrustedDomainListResponseJSON contains the JSON metadata for the struct +// [SettingTrustedDomainListResponse] +type settingTrustedDomainListResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsRecent apijson.Field + IsRegex apijson.Field + IsSimilarity apijson.Field + LastModified apijson.Field + Pattern apijson.Field + Comments apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainListResponseJSON) RawJSON() string { + return r.raw +} + +type SettingTrustedDomainDeleteResponse struct { + // The unique identifier for the trusted domain. + ID int64 `json:"id,required"` + JSON settingTrustedDomainDeleteResponseJSON `json:"-"` +} + +// settingTrustedDomainDeleteResponseJSON contains the JSON metadata for the struct +// [SettingTrustedDomainDeleteResponse] +type settingTrustedDomainDeleteResponseJSON struct { + ID apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainDeleteResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainDeleteResponseJSON) RawJSON() string { + return r.raw +} + +type SettingTrustedDomainEditResponse struct { + // The unique identifier for the trusted domain. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // Select to prevent recently registered domains from triggering a Suspicious or + // Malicious disposition. + IsRecent bool `json:"is_recent,required"` + IsRegex bool `json:"is_regex,required"` + // Select for partner or other approved domains that have similar spelling to your + // connected domains. Prevents listed domains from triggering a Spoof disposition. + IsSimilarity bool `json:"is_similarity,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + Comments string `json:"comments,nullable"` + JSON settingTrustedDomainEditResponseJSON `json:"-"` +} + +// settingTrustedDomainEditResponseJSON contains the JSON metadata for the struct +// [SettingTrustedDomainEditResponse] +type settingTrustedDomainEditResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsRecent apijson.Field + IsRegex apijson.Field + IsSimilarity apijson.Field + LastModified apijson.Field + Pattern apijson.Field + Comments apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainEditResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainEditResponseJSON) RawJSON() string { + return r.raw +} + +type SettingTrustedDomainGetResponse struct { + // The unique identifier for the trusted domain. + ID int64 `json:"id,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + // Select to prevent recently registered domains from triggering a Suspicious or + // Malicious disposition. + IsRecent bool `json:"is_recent,required"` + IsRegex bool `json:"is_regex,required"` + // Select for partner or other approved domains that have similar spelling to your + // connected domains. Prevents listed domains from triggering a Spoof disposition. + IsSimilarity bool `json:"is_similarity,required"` + LastModified time.Time `json:"last_modified,required" format:"date-time"` + Pattern string `json:"pattern,required"` + Comments string `json:"comments,nullable"` + JSON settingTrustedDomainGetResponseJSON `json:"-"` +} + +// settingTrustedDomainGetResponseJSON contains the JSON metadata for the struct +// [SettingTrustedDomainGetResponse] +type settingTrustedDomainGetResponseJSON struct { + ID apijson.Field + CreatedAt apijson.Field + IsRecent apijson.Field + IsRegex apijson.Field + IsSimilarity apijson.Field + LastModified apijson.Field + Pattern apijson.Field + Comments apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainGetResponseJSON) RawJSON() string { + return r.raw +} + +type SettingTrustedDomainNewParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + Body SettingTrustedDomainNewParamsBodyUnion `json:"body,required"` +} + +func (r SettingTrustedDomainNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r.Body) +} + +// Satisfied by +// [email_security.SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain], +// [email_security.SettingTrustedDomainNewParamsBodyArray]. +type SettingTrustedDomainNewParamsBodyUnion interface { + implementsSettingTrustedDomainNewParamsBodyUnion() +} + +type SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain struct { + // Select to prevent recently registered domains from triggering a Suspicious or + // Malicious disposition. + IsRecent param.Field[bool] `json:"is_recent,required"` + IsRegex param.Field[bool] `json:"is_regex,required"` + // Select for partner or other approved domains that have similar spelling to your + // connected domains. Prevents listed domains from triggering a Spoof disposition. + IsSimilarity param.Field[bool] `json:"is_similarity,required"` + Pattern param.Field[string] `json:"pattern,required"` + Comments param.Field[string] `json:"comments"` +} + +func (r SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain) implementsSettingTrustedDomainNewParamsBodyUnion() { +} + +type SettingTrustedDomainNewParamsBodyArray []SettingTrustedDomainNewParamsBodyArrayItem + +func (r SettingTrustedDomainNewParamsBodyArray) implementsSettingTrustedDomainNewParamsBodyUnion() {} + +type SettingTrustedDomainNewParamsBodyArrayItem struct { + // Select to prevent recently registered domains from triggering a Suspicious or + // Malicious disposition. + IsRecent param.Field[bool] `json:"is_recent,required"` + IsRegex param.Field[bool] `json:"is_regex,required"` + // Select for partner or other approved domains that have similar spelling to your + // connected domains. Prevents listed domains from triggering a Spoof disposition. + IsSimilarity param.Field[bool] `json:"is_similarity,required"` + Pattern param.Field[string] `json:"pattern,required"` + Comments param.Field[string] `json:"comments"` +} + +func (r SettingTrustedDomainNewParamsBodyArrayItem) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SettingTrustedDomainNewResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingTrustedDomainNewResponseUnion `json:"result,required"` + Success bool `json:"success,required"` + JSON settingTrustedDomainNewResponseEnvelopeJSON `json:"-"` +} + +// settingTrustedDomainNewResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingTrustedDomainNewResponseEnvelope] +type settingTrustedDomainNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingTrustedDomainListParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // The sorting direction. + Direction param.Field[SettingTrustedDomainListParamsDirection] `query:"direction"` + IsRecent param.Field[bool] `query:"is_recent"` + IsSimilarity param.Field[bool] `query:"is_similarity"` + // The field to sort by. + Order param.Field[SettingTrustedDomainListParamsOrder] `query:"order"` + // The page number of paginated results. + Page param.Field[int64] `query:"page"` + Pattern param.Field[string] `query:"pattern"` + // The number of results per page. + PerPage param.Field[int64] `query:"per_page"` + // Allows searching in multiple properties of a record simultaneously. This + // parameter is intended for human users, not automation. Its exact behavior is + // intentionally left unspecified and is subject to change in the future. + Search param.Field[string] `query:"search"` +} + +// URLQuery serializes [SettingTrustedDomainListParams]'s query parameters as +// `url.Values`. +func (r SettingTrustedDomainListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + +// The sorting direction. +type SettingTrustedDomainListParamsDirection string + +const ( + SettingTrustedDomainListParamsDirectionAsc SettingTrustedDomainListParamsDirection = "asc" + SettingTrustedDomainListParamsDirectionDesc SettingTrustedDomainListParamsDirection = "desc" +) + +func (r SettingTrustedDomainListParamsDirection) IsKnown() bool { + switch r { + case SettingTrustedDomainListParamsDirectionAsc, SettingTrustedDomainListParamsDirectionDesc: + return true + } + return false +} + +// The field to sort by. +type SettingTrustedDomainListParamsOrder string + +const ( + SettingTrustedDomainListParamsOrderPattern SettingTrustedDomainListParamsOrder = "pattern" + SettingTrustedDomainListParamsOrderCreatedAt SettingTrustedDomainListParamsOrder = "created_at" +) + +func (r SettingTrustedDomainListParamsOrder) IsKnown() bool { + switch r { + case SettingTrustedDomainListParamsOrderPattern, SettingTrustedDomainListParamsOrderCreatedAt: + return true + } + return false +} + +type SettingTrustedDomainDeleteParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingTrustedDomainDeleteResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingTrustedDomainDeleteResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingTrustedDomainDeleteResponseEnvelopeJSON `json:"-"` +} + +// settingTrustedDomainDeleteResponseEnvelopeJSON contains the JSON metadata for +// the struct [SettingTrustedDomainDeleteResponseEnvelope] +type settingTrustedDomainDeleteResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainDeleteResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingTrustedDomainEditParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + Comments param.Field[string] `json:"comments"` + // Select to prevent recently registered domains from triggering a Suspicious or + // Malicious disposition. + IsRecent param.Field[bool] `json:"is_recent"` + IsRegex param.Field[bool] `json:"is_regex"` + // Select for partner or other approved domains that have similar spelling to your + // connected domains. Prevents listed domains from triggering a Spoof disposition. + IsSimilarity param.Field[bool] `json:"is_similarity"` + Pattern param.Field[string] `json:"pattern"` +} + +func (r SettingTrustedDomainEditParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type SettingTrustedDomainEditResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingTrustedDomainEditResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingTrustedDomainEditResponseEnvelopeJSON `json:"-"` +} + +// settingTrustedDomainEditResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingTrustedDomainEditResponseEnvelope] +type settingTrustedDomainEditResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainEditResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainEditResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type SettingTrustedDomainGetParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` +} + +type SettingTrustedDomainGetResponseEnvelope struct { + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result SettingTrustedDomainGetResponse `json:"result,required"` + Success bool `json:"success,required"` + JSON settingTrustedDomainGetResponseEnvelopeJSON `json:"-"` +} + +// settingTrustedDomainGetResponseEnvelopeJSON contains the JSON metadata for the +// struct [SettingTrustedDomainGetResponseEnvelope] +type settingTrustedDomainGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Result apijson.Field + Success apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SettingTrustedDomainGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r settingTrustedDomainGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} diff --git a/email_security/settingtrusteddomain_test.go b/email_security/settingtrusteddomain_test.go new file mode 100644 index 00000000000..5891ea11fcd --- /dev/null +++ b/email_security/settingtrusteddomain_test.go @@ -0,0 +1,173 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestSettingTrustedDomainNewWithOptionalParams(t *testing.T) { + t.Skip("TODO: investigate HTTP 422 errors on test suite") + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.TrustedDomains.New(context.TODO(), email_security.SettingTrustedDomainNewParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Body: email_security.SettingTrustedDomainNewParamsBodyEmailSecurityCreateTrustedDomain{ + IsRecent: cloudflare.F(true), + IsRegex: cloudflare.F(false), + IsSimilarity: cloudflare.F(false), + Pattern: cloudflare.F("example.com"), + Comments: cloudflare.Null[string](), + }, + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingTrustedDomainListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.TrustedDomains.List(context.TODO(), email_security.SettingTrustedDomainListParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Direction: cloudflare.F(email_security.SettingTrustedDomainListParamsDirectionAsc), + IsRecent: cloudflare.F(true), + IsSimilarity: cloudflare.F(true), + Order: cloudflare.F(email_security.SettingTrustedDomainListParamsOrderPattern), + Page: cloudflare.F(int64(1)), + Pattern: cloudflare.F("pattern"), + PerPage: cloudflare.F(int64(1)), + Search: cloudflare.F("search"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingTrustedDomainDelete(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.TrustedDomains.Delete( + context.TODO(), + int64(2401), + email_security.SettingTrustedDomainDeleteParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingTrustedDomainEditWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.TrustedDomains.Edit( + context.TODO(), + int64(2401), + email_security.SettingTrustedDomainEditParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Comments: cloudflare.F("comments"), + IsRecent: cloudflare.F(true), + IsRegex: cloudflare.F(true), + IsSimilarity: cloudflare.F(true), + Pattern: cloudflare.F("x"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestSettingTrustedDomainGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Settings.TrustedDomains.Get( + context.TODO(), + int64(2401), + email_security.SettingTrustedDomainGetParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/email_security/submission.go b/email_security/submission.go index 22f671e591c..0fc5ebceaef 100644 --- a/email_security/submission.go +++ b/email_security/submission.go @@ -3,7 +3,20 @@ package email_security import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/packages/pagination" ) // SubmissionService contains methods and other services that help with interacting @@ -24,3 +37,240 @@ func NewSubmissionService(opts ...option.RequestOption) (r *SubmissionService) { r.Options = opts return } + +// This endpoint returns information for submissions to made to reclassify emails. +func (r *SubmissionService) List(ctx context.Context, params SubmissionListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SubmissionListResponse], err error) { + var raw *http.Response + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/email-security/submissions", params.AccountID) + cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, params, &res, opts...) + if err != nil { + return nil, err + } + err = cfg.Execute() + if err != nil { + return nil, err + } + res.SetPageConfig(cfg, raw) + return res, nil +} + +// This endpoint returns information for submissions to made to reclassify emails. +func (r *SubmissionService) ListAutoPaging(ctx context.Context, params SubmissionListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SubmissionListResponse] { + return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) +} + +type SubmissionListResponse struct { + RequestedTs time.Time `json:"requested_ts,required" format:"date-time"` + SubmissionID string `json:"submission_id,required"` + OriginalDisposition SubmissionListResponseOriginalDisposition `json:"original_disposition,nullable"` + OriginalEdfHash string `json:"original_edf_hash,nullable"` + Outcome string `json:"outcome,nullable"` + OutcomeDisposition SubmissionListResponseOutcomeDisposition `json:"outcome_disposition,nullable"` + RequestedBy string `json:"requested_by,nullable"` + RequestedDisposition SubmissionListResponseRequestedDisposition `json:"requested_disposition,nullable"` + Status string `json:"status,nullable"` + Subject string `json:"subject,nullable"` + Type string `json:"type,nullable"` + JSON submissionListResponseJSON `json:"-"` +} + +// submissionListResponseJSON contains the JSON metadata for the struct +// [SubmissionListResponse] +type submissionListResponseJSON struct { + RequestedTs apijson.Field + SubmissionID apijson.Field + OriginalDisposition apijson.Field + OriginalEdfHash apijson.Field + Outcome apijson.Field + OutcomeDisposition apijson.Field + RequestedBy apijson.Field + RequestedDisposition apijson.Field + Status apijson.Field + Subject apijson.Field + Type apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *SubmissionListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r submissionListResponseJSON) RawJSON() string { + return r.raw +} + +type SubmissionListResponseOriginalDisposition string + +const ( + SubmissionListResponseOriginalDispositionMalicious SubmissionListResponseOriginalDisposition = "MALICIOUS" + SubmissionListResponseOriginalDispositionMaliciousBec SubmissionListResponseOriginalDisposition = "MALICIOUS-BEC" + SubmissionListResponseOriginalDispositionSuspicious SubmissionListResponseOriginalDisposition = "SUSPICIOUS" + SubmissionListResponseOriginalDispositionSpoof SubmissionListResponseOriginalDisposition = "SPOOF" + SubmissionListResponseOriginalDispositionSpam SubmissionListResponseOriginalDisposition = "SPAM" + SubmissionListResponseOriginalDispositionBulk SubmissionListResponseOriginalDisposition = "BULK" + SubmissionListResponseOriginalDispositionEncrypted SubmissionListResponseOriginalDisposition = "ENCRYPTED" + SubmissionListResponseOriginalDispositionExternal SubmissionListResponseOriginalDisposition = "EXTERNAL" + SubmissionListResponseOriginalDispositionUnknown SubmissionListResponseOriginalDisposition = "UNKNOWN" + SubmissionListResponseOriginalDispositionNone SubmissionListResponseOriginalDisposition = "NONE" +) + +func (r SubmissionListResponseOriginalDisposition) IsKnown() bool { + switch r { + case SubmissionListResponseOriginalDispositionMalicious, SubmissionListResponseOriginalDispositionMaliciousBec, SubmissionListResponseOriginalDispositionSuspicious, SubmissionListResponseOriginalDispositionSpoof, SubmissionListResponseOriginalDispositionSpam, SubmissionListResponseOriginalDispositionBulk, SubmissionListResponseOriginalDispositionEncrypted, SubmissionListResponseOriginalDispositionExternal, SubmissionListResponseOriginalDispositionUnknown, SubmissionListResponseOriginalDispositionNone: + return true + } + return false +} + +type SubmissionListResponseOutcomeDisposition string + +const ( + SubmissionListResponseOutcomeDispositionMalicious SubmissionListResponseOutcomeDisposition = "MALICIOUS" + SubmissionListResponseOutcomeDispositionMaliciousBec SubmissionListResponseOutcomeDisposition = "MALICIOUS-BEC" + SubmissionListResponseOutcomeDispositionSuspicious SubmissionListResponseOutcomeDisposition = "SUSPICIOUS" + SubmissionListResponseOutcomeDispositionSpoof SubmissionListResponseOutcomeDisposition = "SPOOF" + SubmissionListResponseOutcomeDispositionSpam SubmissionListResponseOutcomeDisposition = "SPAM" + SubmissionListResponseOutcomeDispositionBulk SubmissionListResponseOutcomeDisposition = "BULK" + SubmissionListResponseOutcomeDispositionEncrypted SubmissionListResponseOutcomeDisposition = "ENCRYPTED" + SubmissionListResponseOutcomeDispositionExternal SubmissionListResponseOutcomeDisposition = "EXTERNAL" + SubmissionListResponseOutcomeDispositionUnknown SubmissionListResponseOutcomeDisposition = "UNKNOWN" + SubmissionListResponseOutcomeDispositionNone SubmissionListResponseOutcomeDisposition = "NONE" +) + +func (r SubmissionListResponseOutcomeDisposition) IsKnown() bool { + switch r { + case SubmissionListResponseOutcomeDispositionMalicious, SubmissionListResponseOutcomeDispositionMaliciousBec, SubmissionListResponseOutcomeDispositionSuspicious, SubmissionListResponseOutcomeDispositionSpoof, SubmissionListResponseOutcomeDispositionSpam, SubmissionListResponseOutcomeDispositionBulk, SubmissionListResponseOutcomeDispositionEncrypted, SubmissionListResponseOutcomeDispositionExternal, SubmissionListResponseOutcomeDispositionUnknown, SubmissionListResponseOutcomeDispositionNone: + return true + } + return false +} + +type SubmissionListResponseRequestedDisposition string + +const ( + SubmissionListResponseRequestedDispositionMalicious SubmissionListResponseRequestedDisposition = "MALICIOUS" + SubmissionListResponseRequestedDispositionMaliciousBec SubmissionListResponseRequestedDisposition = "MALICIOUS-BEC" + SubmissionListResponseRequestedDispositionSuspicious SubmissionListResponseRequestedDisposition = "SUSPICIOUS" + SubmissionListResponseRequestedDispositionSpoof SubmissionListResponseRequestedDisposition = "SPOOF" + SubmissionListResponseRequestedDispositionSpam SubmissionListResponseRequestedDisposition = "SPAM" + SubmissionListResponseRequestedDispositionBulk SubmissionListResponseRequestedDisposition = "BULK" + SubmissionListResponseRequestedDispositionEncrypted SubmissionListResponseRequestedDisposition = "ENCRYPTED" + SubmissionListResponseRequestedDispositionExternal SubmissionListResponseRequestedDisposition = "EXTERNAL" + SubmissionListResponseRequestedDispositionUnknown SubmissionListResponseRequestedDisposition = "UNKNOWN" + SubmissionListResponseRequestedDispositionNone SubmissionListResponseRequestedDisposition = "NONE" +) + +func (r SubmissionListResponseRequestedDisposition) IsKnown() bool { + switch r { + case SubmissionListResponseRequestedDispositionMalicious, SubmissionListResponseRequestedDispositionMaliciousBec, SubmissionListResponseRequestedDispositionSuspicious, SubmissionListResponseRequestedDispositionSpoof, SubmissionListResponseRequestedDispositionSpam, SubmissionListResponseRequestedDispositionBulk, SubmissionListResponseRequestedDispositionEncrypted, SubmissionListResponseRequestedDispositionExternal, SubmissionListResponseRequestedDispositionUnknown, SubmissionListResponseRequestedDispositionNone: + return true + } + return false +} + +type SubmissionListParams struct { + // Account Identifier + AccountID param.Field[string] `path:"account_id,required"` + // The end of the search date range. Defaults to `now`. + End param.Field[time.Time] `query:"end" format:"date-time"` + OriginalDisposition param.Field[SubmissionListParamsOriginalDisposition] `query:"original_disposition"` + OutcomeDisposition param.Field[SubmissionListParamsOutcomeDisposition] `query:"outcome_disposition"` + // The page number of paginated results. + Page param.Field[int64] `query:"page"` + // The number of results per page. + PerPage param.Field[int64] `query:"per_page"` + Query param.Field[string] `query:"query"` + RequestedDisposition param.Field[SubmissionListParamsRequestedDisposition] `query:"requested_disposition"` + // The beginning of the search date range. Defaults to `now - 30 days`. + Start param.Field[time.Time] `query:"start" format:"date-time"` + Status param.Field[string] `query:"status"` + SubmissionID param.Field[string] `query:"submission_id"` + Type param.Field[SubmissionListParamsType] `query:"type"` +} + +// URLQuery serializes [SubmissionListParams]'s query parameters as `url.Values`. +func (r SubmissionListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + +type SubmissionListParamsOriginalDisposition string + +const ( + SubmissionListParamsOriginalDispositionMalicious SubmissionListParamsOriginalDisposition = "MALICIOUS" + SubmissionListParamsOriginalDispositionSuspicious SubmissionListParamsOriginalDisposition = "SUSPICIOUS" + SubmissionListParamsOriginalDispositionSpoof SubmissionListParamsOriginalDisposition = "SPOOF" + SubmissionListParamsOriginalDispositionSpam SubmissionListParamsOriginalDisposition = "SPAM" + SubmissionListParamsOriginalDispositionBulk SubmissionListParamsOriginalDisposition = "BULK" + SubmissionListParamsOriginalDispositionNone SubmissionListParamsOriginalDisposition = "NONE" +) + +func (r SubmissionListParamsOriginalDisposition) IsKnown() bool { + switch r { + case SubmissionListParamsOriginalDispositionMalicious, SubmissionListParamsOriginalDispositionSuspicious, SubmissionListParamsOriginalDispositionSpoof, SubmissionListParamsOriginalDispositionSpam, SubmissionListParamsOriginalDispositionBulk, SubmissionListParamsOriginalDispositionNone: + return true + } + return false +} + +type SubmissionListParamsOutcomeDisposition string + +const ( + SubmissionListParamsOutcomeDispositionMalicious SubmissionListParamsOutcomeDisposition = "MALICIOUS" + SubmissionListParamsOutcomeDispositionSuspicious SubmissionListParamsOutcomeDisposition = "SUSPICIOUS" + SubmissionListParamsOutcomeDispositionSpoof SubmissionListParamsOutcomeDisposition = "SPOOF" + SubmissionListParamsOutcomeDispositionSpam SubmissionListParamsOutcomeDisposition = "SPAM" + SubmissionListParamsOutcomeDispositionBulk SubmissionListParamsOutcomeDisposition = "BULK" + SubmissionListParamsOutcomeDispositionNone SubmissionListParamsOutcomeDisposition = "NONE" +) + +func (r SubmissionListParamsOutcomeDisposition) IsKnown() bool { + switch r { + case SubmissionListParamsOutcomeDispositionMalicious, SubmissionListParamsOutcomeDispositionSuspicious, SubmissionListParamsOutcomeDispositionSpoof, SubmissionListParamsOutcomeDispositionSpam, SubmissionListParamsOutcomeDispositionBulk, SubmissionListParamsOutcomeDispositionNone: + return true + } + return false +} + +type SubmissionListParamsRequestedDisposition string + +const ( + SubmissionListParamsRequestedDispositionMalicious SubmissionListParamsRequestedDisposition = "MALICIOUS" + SubmissionListParamsRequestedDispositionSuspicious SubmissionListParamsRequestedDisposition = "SUSPICIOUS" + SubmissionListParamsRequestedDispositionSpoof SubmissionListParamsRequestedDisposition = "SPOOF" + SubmissionListParamsRequestedDispositionSpam SubmissionListParamsRequestedDisposition = "SPAM" + SubmissionListParamsRequestedDispositionBulk SubmissionListParamsRequestedDisposition = "BULK" + SubmissionListParamsRequestedDispositionNone SubmissionListParamsRequestedDisposition = "NONE" +) + +func (r SubmissionListParamsRequestedDisposition) IsKnown() bool { + switch r { + case SubmissionListParamsRequestedDispositionMalicious, SubmissionListParamsRequestedDispositionSuspicious, SubmissionListParamsRequestedDispositionSpoof, SubmissionListParamsRequestedDispositionSpam, SubmissionListParamsRequestedDispositionBulk, SubmissionListParamsRequestedDispositionNone: + return true + } + return false +} + +type SubmissionListParamsType string + +const ( + SubmissionListParamsTypeTeam SubmissionListParamsType = "TEAM" + SubmissionListParamsTypeUser SubmissionListParamsType = "USER" +) + +func (r SubmissionListParamsType) IsKnown() bool { + switch r { + case SubmissionListParamsTypeTeam, SubmissionListParamsTypeUser: + return true + } + return false +} diff --git a/email_security/submission_test.go b/email_security/submission_test.go new file mode 100644 index 00000000000..4d5bf1c6d43 --- /dev/null +++ b/email_security/submission_test.go @@ -0,0 +1,52 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package email_security_test + +import ( + "context" + "errors" + "os" + "testing" + "time" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/email_security" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +func TestSubmissionListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.EmailSecurity.Submissions.List(context.TODO(), email_security.SubmissionListParams{ + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + End: cloudflare.F(time.Now()), + OriginalDisposition: cloudflare.F(email_security.SubmissionListParamsOriginalDispositionMalicious), + OutcomeDisposition: cloudflare.F(email_security.SubmissionListParamsOutcomeDispositionMalicious), + Page: cloudflare.F(int64(1)), + PerPage: cloudflare.F(int64(1)), + Query: cloudflare.F("query"), + RequestedDisposition: cloudflare.F(email_security.SubmissionListParamsRequestedDispositionMalicious), + Start: cloudflare.F(time.Now()), + Status: cloudflare.F("status"), + SubmissionID: cloudflare.F("submission_id"), + Type: cloudflare.F(email_security.SubmissionListParamsTypeTeam), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/r2_data_catalog/aliases.go b/r2_data_catalog/aliases.go new file mode 100644 index 00000000000..2f23b148d08 --- /dev/null +++ b/r2_data_catalog/aliases.go @@ -0,0 +1,467 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog + +import ( + "github.com/cloudflare/cloudflare-go/v6/internal/apierror" + "github.com/cloudflare/cloudflare-go/v6/shared" +) + +type Error = apierror.Error + +// This is an alias to an internal type. +type ASN = shared.ASN + +// This is an alias to an internal type. +type ASNParam = shared.ASNParam + +// This is an alias to an internal type. +type AuditLog = shared.AuditLog + +// This is an alias to an internal type. +type AuditLogAction = shared.AuditLogAction + +// This is an alias to an internal type. +type AuditLogActor = shared.AuditLogActor + +// The type of actor, whether a User, Cloudflare Admin, or an Automated System. +// +// This is an alias to an internal type. +type AuditLogActorType = shared.AuditLogActorType + +// This is an alias to an internal value. +const AuditLogActorTypeUser = shared.AuditLogActorTypeUser + +// This is an alias to an internal value. +const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin + +// This is an alias to an internal value. +const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare + +// This is an alias to an internal type. +type AuditLogOwner = shared.AuditLogOwner + +// This is an alias to an internal type. +type AuditLogResource = shared.AuditLogResource + +// The Certificate Authority that will issue the certificate +// +// This is an alias to an internal type. +type CertificateCA = shared.CertificateCA + +// This is an alias to an internal value. +const CertificateCADigicert = shared.CertificateCADigicert + +// This is an alias to an internal value. +const CertificateCAGoogle = shared.CertificateCAGoogle + +// This is an alias to an internal value. +const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt + +// This is an alias to an internal value. +const CertificateCASSLCom = shared.CertificateCASSLCom + +// Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), +// or "keyless-certificate" (for Keyless SSL servers). +// +// This is an alias to an internal type. +type CertificateRequestType = shared.CertificateRequestType + +// This is an alias to an internal value. +const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA + +// This is an alias to an internal value. +const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC + +// This is an alias to an internal value. +const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate + +// A Cloudflare Tunnel that connects your origin to Cloudflare's edge. +// +// This is an alias to an internal type. +type CloudflareTunnel = shared.CloudflareTunnel + +// Indicates if this is a locally or remotely configured tunnel. If `local`, manage +// the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the +// tunnel on the Zero Trust dashboard. +// +// This is an alias to an internal type. +type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc + +// This is an alias to an internal value. +const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal + +// This is an alias to an internal value. +const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare + +// This is an alias to an internal type. +type CloudflareTunnelConnection = shared.CloudflareTunnelConnection + +// The status of the tunnel. Valid values are `inactive` (tunnel has never been +// run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy +// state), `healthy` (tunnel is active and able to serve traffic), or `down` +// (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). +// +// This is an alias to an internal type. +type CloudflareTunnelStatus = shared.CloudflareTunnelStatus + +// This is an alias to an internal value. +const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive + +// This is an alias to an internal value. +const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded + +// This is an alias to an internal value. +const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy + +// This is an alias to an internal value. +const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown + +// The type of tunnel. +// +// This is an alias to an internal type. +type CloudflareTunnelTunType = shared.CloudflareTunnelTunType + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE + +// This is an alias to an internal value. +const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI + +// This is an alias to an internal type. +type ErrorData = shared.ErrorData + +// This is an alias to an internal type. +type ErrorDataSource = shared.ErrorDataSource + +// This is an alias to an internal type. +type Member = shared.Member + +// This is an alias to an internal type. +type MemberPolicy = shared.MemberPolicy + +// Allow or deny operations against the resources. +// +// This is an alias to an internal type. +type MemberPoliciesAccess = shared.MemberPoliciesAccess + +// This is an alias to an internal value. +const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow + +// This is an alias to an internal value. +const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny + +// A named group of permissions that map to a group of operations against +// resources. +// +// This is an alias to an internal type. +type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup + +// Attributes associated to the permission group. +// +// This is an alias to an internal type. +type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta + +// A group of scoped resources. +// +// This is an alias to an internal type. +type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup + +// A scope is a combination of scope objects which provides additional context. +// +// This is an alias to an internal type. +type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope + +// A scope object represents any resource that can have actions applied against +// invite. +// +// This is an alias to an internal type. +type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject + +// Attributes associated to the resource group. +// +// This is an alias to an internal type. +type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta + +// A member's status in the account. +// +// This is an alias to an internal type. +type MemberStatus = shared.MemberStatus + +// This is an alias to an internal value. +const MemberStatusAccepted = shared.MemberStatusAccepted + +// This is an alias to an internal value. +const MemberStatusPending = shared.MemberStatusPending + +// Details of the user associated to the membership. +// +// This is an alias to an internal type. +type MemberUser = shared.MemberUser + +// This is an alias to an internal type. +type Permission = shared.Permission + +// This is an alias to an internal type. +type PermissionGrant = shared.PermissionGrant + +// This is an alias to an internal type. +type PermissionGrantParam = shared.PermissionGrantParam + +// The rate plan applied to the subscription. +// +// This is an alias to an internal type. +type RatePlan = shared.RatePlan + +// The ID of the rate plan. +// +// This is an alias to an internal type. +type RatePlanID = shared.RatePlanID + +// This is an alias to an internal value. +const RatePlanIDFree = shared.RatePlanIDFree + +// This is an alias to an internal value. +const RatePlanIDLite = shared.RatePlanIDLite + +// This is an alias to an internal value. +const RatePlanIDPro = shared.RatePlanIDPro + +// This is an alias to an internal value. +const RatePlanIDProPlus = shared.RatePlanIDProPlus + +// This is an alias to an internal value. +const RatePlanIDBusiness = shared.RatePlanIDBusiness + +// This is an alias to an internal value. +const RatePlanIDEnterprise = shared.RatePlanIDEnterprise + +// This is an alias to an internal value. +const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree + +// This is an alias to an internal value. +const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro + +// This is an alias to an internal value. +const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness + +// This is an alias to an internal value. +const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise + +// The rate plan applied to the subscription. +// +// This is an alias to an internal type. +type RatePlanParam = shared.RatePlanParam + +// This is an alias to an internal type. +type ResponseInfo = shared.ResponseInfo + +// This is an alias to an internal type. +type ResponseInfoSource = shared.ResponseInfoSource + +// This is an alias to an internal type. +type Role = shared.Role + +// This is an alias to an internal type. +type RolePermissions = shared.RolePermissions + +// This is an alias to an internal type. +type RoleParam = shared.RoleParam + +// This is an alias to an internal type. +type RolePermissionsParam = shared.RolePermissionsParam + +// Direction to order DNS records in. +// +// This is an alias to an internal type. +type SortDirection = shared.SortDirection + +// This is an alias to an internal value. +const SortDirectionAsc = shared.SortDirectionAsc + +// This is an alias to an internal value. +const SortDirectionDesc = shared.SortDirectionDesc + +// This is an alias to an internal type. +type Subscription = shared.Subscription + +// How often the subscription is renewed automatically. +// +// This is an alias to an internal type. +type SubscriptionFrequency = shared.SubscriptionFrequency + +// This is an alias to an internal value. +const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly + +// This is an alias to an internal value. +const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly + +// This is an alias to an internal value. +const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly + +// This is an alias to an internal value. +const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly + +// The state that the subscription is in. +// +// This is an alias to an internal type. +type SubscriptionState = shared.SubscriptionState + +// This is an alias to an internal value. +const SubscriptionStateTrial = shared.SubscriptionStateTrial + +// This is an alias to an internal value. +const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned + +// This is an alias to an internal value. +const SubscriptionStatePaid = shared.SubscriptionStatePaid + +// This is an alias to an internal value. +const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment + +// This is an alias to an internal value. +const SubscriptionStateCancelled = shared.SubscriptionStateCancelled + +// This is an alias to an internal value. +const SubscriptionStateFailed = shared.SubscriptionStateFailed + +// This is an alias to an internal value. +const SubscriptionStateExpired = shared.SubscriptionStateExpired + +// This is an alias to an internal type. +type SubscriptionParam = shared.SubscriptionParam + +// This is an alias to an internal type. +type Token = shared.Token + +// This is an alias to an internal type. +type TokenCondition = shared.TokenCondition + +// Client IP restrictions. +// +// This is an alias to an internal type. +type TokenConditionRequestIP = shared.TokenConditionRequestIP + +// Status of the token. +// +// This is an alias to an internal type. +type TokenStatus = shared.TokenStatus + +// This is an alias to an internal value. +const TokenStatusActive = shared.TokenStatusActive + +// This is an alias to an internal value. +const TokenStatusDisabled = shared.TokenStatusDisabled + +// This is an alias to an internal value. +const TokenStatusExpired = shared.TokenStatusExpired + +// This is an alias to an internal type. +type TokenParam = shared.TokenParam + +// This is an alias to an internal type. +type TokenConditionParam = shared.TokenConditionParam + +// Client IP restrictions. +// +// This is an alias to an internal type. +type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam + +// IPv4/IPv6 CIDR. +// +// This is an alias to an internal type. +type TokenConditionCIDRList = shared.TokenConditionCIDRList + +// IPv4/IPv6 CIDR. +// +// This is an alias to an internal type. +type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam + +// This is an alias to an internal type. +type TokenPolicy = shared.TokenPolicy + +// Allow or deny operations against the resources. +// +// This is an alias to an internal type. +type TokenPolicyEffect = shared.TokenPolicyEffect + +// This is an alias to an internal value. +const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow + +// This is an alias to an internal value. +const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny + +// A named group of permissions that map to a group of operations against +// resources. +// +// This is an alias to an internal type. +type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup + +// Attributes associated to the permission group. +// +// This is an alias to an internal type. +type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta + +// A list of resource names that the policy applies to. +// +// This is an alias to an internal type. +type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion + +// Map of simple string resource permissions +// +// This is an alias to an internal type. +type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString + +// Map of nested resource permissions +// +// This is an alias to an internal type. +type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested + +// This is an alias to an internal type. +type TokenPolicyParam = shared.TokenPolicyParam + +// A named group of permissions that map to a group of operations against +// resources. +// +// This is an alias to an internal type. +type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam + +// Attributes associated to the permission group. +// +// This is an alias to an internal type. +type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam + +// A list of resource names that the policy applies to. +// +// This is an alias to an internal type. +type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam + +// Map of simple string resource permissions +// +// This is an alias to an internal type. +type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam + +// Map of nested resource permissions +// +// This is an alias to an internal type. +type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam + +// The token value. +// +// This is an alias to an internal type. +type TokenValue = shared.TokenValue diff --git a/r2_data_catalog/credential.go b/r2_data_catalog/credential.go new file mode 100644 index 00000000000..0a2b4bc18e3 --- /dev/null +++ b/r2_data_catalog/credential.go @@ -0,0 +1,150 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog + +import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +// CredentialService contains methods and other services that help with interacting +// with the cloudflare API. +// +// Note, unlike clients, this service does not read variables from the environment +// automatically. You should not instantiate this service directly, and instead use +// the [NewCredentialService] method instead. +type CredentialService struct { + Options []option.RequestOption +} + +// NewCredentialService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewCredentialService(opts ...option.RequestOption) (r *CredentialService) { + r = &CredentialService{} + r.Options = opts + return +} + +// Store authentication credentials for a catalog. These credentials are used to +// authenticate with R2 storage when performing catalog operations. +func (r *CredentialService) New(ctx context.Context, bucketName string, params CredentialNewParams, opts ...option.RequestOption) (res *CredentialNewResponse, err error) { + var env CredentialNewResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s/credential", params.AccountID, bucketName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +type CredentialNewResponse = interface{} + +type CredentialNewParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` + // Provides the Cloudflare API token for accessing R2. + Token param.Field[string] `json:"token,required"` +} + +func (r CredentialNewParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type CredentialNewResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []CredentialNewResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []CredentialNewResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + Result CredentialNewResponse `json:"result,nullable"` + JSON credentialNewResponseEnvelopeJSON `json:"-"` +} + +// credentialNewResponseEnvelopeJSON contains the JSON metadata for the struct +// [CredentialNewResponseEnvelope] +type credentialNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CredentialNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r credentialNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type CredentialNewResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON credentialNewResponseEnvelopeErrorsJSON `json:"-"` +} + +// credentialNewResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [CredentialNewResponseEnvelopeErrors] +type credentialNewResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CredentialNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r credentialNewResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type CredentialNewResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON credentialNewResponseEnvelopeMessagesJSON `json:"-"` +} + +// credentialNewResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [CredentialNewResponseEnvelopeMessages] +type credentialNewResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *CredentialNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r credentialNewResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} diff --git a/r2_data_catalog/credential_test.go b/r2_data_catalog/credential_test.go new file mode 100644 index 00000000000..a2e1782ab9a --- /dev/null +++ b/r2_data_catalog/credential_test.go @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/r2_data_catalog" +) + +func TestCredentialNew(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.Credentials.New( + context.TODO(), + "my-data-bucket", + r2_data_catalog.CredentialNewParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + Token: cloudflare.F("your-cloudflare-api-token-here"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/r2_data_catalog/maintenanceconfig.go b/r2_data_catalog/maintenanceconfig.go new file mode 100644 index 00000000000..93cd8d6c2b2 --- /dev/null +++ b/r2_data_catalog/maintenanceconfig.go @@ -0,0 +1,512 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog + +import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +// MaintenanceConfigService contains methods and other services that help with +// interacting with the cloudflare API. +// +// Note, unlike clients, this service does not read variables from the environment +// automatically. You should not instantiate this service directly, and instead use +// the [NewMaintenanceConfigService] method instead. +type MaintenanceConfigService struct { + Options []option.RequestOption +} + +// NewMaintenanceConfigService generates a new service that applies the given +// options to each request. These options are applied after the parent client's +// options (if there is one), and before any request-specific options. +func NewMaintenanceConfigService(opts ...option.RequestOption) (r *MaintenanceConfigService) { + r = &MaintenanceConfigService{} + r.Options = opts + return +} + +// Update the maintenance configuration for a catalog. This allows you to enable or +// disable compaction and adjust target file sizes for optimization. +func (r *MaintenanceConfigService) Update(ctx context.Context, bucketName string, params MaintenanceConfigUpdateParams, opts ...option.RequestOption) (res *MaintenanceConfigUpdateResponse, err error) { + var env MaintenanceConfigUpdateResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s/maintenance-configs", params.AccountID, bucketName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Retrieve the maintenance configuration for a specific catalog, including +// compaction settings and credential status. +func (r *MaintenanceConfigService) Get(ctx context.Context, bucketName string, query MaintenanceConfigGetParams, opts ...option.RequestOption) (res *MaintenanceConfigGetResponse, err error) { + var env MaintenanceConfigGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s/maintenance-configs", query.AccountID, bucketName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Configures maintenance for the catalog. +type MaintenanceConfigUpdateResponse struct { + // Configures compaction for catalog maintenance. + Compaction MaintenanceConfigUpdateResponseCompaction `json:"compaction"` + JSON maintenanceConfigUpdateResponseJSON `json:"-"` +} + +// maintenanceConfigUpdateResponseJSON contains the JSON metadata for the struct +// [MaintenanceConfigUpdateResponse] +type maintenanceConfigUpdateResponseJSON struct { + Compaction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigUpdateResponseJSON) RawJSON() string { + return r.raw +} + +// Configures compaction for catalog maintenance. +type MaintenanceConfigUpdateResponseCompaction struct { + // Specifies the state of maintenance operations. + State MaintenanceConfigUpdateResponseCompactionState `json:"state,required"` + // Sets the target file size for compaction in megabytes. + TargetSizeMB MaintenanceConfigUpdateResponseCompactionTargetSizeMB `json:"target_size_mb,required"` + JSON maintenanceConfigUpdateResponseCompactionJSON `json:"-"` +} + +// maintenanceConfigUpdateResponseCompactionJSON contains the JSON metadata for the +// struct [MaintenanceConfigUpdateResponseCompaction] +type maintenanceConfigUpdateResponseCompactionJSON struct { + State apijson.Field + TargetSizeMB apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigUpdateResponseCompaction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigUpdateResponseCompactionJSON) RawJSON() string { + return r.raw +} + +// Specifies the state of maintenance operations. +type MaintenanceConfigUpdateResponseCompactionState string + +const ( + MaintenanceConfigUpdateResponseCompactionStateEnabled MaintenanceConfigUpdateResponseCompactionState = "enabled" + MaintenanceConfigUpdateResponseCompactionStateDisabled MaintenanceConfigUpdateResponseCompactionState = "disabled" +) + +func (r MaintenanceConfigUpdateResponseCompactionState) IsKnown() bool { + switch r { + case MaintenanceConfigUpdateResponseCompactionStateEnabled, MaintenanceConfigUpdateResponseCompactionStateDisabled: + return true + } + return false +} + +// Sets the target file size for compaction in megabytes. +type MaintenanceConfigUpdateResponseCompactionTargetSizeMB string + +const ( + MaintenanceConfigUpdateResponseCompactionTargetSizeMB64 MaintenanceConfigUpdateResponseCompactionTargetSizeMB = "64" + MaintenanceConfigUpdateResponseCompactionTargetSizeMB128 MaintenanceConfigUpdateResponseCompactionTargetSizeMB = "128" + MaintenanceConfigUpdateResponseCompactionTargetSizeMB256 MaintenanceConfigUpdateResponseCompactionTargetSizeMB = "256" + MaintenanceConfigUpdateResponseCompactionTargetSizeMB512 MaintenanceConfigUpdateResponseCompactionTargetSizeMB = "512" +) + +func (r MaintenanceConfigUpdateResponseCompactionTargetSizeMB) IsKnown() bool { + switch r { + case MaintenanceConfigUpdateResponseCompactionTargetSizeMB64, MaintenanceConfigUpdateResponseCompactionTargetSizeMB128, MaintenanceConfigUpdateResponseCompactionTargetSizeMB256, MaintenanceConfigUpdateResponseCompactionTargetSizeMB512: + return true + } + return false +} + +// Contains maintenance configuration and credential status. +type MaintenanceConfigGetResponse struct { + // Shows the credential configuration status. + CredentialStatus MaintenanceConfigGetResponseCredentialStatus `json:"credential_status,required"` + // Configures maintenance for the catalog. + MaintenanceConfig MaintenanceConfigGetResponseMaintenanceConfig `json:"maintenance_config,required"` + JSON maintenanceConfigGetResponseJSON `json:"-"` +} + +// maintenanceConfigGetResponseJSON contains the JSON metadata for the struct +// [MaintenanceConfigGetResponse] +type maintenanceConfigGetResponseJSON struct { + CredentialStatus apijson.Field + MaintenanceConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigGetResponseJSON) RawJSON() string { + return r.raw +} + +// Shows the credential configuration status. +type MaintenanceConfigGetResponseCredentialStatus string + +const ( + MaintenanceConfigGetResponseCredentialStatusPresent MaintenanceConfigGetResponseCredentialStatus = "present" + MaintenanceConfigGetResponseCredentialStatusAbsent MaintenanceConfigGetResponseCredentialStatus = "absent" +) + +func (r MaintenanceConfigGetResponseCredentialStatus) IsKnown() bool { + switch r { + case MaintenanceConfigGetResponseCredentialStatusPresent, MaintenanceConfigGetResponseCredentialStatusAbsent: + return true + } + return false +} + +// Configures maintenance for the catalog. +type MaintenanceConfigGetResponseMaintenanceConfig struct { + // Configures compaction for catalog maintenance. + Compaction MaintenanceConfigGetResponseMaintenanceConfigCompaction `json:"compaction"` + JSON maintenanceConfigGetResponseMaintenanceConfigJSON `json:"-"` +} + +// maintenanceConfigGetResponseMaintenanceConfigJSON contains the JSON metadata for +// the struct [MaintenanceConfigGetResponseMaintenanceConfig] +type maintenanceConfigGetResponseMaintenanceConfigJSON struct { + Compaction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigGetResponseMaintenanceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigGetResponseMaintenanceConfigJSON) RawJSON() string { + return r.raw +} + +// Configures compaction for catalog maintenance. +type MaintenanceConfigGetResponseMaintenanceConfigCompaction struct { + // Specifies the state of maintenance operations. + State MaintenanceConfigGetResponseMaintenanceConfigCompactionState `json:"state,required"` + // Sets the target file size for compaction in megabytes. + TargetSizeMB MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB `json:"target_size_mb,required"` + JSON maintenanceConfigGetResponseMaintenanceConfigCompactionJSON `json:"-"` +} + +// maintenanceConfigGetResponseMaintenanceConfigCompactionJSON contains the JSON +// metadata for the struct +// [MaintenanceConfigGetResponseMaintenanceConfigCompaction] +type maintenanceConfigGetResponseMaintenanceConfigCompactionJSON struct { + State apijson.Field + TargetSizeMB apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigGetResponseMaintenanceConfigCompaction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigGetResponseMaintenanceConfigCompactionJSON) RawJSON() string { + return r.raw +} + +// Specifies the state of maintenance operations. +type MaintenanceConfigGetResponseMaintenanceConfigCompactionState string + +const ( + MaintenanceConfigGetResponseMaintenanceConfigCompactionStateEnabled MaintenanceConfigGetResponseMaintenanceConfigCompactionState = "enabled" + MaintenanceConfigGetResponseMaintenanceConfigCompactionStateDisabled MaintenanceConfigGetResponseMaintenanceConfigCompactionState = "disabled" +) + +func (r MaintenanceConfigGetResponseMaintenanceConfigCompactionState) IsKnown() bool { + switch r { + case MaintenanceConfigGetResponseMaintenanceConfigCompactionStateEnabled, MaintenanceConfigGetResponseMaintenanceConfigCompactionStateDisabled: + return true + } + return false +} + +// Sets the target file size for compaction in megabytes. +type MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB string + +const ( + MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB64 MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB = "64" + MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB128 MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB = "128" + MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB256 MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB = "256" + MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB512 MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB = "512" +) + +func (r MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB) IsKnown() bool { + switch r { + case MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB64, MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB128, MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB256, MaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB512: + return true + } + return false +} + +type MaintenanceConfigUpdateParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` + // Updates compaction configuration (all fields optional). + Compaction param.Field[MaintenanceConfigUpdateParamsCompaction] `json:"compaction"` +} + +func (r MaintenanceConfigUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Updates compaction configuration (all fields optional). +type MaintenanceConfigUpdateParamsCompaction struct { + // Updates the state optionally. + State param.Field[MaintenanceConfigUpdateParamsCompactionState] `json:"state"` + // Updates the target file size optionally. + TargetSizeMB param.Field[MaintenanceConfigUpdateParamsCompactionTargetSizeMB] `json:"target_size_mb"` +} + +func (r MaintenanceConfigUpdateParamsCompaction) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Updates the state optionally. +type MaintenanceConfigUpdateParamsCompactionState string + +const ( + MaintenanceConfigUpdateParamsCompactionStateEnabled MaintenanceConfigUpdateParamsCompactionState = "enabled" + MaintenanceConfigUpdateParamsCompactionStateDisabled MaintenanceConfigUpdateParamsCompactionState = "disabled" +) + +func (r MaintenanceConfigUpdateParamsCompactionState) IsKnown() bool { + switch r { + case MaintenanceConfigUpdateParamsCompactionStateEnabled, MaintenanceConfigUpdateParamsCompactionStateDisabled: + return true + } + return false +} + +// Updates the target file size optionally. +type MaintenanceConfigUpdateParamsCompactionTargetSizeMB string + +const ( + MaintenanceConfigUpdateParamsCompactionTargetSizeMB64 MaintenanceConfigUpdateParamsCompactionTargetSizeMB = "64" + MaintenanceConfigUpdateParamsCompactionTargetSizeMB128 MaintenanceConfigUpdateParamsCompactionTargetSizeMB = "128" + MaintenanceConfigUpdateParamsCompactionTargetSizeMB256 MaintenanceConfigUpdateParamsCompactionTargetSizeMB = "256" + MaintenanceConfigUpdateParamsCompactionTargetSizeMB512 MaintenanceConfigUpdateParamsCompactionTargetSizeMB = "512" +) + +func (r MaintenanceConfigUpdateParamsCompactionTargetSizeMB) IsKnown() bool { + switch r { + case MaintenanceConfigUpdateParamsCompactionTargetSizeMB64, MaintenanceConfigUpdateParamsCompactionTargetSizeMB128, MaintenanceConfigUpdateParamsCompactionTargetSizeMB256, MaintenanceConfigUpdateParamsCompactionTargetSizeMB512: + return true + } + return false +} + +type MaintenanceConfigUpdateResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []MaintenanceConfigUpdateResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []MaintenanceConfigUpdateResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + // Configures maintenance for the catalog. + Result MaintenanceConfigUpdateResponse `json:"result"` + JSON maintenanceConfigUpdateResponseEnvelopeJSON `json:"-"` +} + +// maintenanceConfigUpdateResponseEnvelopeJSON contains the JSON metadata for the +// struct [MaintenanceConfigUpdateResponseEnvelope] +type maintenanceConfigUpdateResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigUpdateResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type MaintenanceConfigUpdateResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON maintenanceConfigUpdateResponseEnvelopeErrorsJSON `json:"-"` +} + +// maintenanceConfigUpdateResponseEnvelopeErrorsJSON contains the JSON metadata for +// the struct [MaintenanceConfigUpdateResponseEnvelopeErrors] +type maintenanceConfigUpdateResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigUpdateResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type MaintenanceConfigUpdateResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON maintenanceConfigUpdateResponseEnvelopeMessagesJSON `json:"-"` +} + +// maintenanceConfigUpdateResponseEnvelopeMessagesJSON contains the JSON metadata +// for the struct [MaintenanceConfigUpdateResponseEnvelopeMessages] +type maintenanceConfigUpdateResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigUpdateResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type MaintenanceConfigGetParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` +} + +type MaintenanceConfigGetResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []MaintenanceConfigGetResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []MaintenanceConfigGetResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + // Contains maintenance configuration and credential status. + Result MaintenanceConfigGetResponse `json:"result"` + JSON maintenanceConfigGetResponseEnvelopeJSON `json:"-"` +} + +// maintenanceConfigGetResponseEnvelopeJSON contains the JSON metadata for the +// struct [MaintenanceConfigGetResponseEnvelope] +type maintenanceConfigGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type MaintenanceConfigGetResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON maintenanceConfigGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// maintenanceConfigGetResponseEnvelopeErrorsJSON contains the JSON metadata for +// the struct [MaintenanceConfigGetResponseEnvelopeErrors] +type maintenanceConfigGetResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type MaintenanceConfigGetResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON maintenanceConfigGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// maintenanceConfigGetResponseEnvelopeMessagesJSON contains the JSON metadata for +// the struct [MaintenanceConfigGetResponseEnvelopeMessages] +type maintenanceConfigGetResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *MaintenanceConfigGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r maintenanceConfigGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} diff --git a/r2_data_catalog/maintenanceconfig_test.go b/r2_data_catalog/maintenanceconfig_test.go new file mode 100644 index 00000000000..5358ba55027 --- /dev/null +++ b/r2_data_catalog/maintenanceconfig_test.go @@ -0,0 +1,77 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/r2_data_catalog" +) + +func TestMaintenanceConfigUpdateWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.MaintenanceConfigs.Update( + context.TODO(), + "my-data-bucket", + r2_data_catalog.MaintenanceConfigUpdateParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + Compaction: cloudflare.F(r2_data_catalog.MaintenanceConfigUpdateParamsCompaction{ + State: cloudflare.F(r2_data_catalog.MaintenanceConfigUpdateParamsCompactionStateEnabled), + TargetSizeMB: cloudflare.F(r2_data_catalog.MaintenanceConfigUpdateParamsCompactionTargetSizeMB256), + }), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestMaintenanceConfigGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.MaintenanceConfigs.Get( + context.TODO(), + "my-data-bucket", + r2_data_catalog.MaintenanceConfigGetParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/r2_data_catalog/namespace.go b/r2_data_catalog/namespace.go new file mode 100644 index 00000000000..f303e8d02d3 --- /dev/null +++ b/r2_data_catalog/namespace.go @@ -0,0 +1,239 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog + +import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +// NamespaceService contains methods and other services that help with interacting +// with the cloudflare API. +// +// Note, unlike clients, this service does not read variables from the environment +// automatically. You should not instantiate this service directly, and instead use +// the [NewNamespaceService] method instead. +type NamespaceService struct { + Options []option.RequestOption + Tables *NamespaceTableService +} + +// NewNamespaceService generates a new service that applies the given options to +// each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewNamespaceService(opts ...option.RequestOption) (r *NamespaceService) { + r = &NamespaceService{} + r.Options = opts + r.Tables = NewNamespaceTableService(opts...) + return +} + +// Returns a list of namespaces in the specified R2 catalog. Supports hierarchical +// filtering and pagination for efficient traversal of large namespace hierarchies. +func (r *NamespaceService) List(ctx context.Context, bucketName string, params NamespaceListParams, opts ...option.RequestOption) (res *NamespaceListResponse, err error) { + var env NamespaceListResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s/namespaces", params.AccountID, bucketName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Contains the list of namespaces with optional pagination. +type NamespaceListResponse struct { + // Lists namespaces in the catalog. + Namespaces [][]string `json:"namespaces,required"` + // Contains detailed metadata for each namespace when return_details is true. Each + // object includes the namespace, UUID, and timestamps. + Details []NamespaceListResponseDetail `json:"details,nullable"` + // Contains UUIDs for each namespace when return_uuids is true. The order + // corresponds to the namespaces array. + NamespaceUUIDs []string `json:"namespace_uuids,nullable" format:"uuid"` + // Use this opaque token to fetch the next page of results. A null or absent value + // indicates the last page. + NextPageToken string `json:"next_page_token,nullable"` + JSON namespaceListResponseJSON `json:"-"` +} + +// namespaceListResponseJSON contains the JSON metadata for the struct +// [NamespaceListResponse] +type namespaceListResponseJSON struct { + Namespaces apijson.Field + Details apijson.Field + NamespaceUUIDs apijson.Field + NextPageToken apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceListResponseJSON) RawJSON() string { + return r.raw +} + +// Contains namespace with metadata details. +type NamespaceListResponseDetail struct { + // Specifies the hierarchical namespace parts as an array of strings. For example, + // ["bronze", "analytics"] represents the namespace "bronze.analytics". + Namespace []string `json:"namespace,required"` + // Contains the UUID that persists across renames. + NamespaceUUID string `json:"namespace_uuid,required" format:"uuid"` + // Indicates the creation timestamp in ISO 8601 format. + CreatedAt time.Time `json:"created_at,nullable" format:"date-time"` + // Shows the last update timestamp in ISO 8601 format. Null if never updated. + UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"` + JSON namespaceListResponseDetailJSON `json:"-"` +} + +// namespaceListResponseDetailJSON contains the JSON metadata for the struct +// [NamespaceListResponseDetail] +type namespaceListResponseDetailJSON struct { + Namespace apijson.Field + NamespaceUUID apijson.Field + CreatedAt apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceListResponseDetail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceListResponseDetailJSON) RawJSON() string { + return r.raw +} + +type NamespaceListParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` + // Maximum number of namespaces to return per page. Defaults to 100, maximum 1000. + PageSize param.Field[int64] `query:"page_size"` + // Opaque pagination token from a previous response. Use this to fetch the next + // page of results. + PageToken param.Field[string] `query:"page_token"` + // Parent namespace to filter by. Only returns direct children of this namespace. + // For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics"). Omit + // this parameter to list top-level namespaces. + Parent param.Field[string] `query:"parent"` + // Whether to include additional metadata (timestamps). When true, response + // includes created_at and updated_at arrays. + ReturnDetails param.Field[bool] `query:"return_details"` + // Whether to include namespace UUIDs in the response. Set to true to receive the + // namespace_uuids array. + ReturnUUIDs param.Field[bool] `query:"return_uuids"` +} + +// URLQuery serializes [NamespaceListParams]'s query parameters as `url.Values`. +func (r NamespaceListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + +type NamespaceListResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []NamespaceListResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []NamespaceListResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + // Contains the list of namespaces with optional pagination. + Result NamespaceListResponse `json:"result"` + JSON namespaceListResponseEnvelopeJSON `json:"-"` +} + +// namespaceListResponseEnvelopeJSON contains the JSON metadata for the struct +// [NamespaceListResponseEnvelope] +type namespaceListResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceListResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceListResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type NamespaceListResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON namespaceListResponseEnvelopeErrorsJSON `json:"-"` +} + +// namespaceListResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [NamespaceListResponseEnvelopeErrors] +type namespaceListResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceListResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type NamespaceListResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON namespaceListResponseEnvelopeMessagesJSON `json:"-"` +} + +// namespaceListResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [NamespaceListResponseEnvelopeMessages] +type namespaceListResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceListResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} diff --git a/r2_data_catalog/namespace_test.go b/r2_data_catalog/namespace_test.go new file mode 100644 index 00000000000..c215c0cf499 --- /dev/null +++ b/r2_data_catalog/namespace_test.go @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/r2_data_catalog" +) + +func TestNamespaceListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.Namespaces.List( + context.TODO(), + "my-data-bucket", + r2_data_catalog.NamespaceListParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + PageSize: cloudflare.F(int64(1)), + PageToken: cloudflare.F("page_token"), + Parent: cloudflare.F("parent"), + ReturnDetails: cloudflare.F(true), + ReturnUUIDs: cloudflare.F(true), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/r2_data_catalog/namespacetable.go b/r2_data_catalog/namespacetable.go new file mode 100644 index 00000000000..24db2961769 --- /dev/null +++ b/r2_data_catalog/namespacetable.go @@ -0,0 +1,300 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog + +import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "slices" + "time" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/apiquery" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +// NamespaceTableService contains methods and other services that help with +// interacting with the cloudflare API. +// +// Note, unlike clients, this service does not read variables from the environment +// automatically. You should not instantiate this service directly, and instead use +// the [NewNamespaceTableService] method instead. +type NamespaceTableService struct { + Options []option.RequestOption + MaintenanceConfigs *NamespaceTableMaintenanceConfigService +} + +// NewNamespaceTableService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewNamespaceTableService(opts ...option.RequestOption) (r *NamespaceTableService) { + r = &NamespaceTableService{} + r.Options = opts + r.MaintenanceConfigs = NewNamespaceTableMaintenanceConfigService(opts...) + return +} + +// Returns a list of tables in the specified namespace within an R2 catalog. +// Supports pagination for efficient traversal of large table collections. +func (r *NamespaceTableService) List(ctx context.Context, bucketName string, namespace string, params NamespaceTableListParams, opts ...option.RequestOption) (res *NamespaceTableListResponse, err error) { + var env NamespaceTableListResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + if namespace == "" { + err = errors.New("missing required namespace parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s/namespaces/%s/tables", params.AccountID, bucketName, namespace) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Contains the list of tables with optional pagination. +type NamespaceTableListResponse struct { + // Lists tables in the namespace. + Identifiers []NamespaceTableListResponseIdentifier `json:"identifiers,required"` + // Contains detailed metadata for each table when return_details is true. Each + // object includes identifier, UUID, timestamps, and locations. + Details []NamespaceTableListResponseDetail `json:"details,nullable"` + // Use this opaque token to fetch the next page of results. A null or absent value + // indicates the last page. + NextPageToken string `json:"next_page_token,nullable"` + // Contains UUIDs for each table when return_uuids is true. The order corresponds + // to the identifiers array. + TableUUIDs []string `json:"table_uuids,nullable" format:"uuid"` + JSON namespaceTableListResponseJSON `json:"-"` +} + +// namespaceTableListResponseJSON contains the JSON metadata for the struct +// [NamespaceTableListResponse] +type namespaceTableListResponseJSON struct { + Identifiers apijson.Field + Details apijson.Field + NextPageToken apijson.Field + TableUUIDs apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableListResponseJSON) RawJSON() string { + return r.raw +} + +// Specifies a unique table identifier within a catalog. +type NamespaceTableListResponseIdentifier struct { + // Specifies the table name. + Name string `json:"name,required"` + // Specifies the hierarchical namespace parts as an array of strings. For example, + // ["bronze", "analytics"] represents the namespace "bronze.analytics". + Namespace []string `json:"namespace,required"` + JSON namespaceTableListResponseIdentifierJSON `json:"-"` +} + +// namespaceTableListResponseIdentifierJSON contains the JSON metadata for the +// struct [NamespaceTableListResponseIdentifier] +type namespaceTableListResponseIdentifierJSON struct { + Name apijson.Field + Namespace apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableListResponseIdentifier) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableListResponseIdentifierJSON) RawJSON() string { + return r.raw +} + +// Contains table with metadata. +type NamespaceTableListResponseDetail struct { + // Specifies a unique table identifier within a catalog. + Identifier NamespaceTableListResponseDetailsIdentifier `json:"identifier,required"` + // Contains the UUID that persists across renames. + TableUUID string `json:"table_uuid,required" format:"uuid"` + // Indicates the creation timestamp in ISO 8601 format. + CreatedAt time.Time `json:"created_at,nullable" format:"date-time"` + // Specifies the base S3 URI for table storage location. + Location string `json:"location,nullable"` + // Contains the S3 URI to table metadata file. Null for staged tables. + MetadataLocation string `json:"metadata_location,nullable"` + // Shows the last update timestamp in ISO 8601 format. Null if never updated. + UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"` + JSON namespaceTableListResponseDetailJSON `json:"-"` +} + +// namespaceTableListResponseDetailJSON contains the JSON metadata for the struct +// [NamespaceTableListResponseDetail] +type namespaceTableListResponseDetailJSON struct { + Identifier apijson.Field + TableUUID apijson.Field + CreatedAt apijson.Field + Location apijson.Field + MetadataLocation apijson.Field + UpdatedAt apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableListResponseDetail) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableListResponseDetailJSON) RawJSON() string { + return r.raw +} + +// Specifies a unique table identifier within a catalog. +type NamespaceTableListResponseDetailsIdentifier struct { + // Specifies the table name. + Name string `json:"name,required"` + // Specifies the hierarchical namespace parts as an array of strings. For example, + // ["bronze", "analytics"] represents the namespace "bronze.analytics". + Namespace []string `json:"namespace,required"` + JSON namespaceTableListResponseDetailsIdentifierJSON `json:"-"` +} + +// namespaceTableListResponseDetailsIdentifierJSON contains the JSON metadata for +// the struct [NamespaceTableListResponseDetailsIdentifier] +type namespaceTableListResponseDetailsIdentifierJSON struct { + Name apijson.Field + Namespace apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableListResponseDetailsIdentifier) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableListResponseDetailsIdentifierJSON) RawJSON() string { + return r.raw +} + +type NamespaceTableListParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` + // Maximum number of tables to return per page. Defaults to 100, maximum 1000. + PageSize param.Field[int64] `query:"page_size"` + // Opaque pagination token from a previous response. Use this to fetch the next + // page of results. + PageToken param.Field[string] `query:"page_token"` + // Whether to include additional metadata (timestamps, locations). When true, + // response includes created_at, updated_at, metadata_locations, and locations + // arrays. + ReturnDetails param.Field[bool] `query:"return_details"` + // Whether to include table UUIDs in the response. Set to true to receive the + // table_uuids array. + ReturnUUIDs param.Field[bool] `query:"return_uuids"` +} + +// URLQuery serializes [NamespaceTableListParams]'s query parameters as +// `url.Values`. +func (r NamespaceTableListParams) URLQuery() (v url.Values) { + return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{ + ArrayFormat: apiquery.ArrayQueryFormatRepeat, + NestedFormat: apiquery.NestedQueryFormatDots, + }) +} + +type NamespaceTableListResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []NamespaceTableListResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []NamespaceTableListResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + // Contains the list of tables with optional pagination. + Result NamespaceTableListResponse `json:"result"` + JSON namespaceTableListResponseEnvelopeJSON `json:"-"` +} + +// namespaceTableListResponseEnvelopeJSON contains the JSON metadata for the struct +// [NamespaceTableListResponseEnvelope] +type namespaceTableListResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableListResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableListResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type NamespaceTableListResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON namespaceTableListResponseEnvelopeErrorsJSON `json:"-"` +} + +// namespaceTableListResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [NamespaceTableListResponseEnvelopeErrors] +type namespaceTableListResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableListResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type NamespaceTableListResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON namespaceTableListResponseEnvelopeMessagesJSON `json:"-"` +} + +// namespaceTableListResponseEnvelopeMessagesJSON contains the JSON metadata for +// the struct [NamespaceTableListResponseEnvelopeMessages] +type namespaceTableListResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableListResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} diff --git a/r2_data_catalog/namespacetable_test.go b/r2_data_catalog/namespacetable_test.go new file mode 100644 index 00000000000..0585adf66df --- /dev/null +++ b/r2_data_catalog/namespacetable_test.go @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/r2_data_catalog" +) + +func TestNamespaceTableListWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.Namespaces.Tables.List( + context.TODO(), + "my-data-bucket", + "bronze", + r2_data_catalog.NamespaceTableListParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + PageSize: cloudflare.F(int64(1)), + PageToken: cloudflare.F("page_token"), + ReturnDetails: cloudflare.F(true), + ReturnUUIDs: cloudflare.F(true), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/r2_data_catalog/namespacetablemaintenanceconfig.go b/r2_data_catalog/namespacetablemaintenanceconfig.go new file mode 100644 index 00000000000..1abca077ac5 --- /dev/null +++ b/r2_data_catalog/namespacetablemaintenanceconfig.go @@ -0,0 +1,515 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog + +import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +// NamespaceTableMaintenanceConfigService contains methods and other services that +// help with interacting with the cloudflare API. +// +// Note, unlike clients, this service does not read variables from the environment +// automatically. You should not instantiate this service directly, and instead use +// the [NewNamespaceTableMaintenanceConfigService] method instead. +type NamespaceTableMaintenanceConfigService struct { + Options []option.RequestOption +} + +// NewNamespaceTableMaintenanceConfigService generates a new service that applies +// the given options to each request. These options are applied after the parent +// client's options (if there is one), and before any request-specific options. +func NewNamespaceTableMaintenanceConfigService(opts ...option.RequestOption) (r *NamespaceTableMaintenanceConfigService) { + r = &NamespaceTableMaintenanceConfigService{} + r.Options = opts + return +} + +// Update the maintenance configuration for a specific table. This allows you to +// enable or disable compaction and adjust target file sizes for optimization. +func (r *NamespaceTableMaintenanceConfigService) Update(ctx context.Context, bucketName string, namespace string, tableName string, params NamespaceTableMaintenanceConfigUpdateParams, opts ...option.RequestOption) (res *NamespaceTableMaintenanceConfigUpdateResponse, err error) { + var env NamespaceTableMaintenanceConfigUpdateResponseEnvelope + opts = slices.Concat(r.Options, opts) + if params.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + if namespace == "" { + err = errors.New("missing required namespace parameter") + return + } + if tableName == "" { + err = errors.New("missing required table_name parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s/namespaces/%s/tables/%s/maintenance-configs", params.AccountID, bucketName, namespace, tableName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Retrieve the maintenance configuration for a specific table, including +// compaction settings. +func (r *NamespaceTableMaintenanceConfigService) Get(ctx context.Context, bucketName string, namespace string, tableName string, query NamespaceTableMaintenanceConfigGetParams, opts ...option.RequestOption) (res *NamespaceTableMaintenanceConfigGetResponse, err error) { + var env NamespaceTableMaintenanceConfigGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + if namespace == "" { + err = errors.New("missing required namespace parameter") + return + } + if tableName == "" { + err = errors.New("missing required table_name parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s/namespaces/%s/tables/%s/maintenance-configs", query.AccountID, bucketName, namespace, tableName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Configures maintenance for the table. +type NamespaceTableMaintenanceConfigUpdateResponse struct { + // Configures compaction settings for table optimization. + Compaction NamespaceTableMaintenanceConfigUpdateResponseCompaction `json:"compaction"` + JSON namespaceTableMaintenanceConfigUpdateResponseJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigUpdateResponseJSON contains the JSON metadata for +// the struct [NamespaceTableMaintenanceConfigUpdateResponse] +type namespaceTableMaintenanceConfigUpdateResponseJSON struct { + Compaction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigUpdateResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigUpdateResponseJSON) RawJSON() string { + return r.raw +} + +// Configures compaction settings for table optimization. +type NamespaceTableMaintenanceConfigUpdateResponseCompaction struct { + // Specifies the state of maintenance operations. + State NamespaceTableMaintenanceConfigUpdateResponseCompactionState `json:"state,required"` + // Sets the target file size for compaction in megabytes. + TargetSizeMB NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB `json:"target_size_mb,required"` + JSON namespaceTableMaintenanceConfigUpdateResponseCompactionJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigUpdateResponseCompactionJSON contains the JSON +// metadata for the struct +// [NamespaceTableMaintenanceConfigUpdateResponseCompaction] +type namespaceTableMaintenanceConfigUpdateResponseCompactionJSON struct { + State apijson.Field + TargetSizeMB apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigUpdateResponseCompaction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigUpdateResponseCompactionJSON) RawJSON() string { + return r.raw +} + +// Specifies the state of maintenance operations. +type NamespaceTableMaintenanceConfigUpdateResponseCompactionState string + +const ( + NamespaceTableMaintenanceConfigUpdateResponseCompactionStateEnabled NamespaceTableMaintenanceConfigUpdateResponseCompactionState = "enabled" + NamespaceTableMaintenanceConfigUpdateResponseCompactionStateDisabled NamespaceTableMaintenanceConfigUpdateResponseCompactionState = "disabled" +) + +func (r NamespaceTableMaintenanceConfigUpdateResponseCompactionState) IsKnown() bool { + switch r { + case NamespaceTableMaintenanceConfigUpdateResponseCompactionStateEnabled, NamespaceTableMaintenanceConfigUpdateResponseCompactionStateDisabled: + return true + } + return false +} + +// Sets the target file size for compaction in megabytes. +type NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB string + +const ( + NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB64 NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB = "64" + NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB128 NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB = "128" + NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB256 NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB = "256" + NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB512 NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB = "512" +) + +func (r NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB) IsKnown() bool { + switch r { + case NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB64, NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB128, NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB256, NamespaceTableMaintenanceConfigUpdateResponseCompactionTargetSizeMB512: + return true + } + return false +} + +// Contains table maintenance configuration. +type NamespaceTableMaintenanceConfigGetResponse struct { + // Configures maintenance for the table. + MaintenanceConfig NamespaceTableMaintenanceConfigGetResponseMaintenanceConfig `json:"maintenance_config,required"` + JSON namespaceTableMaintenanceConfigGetResponseJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigGetResponseJSON contains the JSON metadata for +// the struct [NamespaceTableMaintenanceConfigGetResponse] +type namespaceTableMaintenanceConfigGetResponseJSON struct { + MaintenanceConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigGetResponseJSON) RawJSON() string { + return r.raw +} + +// Configures maintenance for the table. +type NamespaceTableMaintenanceConfigGetResponseMaintenanceConfig struct { + // Configures compaction settings for table optimization. + Compaction NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompaction `json:"compaction"` + JSON namespaceTableMaintenanceConfigGetResponseMaintenanceConfigJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigGetResponseMaintenanceConfigJSON contains the +// JSON metadata for the struct +// [NamespaceTableMaintenanceConfigGetResponseMaintenanceConfig] +type namespaceTableMaintenanceConfigGetResponseMaintenanceConfigJSON struct { + Compaction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigGetResponseMaintenanceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigGetResponseMaintenanceConfigJSON) RawJSON() string { + return r.raw +} + +// Configures compaction settings for table optimization. +type NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompaction struct { + // Specifies the state of maintenance operations. + State NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionState `json:"state,required"` + // Sets the target file size for compaction in megabytes. + TargetSizeMB NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB `json:"target_size_mb,required"` + JSON namespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionJSON +// contains the JSON metadata for the struct +// [NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompaction] +type namespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionJSON struct { + State apijson.Field + TargetSizeMB apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompaction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionJSON) RawJSON() string { + return r.raw +} + +// Specifies the state of maintenance operations. +type NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionState string + +const ( + NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionStateEnabled NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionState = "enabled" + NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionStateDisabled NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionState = "disabled" +) + +func (r NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionState) IsKnown() bool { + switch r { + case NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionStateEnabled, NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionStateDisabled: + return true + } + return false +} + +// Sets the target file size for compaction in megabytes. +type NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB string + +const ( + NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB64 NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB = "64" + NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB128 NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB = "128" + NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB256 NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB = "256" + NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB512 NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB = "512" +) + +func (r NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB) IsKnown() bool { + switch r { + case NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB64, NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB128, NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB256, NamespaceTableMaintenanceConfigGetResponseMaintenanceConfigCompactionTargetSizeMB512: + return true + } + return false +} + +type NamespaceTableMaintenanceConfigUpdateParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` + // Updates compaction configuration (all fields optional). + Compaction param.Field[NamespaceTableMaintenanceConfigUpdateParamsCompaction] `json:"compaction"` +} + +func (r NamespaceTableMaintenanceConfigUpdateParams) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Updates compaction configuration (all fields optional). +type NamespaceTableMaintenanceConfigUpdateParamsCompaction struct { + // Updates the state optionally. + State param.Field[NamespaceTableMaintenanceConfigUpdateParamsCompactionState] `json:"state"` + // Updates the target file size optionally. + TargetSizeMB param.Field[NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB] `json:"target_size_mb"` +} + +func (r NamespaceTableMaintenanceConfigUpdateParamsCompaction) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// Updates the state optionally. +type NamespaceTableMaintenanceConfigUpdateParamsCompactionState string + +const ( + NamespaceTableMaintenanceConfigUpdateParamsCompactionStateEnabled NamespaceTableMaintenanceConfigUpdateParamsCompactionState = "enabled" + NamespaceTableMaintenanceConfigUpdateParamsCompactionStateDisabled NamespaceTableMaintenanceConfigUpdateParamsCompactionState = "disabled" +) + +func (r NamespaceTableMaintenanceConfigUpdateParamsCompactionState) IsKnown() bool { + switch r { + case NamespaceTableMaintenanceConfigUpdateParamsCompactionStateEnabled, NamespaceTableMaintenanceConfigUpdateParamsCompactionStateDisabled: + return true + } + return false +} + +// Updates the target file size optionally. +type NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB string + +const ( + NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB64 NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB = "64" + NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB128 NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB = "128" + NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB256 NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB = "256" + NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB512 NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB = "512" +) + +func (r NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB) IsKnown() bool { + switch r { + case NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB64, NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB128, NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB256, NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB512: + return true + } + return false +} + +type NamespaceTableMaintenanceConfigUpdateResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []NamespaceTableMaintenanceConfigUpdateResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []NamespaceTableMaintenanceConfigUpdateResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + // Configures maintenance for the table. + Result NamespaceTableMaintenanceConfigUpdateResponse `json:"result"` + JSON namespaceTableMaintenanceConfigUpdateResponseEnvelopeJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigUpdateResponseEnvelopeJSON contains the JSON +// metadata for the struct [NamespaceTableMaintenanceConfigUpdateResponseEnvelope] +type namespaceTableMaintenanceConfigUpdateResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigUpdateResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type NamespaceTableMaintenanceConfigUpdateResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON namespaceTableMaintenanceConfigUpdateResponseEnvelopeErrorsJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigUpdateResponseEnvelopeErrorsJSON contains the +// JSON metadata for the struct +// [NamespaceTableMaintenanceConfigUpdateResponseEnvelopeErrors] +type namespaceTableMaintenanceConfigUpdateResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigUpdateResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type NamespaceTableMaintenanceConfigUpdateResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON namespaceTableMaintenanceConfigUpdateResponseEnvelopeMessagesJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigUpdateResponseEnvelopeMessagesJSON contains the +// JSON metadata for the struct +// [NamespaceTableMaintenanceConfigUpdateResponseEnvelopeMessages] +type namespaceTableMaintenanceConfigUpdateResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigUpdateResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type NamespaceTableMaintenanceConfigGetParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` +} + +type NamespaceTableMaintenanceConfigGetResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []NamespaceTableMaintenanceConfigGetResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []NamespaceTableMaintenanceConfigGetResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + // Contains table maintenance configuration. + Result NamespaceTableMaintenanceConfigGetResponse `json:"result"` + JSON namespaceTableMaintenanceConfigGetResponseEnvelopeJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigGetResponseEnvelopeJSON contains the JSON +// metadata for the struct [NamespaceTableMaintenanceConfigGetResponseEnvelope] +type namespaceTableMaintenanceConfigGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type NamespaceTableMaintenanceConfigGetResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON namespaceTableMaintenanceConfigGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigGetResponseEnvelopeErrorsJSON contains the JSON +// metadata for the struct +// [NamespaceTableMaintenanceConfigGetResponseEnvelopeErrors] +type namespaceTableMaintenanceConfigGetResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type NamespaceTableMaintenanceConfigGetResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON namespaceTableMaintenanceConfigGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// namespaceTableMaintenanceConfigGetResponseEnvelopeMessagesJSON contains the JSON +// metadata for the struct +// [NamespaceTableMaintenanceConfigGetResponseEnvelopeMessages] +type namespaceTableMaintenanceConfigGetResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *NamespaceTableMaintenanceConfigGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r namespaceTableMaintenanceConfigGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} diff --git a/r2_data_catalog/namespacetablemaintenanceconfig_test.go b/r2_data_catalog/namespacetablemaintenanceconfig_test.go new file mode 100644 index 00000000000..7f9c07aef46 --- /dev/null +++ b/r2_data_catalog/namespacetablemaintenanceconfig_test.go @@ -0,0 +1,81 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/r2_data_catalog" +) + +func TestNamespaceTableMaintenanceConfigUpdateWithOptionalParams(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.Namespaces.Tables.MaintenanceConfigs.Update( + context.TODO(), + "my-data-bucket", + "my_namespace%1Fsub_namespace", + "my_table", + r2_data_catalog.NamespaceTableMaintenanceConfigUpdateParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + Compaction: cloudflare.F(r2_data_catalog.NamespaceTableMaintenanceConfigUpdateParamsCompaction{ + State: cloudflare.F(r2_data_catalog.NamespaceTableMaintenanceConfigUpdateParamsCompactionStateEnabled), + TargetSizeMB: cloudflare.F(r2_data_catalog.NamespaceTableMaintenanceConfigUpdateParamsCompactionTargetSizeMB256), + }), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestNamespaceTableMaintenanceConfigGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.Namespaces.Tables.MaintenanceConfigs.Get( + context.TODO(), + "my-data-bucket", + "my_namespace%1Fsub_namespace", + "my_table", + r2_data_catalog.NamespaceTableMaintenanceConfigGetParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/r2_data_catalog/r2datacatalog.go b/r2_data_catalog/r2datacatalog.go new file mode 100644 index 00000000000..00fbb9cf265 --- /dev/null +++ b/r2_data_catalog/r2datacatalog.go @@ -0,0 +1,742 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog + +import ( + "context" + "errors" + "fmt" + "net/http" + "slices" + + "github.com/cloudflare/cloudflare-go/v6/internal/apijson" + "github.com/cloudflare/cloudflare-go/v6/internal/param" + "github.com/cloudflare/cloudflare-go/v6/internal/requestconfig" + "github.com/cloudflare/cloudflare-go/v6/option" +) + +// R2DataCatalogService contains methods and other services that help with +// interacting with the cloudflare API. +// +// Note, unlike clients, this service does not read variables from the environment +// automatically. You should not instantiate this service directly, and instead use +// the [NewR2DataCatalogService] method instead. +type R2DataCatalogService struct { + Options []option.RequestOption + MaintenanceConfigs *MaintenanceConfigService + Credentials *CredentialService + Namespaces *NamespaceService +} + +// NewR2DataCatalogService generates a new service that applies the given options +// to each request. These options are applied after the parent client's options (if +// there is one), and before any request-specific options. +func NewR2DataCatalogService(opts ...option.RequestOption) (r *R2DataCatalogService) { + r = &R2DataCatalogService{} + r.Options = opts + r.MaintenanceConfigs = NewMaintenanceConfigService(opts...) + r.Credentials = NewCredentialService(opts...) + r.Namespaces = NewNamespaceService(opts...) + return +} + +// Returns a list of R2 buckets that have been enabled as Apache Iceberg catalogs +// for the specified account. Each catalog represents an R2 bucket configured to +// store Iceberg metadata and data files. +func (r *R2DataCatalogService) List(ctx context.Context, query R2DataCatalogListParams, opts ...option.RequestOption) (res *R2DataCatalogListResponse, err error) { + var env R2DataCatalogListResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog", query.AccountID) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Disable an R2 bucket as a catalog. This operation deactivates the catalog but +// preserves existing metadata and data files. The catalog can be re-enabled later. +func (r *R2DataCatalogService) Disable(ctx context.Context, bucketName string, body R2DataCatalogDisableParams, opts ...option.RequestOption) (err error) { + opts = slices.Concat(r.Options, opts) + opts = append([]option.RequestOption{option.WithHeader("Accept", "")}, opts...) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s/disable", body.AccountID, bucketName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, nil, opts...) + return +} + +// Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the +// necessary catalog infrastructure and activates the bucket for storing Iceberg +// metadata and data files. +func (r *R2DataCatalogService) Enable(ctx context.Context, bucketName string, body R2DataCatalogEnableParams, opts ...option.RequestOption) (res *R2DataCatalogEnableResponse, err error) { + var env R2DataCatalogEnableResponseEnvelope + opts = slices.Concat(r.Options, opts) + if body.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s/enable", body.AccountID, bucketName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Retrieve detailed information about a specific R2 catalog by bucket name. +// Returns catalog status, maintenance configuration, and credential status. +func (r *R2DataCatalogService) Get(ctx context.Context, bucketName string, query R2DataCatalogGetParams, opts ...option.RequestOption) (res *R2DataCatalogGetResponse, err error) { + var env R2DataCatalogGetResponseEnvelope + opts = slices.Concat(r.Options, opts) + if query.AccountID.Value == "" { + err = errors.New("missing required account_id parameter") + return + } + if bucketName == "" { + err = errors.New("missing required bucket_name parameter") + return + } + path := fmt.Sprintf("accounts/%s/r2-catalog/%s", query.AccountID, bucketName) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result + return +} + +// Contains the list of catalogs. +type R2DataCatalogListResponse struct { + // Lists catalogs in the account. + Warehouses []R2DataCatalogListResponseWarehouse `json:"warehouses,required"` + JSON r2DataCatalogListResponseJSON `json:"-"` +} + +// r2DataCatalogListResponseJSON contains the JSON metadata for the struct +// [R2DataCatalogListResponse] +type r2DataCatalogListResponseJSON struct { + Warehouses apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogListResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogListResponseJSON) RawJSON() string { + return r.raw +} + +// Contains R2 Data Catalog information. +type R2DataCatalogListResponseWarehouse struct { + // Use this to uniquely identify the catalog. + ID string `json:"id,required" format:"uuid"` + // Specifies the associated R2 bucket name. + Bucket string `json:"bucket,required"` + // Specifies the catalog name (generated from account and bucket name). + Name string `json:"name,required"` + // Indicates the status of the catalog. + Status R2DataCatalogListResponseWarehousesStatus `json:"status,required"` + // Shows the credential configuration status. + CredentialStatus R2DataCatalogListResponseWarehousesCredentialStatus `json:"credential_status,nullable"` + // Configures maintenance for the catalog. + MaintenanceConfig R2DataCatalogListResponseWarehousesMaintenanceConfig `json:"maintenance_config,nullable"` + JSON r2DataCatalogListResponseWarehouseJSON `json:"-"` +} + +// r2DataCatalogListResponseWarehouseJSON contains the JSON metadata for the struct +// [R2DataCatalogListResponseWarehouse] +type r2DataCatalogListResponseWarehouseJSON struct { + ID apijson.Field + Bucket apijson.Field + Name apijson.Field + Status apijson.Field + CredentialStatus apijson.Field + MaintenanceConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogListResponseWarehouse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogListResponseWarehouseJSON) RawJSON() string { + return r.raw +} + +// Indicates the status of the catalog. +type R2DataCatalogListResponseWarehousesStatus string + +const ( + R2DataCatalogListResponseWarehousesStatusActive R2DataCatalogListResponseWarehousesStatus = "active" + R2DataCatalogListResponseWarehousesStatusInactive R2DataCatalogListResponseWarehousesStatus = "inactive" +) + +func (r R2DataCatalogListResponseWarehousesStatus) IsKnown() bool { + switch r { + case R2DataCatalogListResponseWarehousesStatusActive, R2DataCatalogListResponseWarehousesStatusInactive: + return true + } + return false +} + +// Shows the credential configuration status. +type R2DataCatalogListResponseWarehousesCredentialStatus string + +const ( + R2DataCatalogListResponseWarehousesCredentialStatusPresent R2DataCatalogListResponseWarehousesCredentialStatus = "present" + R2DataCatalogListResponseWarehousesCredentialStatusAbsent R2DataCatalogListResponseWarehousesCredentialStatus = "absent" +) + +func (r R2DataCatalogListResponseWarehousesCredentialStatus) IsKnown() bool { + switch r { + case R2DataCatalogListResponseWarehousesCredentialStatusPresent, R2DataCatalogListResponseWarehousesCredentialStatusAbsent: + return true + } + return false +} + +// Configures maintenance for the catalog. +type R2DataCatalogListResponseWarehousesMaintenanceConfig struct { + // Configures compaction for catalog maintenance. + Compaction R2DataCatalogListResponseWarehousesMaintenanceConfigCompaction `json:"compaction"` + JSON r2DataCatalogListResponseWarehousesMaintenanceConfigJSON `json:"-"` +} + +// r2DataCatalogListResponseWarehousesMaintenanceConfigJSON contains the JSON +// metadata for the struct [R2DataCatalogListResponseWarehousesMaintenanceConfig] +type r2DataCatalogListResponseWarehousesMaintenanceConfigJSON struct { + Compaction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogListResponseWarehousesMaintenanceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogListResponseWarehousesMaintenanceConfigJSON) RawJSON() string { + return r.raw +} + +// Configures compaction for catalog maintenance. +type R2DataCatalogListResponseWarehousesMaintenanceConfigCompaction struct { + // Specifies the state of maintenance operations. + State R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionState `json:"state,required"` + // Sets the target file size for compaction in megabytes. + TargetSizeMB R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB `json:"target_size_mb,required"` + JSON r2DataCatalogListResponseWarehousesMaintenanceConfigCompactionJSON `json:"-"` +} + +// r2DataCatalogListResponseWarehousesMaintenanceConfigCompactionJSON contains the +// JSON metadata for the struct +// [R2DataCatalogListResponseWarehousesMaintenanceConfigCompaction] +type r2DataCatalogListResponseWarehousesMaintenanceConfigCompactionJSON struct { + State apijson.Field + TargetSizeMB apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogListResponseWarehousesMaintenanceConfigCompaction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogListResponseWarehousesMaintenanceConfigCompactionJSON) RawJSON() string { + return r.raw +} + +// Specifies the state of maintenance operations. +type R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionState string + +const ( + R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionStateEnabled R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionState = "enabled" + R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionStateDisabled R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionState = "disabled" +) + +func (r R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionState) IsKnown() bool { + switch r { + case R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionStateEnabled, R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionStateDisabled: + return true + } + return false +} + +// Sets the target file size for compaction in megabytes. +type R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB string + +const ( + R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB64 R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB = "64" + R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB128 R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB = "128" + R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB256 R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB = "256" + R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB512 R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB = "512" +) + +func (r R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB) IsKnown() bool { + switch r { + case R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB64, R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB128, R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB256, R2DataCatalogListResponseWarehousesMaintenanceConfigCompactionTargetSizeMB512: + return true + } + return false +} + +// Contains response from activating an R2 bucket as a catalog. +type R2DataCatalogEnableResponse struct { + // Use this to uniquely identify the activated catalog. + ID string `json:"id,required" format:"uuid"` + // Specifies the name of the activated catalog. + Name string `json:"name,required"` + JSON r2DataCatalogEnableResponseJSON `json:"-"` +} + +// r2DataCatalogEnableResponseJSON contains the JSON metadata for the struct +// [R2DataCatalogEnableResponse] +type r2DataCatalogEnableResponseJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogEnableResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogEnableResponseJSON) RawJSON() string { + return r.raw +} + +// Contains R2 Data Catalog information. +type R2DataCatalogGetResponse struct { + // Use this to uniquely identify the catalog. + ID string `json:"id,required" format:"uuid"` + // Specifies the associated R2 bucket name. + Bucket string `json:"bucket,required"` + // Specifies the catalog name (generated from account and bucket name). + Name string `json:"name,required"` + // Indicates the status of the catalog. + Status R2DataCatalogGetResponseStatus `json:"status,required"` + // Shows the credential configuration status. + CredentialStatus R2DataCatalogGetResponseCredentialStatus `json:"credential_status,nullable"` + // Configures maintenance for the catalog. + MaintenanceConfig R2DataCatalogGetResponseMaintenanceConfig `json:"maintenance_config,nullable"` + JSON r2DataCatalogGetResponseJSON `json:"-"` +} + +// r2DataCatalogGetResponseJSON contains the JSON metadata for the struct +// [R2DataCatalogGetResponse] +type r2DataCatalogGetResponseJSON struct { + ID apijson.Field + Bucket apijson.Field + Name apijson.Field + Status apijson.Field + CredentialStatus apijson.Field + MaintenanceConfig apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogGetResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogGetResponseJSON) RawJSON() string { + return r.raw +} + +// Indicates the status of the catalog. +type R2DataCatalogGetResponseStatus string + +const ( + R2DataCatalogGetResponseStatusActive R2DataCatalogGetResponseStatus = "active" + R2DataCatalogGetResponseStatusInactive R2DataCatalogGetResponseStatus = "inactive" +) + +func (r R2DataCatalogGetResponseStatus) IsKnown() bool { + switch r { + case R2DataCatalogGetResponseStatusActive, R2DataCatalogGetResponseStatusInactive: + return true + } + return false +} + +// Shows the credential configuration status. +type R2DataCatalogGetResponseCredentialStatus string + +const ( + R2DataCatalogGetResponseCredentialStatusPresent R2DataCatalogGetResponseCredentialStatus = "present" + R2DataCatalogGetResponseCredentialStatusAbsent R2DataCatalogGetResponseCredentialStatus = "absent" +) + +func (r R2DataCatalogGetResponseCredentialStatus) IsKnown() bool { + switch r { + case R2DataCatalogGetResponseCredentialStatusPresent, R2DataCatalogGetResponseCredentialStatusAbsent: + return true + } + return false +} + +// Configures maintenance for the catalog. +type R2DataCatalogGetResponseMaintenanceConfig struct { + // Configures compaction for catalog maintenance. + Compaction R2DataCatalogGetResponseMaintenanceConfigCompaction `json:"compaction"` + JSON r2DataCatalogGetResponseMaintenanceConfigJSON `json:"-"` +} + +// r2DataCatalogGetResponseMaintenanceConfigJSON contains the JSON metadata for the +// struct [R2DataCatalogGetResponseMaintenanceConfig] +type r2DataCatalogGetResponseMaintenanceConfigJSON struct { + Compaction apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogGetResponseMaintenanceConfig) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogGetResponseMaintenanceConfigJSON) RawJSON() string { + return r.raw +} + +// Configures compaction for catalog maintenance. +type R2DataCatalogGetResponseMaintenanceConfigCompaction struct { + // Specifies the state of maintenance operations. + State R2DataCatalogGetResponseMaintenanceConfigCompactionState `json:"state,required"` + // Sets the target file size for compaction in megabytes. + TargetSizeMB R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB `json:"target_size_mb,required"` + JSON r2DataCatalogGetResponseMaintenanceConfigCompactionJSON `json:"-"` +} + +// r2DataCatalogGetResponseMaintenanceConfigCompactionJSON contains the JSON +// metadata for the struct [R2DataCatalogGetResponseMaintenanceConfigCompaction] +type r2DataCatalogGetResponseMaintenanceConfigCompactionJSON struct { + State apijson.Field + TargetSizeMB apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogGetResponseMaintenanceConfigCompaction) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogGetResponseMaintenanceConfigCompactionJSON) RawJSON() string { + return r.raw +} + +// Specifies the state of maintenance operations. +type R2DataCatalogGetResponseMaintenanceConfigCompactionState string + +const ( + R2DataCatalogGetResponseMaintenanceConfigCompactionStateEnabled R2DataCatalogGetResponseMaintenanceConfigCompactionState = "enabled" + R2DataCatalogGetResponseMaintenanceConfigCompactionStateDisabled R2DataCatalogGetResponseMaintenanceConfigCompactionState = "disabled" +) + +func (r R2DataCatalogGetResponseMaintenanceConfigCompactionState) IsKnown() bool { + switch r { + case R2DataCatalogGetResponseMaintenanceConfigCompactionStateEnabled, R2DataCatalogGetResponseMaintenanceConfigCompactionStateDisabled: + return true + } + return false +} + +// Sets the target file size for compaction in megabytes. +type R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB string + +const ( + R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB64 R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB = "64" + R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB128 R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB = "128" + R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB256 R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB = "256" + R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB512 R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB = "512" +) + +func (r R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB) IsKnown() bool { + switch r { + case R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB64, R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB128, R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB256, R2DataCatalogGetResponseMaintenanceConfigCompactionTargetSizeMB512: + return true + } + return false +} + +type R2DataCatalogListParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` +} + +type R2DataCatalogListResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []R2DataCatalogListResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []R2DataCatalogListResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + // Contains the list of catalogs. + Result R2DataCatalogListResponse `json:"result"` + JSON r2DataCatalogListResponseEnvelopeJSON `json:"-"` +} + +// r2DataCatalogListResponseEnvelopeJSON contains the JSON metadata for the struct +// [R2DataCatalogListResponseEnvelope] +type r2DataCatalogListResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogListResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogListResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type R2DataCatalogListResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON r2DataCatalogListResponseEnvelopeErrorsJSON `json:"-"` +} + +// r2DataCatalogListResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [R2DataCatalogListResponseEnvelopeErrors] +type r2DataCatalogListResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogListResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogListResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type R2DataCatalogListResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON r2DataCatalogListResponseEnvelopeMessagesJSON `json:"-"` +} + +// r2DataCatalogListResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [R2DataCatalogListResponseEnvelopeMessages] +type r2DataCatalogListResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogListResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogListResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type R2DataCatalogDisableParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` +} + +type R2DataCatalogEnableParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` +} + +type R2DataCatalogEnableResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []R2DataCatalogEnableResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []R2DataCatalogEnableResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + // Contains response from activating an R2 bucket as a catalog. + Result R2DataCatalogEnableResponse `json:"result"` + JSON r2DataCatalogEnableResponseEnvelopeJSON `json:"-"` +} + +// r2DataCatalogEnableResponseEnvelopeJSON contains the JSON metadata for the +// struct [R2DataCatalogEnableResponseEnvelope] +type r2DataCatalogEnableResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogEnableResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogEnableResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type R2DataCatalogEnableResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON r2DataCatalogEnableResponseEnvelopeErrorsJSON `json:"-"` +} + +// r2DataCatalogEnableResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [R2DataCatalogEnableResponseEnvelopeErrors] +type r2DataCatalogEnableResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogEnableResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogEnableResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type R2DataCatalogEnableResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON r2DataCatalogEnableResponseEnvelopeMessagesJSON `json:"-"` +} + +// r2DataCatalogEnableResponseEnvelopeMessagesJSON contains the JSON metadata for +// the struct [R2DataCatalogEnableResponseEnvelopeMessages] +type r2DataCatalogEnableResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogEnableResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogEnableResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type R2DataCatalogGetParams struct { + // Use this to identify the account. + AccountID param.Field[string] `path:"account_id,required"` +} + +type R2DataCatalogGetResponseEnvelope struct { + // Contains errors if the API call was unsuccessful. + Errors []R2DataCatalogGetResponseEnvelopeErrors `json:"errors,required"` + // Contains informational messages. + Messages []R2DataCatalogGetResponseEnvelopeMessages `json:"messages,required"` + // Indicates whether the API call was successful. + Success bool `json:"success,required"` + // Contains R2 Data Catalog information. + Result R2DataCatalogGetResponse `json:"result"` + JSON r2DataCatalogGetResponseEnvelopeJSON `json:"-"` +} + +// r2DataCatalogGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [R2DataCatalogGetResponseEnvelope] +type r2DataCatalogGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type R2DataCatalogGetResponseEnvelopeErrors struct { + // Specifies the error code. + Code int64 `json:"code,required"` + // Describes the error. + Message string `json:"message,required"` + JSON r2DataCatalogGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// r2DataCatalogGetResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [R2DataCatalogGetResponseEnvelopeErrors] +type r2DataCatalogGetResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type R2DataCatalogGetResponseEnvelopeMessages struct { + // Specifies the message code. + Code int64 `json:"code,required"` + // Contains the message text. + Message string `json:"message,required"` + JSON r2DataCatalogGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// r2DataCatalogGetResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [R2DataCatalogGetResponseEnvelopeMessages] +type r2DataCatalogGetResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *R2DataCatalogGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r r2DataCatalogGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} diff --git a/r2_data_catalog/r2datacatalog_test.go b/r2_data_catalog/r2datacatalog_test.go new file mode 100644 index 00000000000..95d6234cdd2 --- /dev/null +++ b/r2_data_catalog/r2datacatalog_test.go @@ -0,0 +1,127 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +package r2_data_catalog_test + +import ( + "context" + "errors" + "os" + "testing" + + "github.com/cloudflare/cloudflare-go/v6" + "github.com/cloudflare/cloudflare-go/v6/internal/testutil" + "github.com/cloudflare/cloudflare-go/v6/option" + "github.com/cloudflare/cloudflare-go/v6/r2_data_catalog" +) + +func TestR2DataCatalogList(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.List(context.TODO(), r2_data_catalog.R2DataCatalogListParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + }) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestR2DataCatalogDisable(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + err := client.R2DataCatalog.Disable( + context.TODO(), + "my-data-bucket", + r2_data_catalog.R2DataCatalogDisableParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestR2DataCatalogEnable(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.Enable( + context.TODO(), + "my-data-bucket", + r2_data_catalog.R2DataCatalogEnableParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} + +func TestR2DataCatalogGet(t *testing.T) { + baseURL := "http://localhost:4010" + if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { + baseURL = envURL + } + if !testutil.CheckTestServer(t, baseURL) { + return + } + client := cloudflare.NewClient( + option.WithBaseURL(baseURL), + option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"), + option.WithAPIEmail("user@example.com"), + ) + _, err := client.R2DataCatalog.Get( + context.TODO(), + "my-data-bucket", + r2_data_catalog.R2DataCatalogGetParams{ + AccountID: cloudflare.F("0123456789abcdef0123456789abcdef"), + }, + ) + if err != nil { + var apierr *cloudflare.Error + if errors.As(err, &apierr) { + t.Log(string(apierr.DumpRequest(true))) + } + t.Fatalf("err should be nil: %s", err.Error()) + } +} diff --git a/scripts/detect-breaking-changes b/scripts/detect-breaking-changes index 803c66cf1e5..9cf93a4825e 100755 --- a/scripts/detect-breaking-changes +++ b/scripts/detect-breaking-changes @@ -94,6 +94,20 @@ TEST_PATHS=( dns/zonetransferacl_test.go dns/zonetransferpeer_test.go dns/zonetransfertsig_test.go + email_security/investigate_test.go + email_security/investigatedetection_test.go + email_security/investigatepreview_test.go + email_security/investigateraw_test.go + email_security/investigatetrace_test.go + email_security/investigatemove_test.go + email_security/investigatereclassify_test.go + email_security/investigaterelease_test.go + email_security/settingallowpolicy_test.go + email_security/settingblocksender_test.go + email_security/settingdomain_test.go + email_security/settingimpersonationregistry_test.go + email_security/settingtrusteddomain_test.go + email_security/submission_test.go email_routing/emailrouting_test.go email_routing/dns_test.go email_routing/rule_test.go @@ -321,6 +335,12 @@ TEST_PATHS=( r2/superslurperjob_test.go r2/superslurperjoblog_test.go r2/superslurperconnectivityprecheck_test.go + r2_data_catalog/r2datacatalog_test.go + r2_data_catalog/maintenanceconfig_test.go + r2_data_catalog/credential_test.go + r2_data_catalog/namespace_test.go + r2_data_catalog/namespacetable_test.go + r2_data_catalog/namespacetablemaintenanceconfig_test.go workers_for_platforms/dispatchnamespace_test.go workers_for_platforms/dispatchnamespacescript_test.go workers_for_platforms/dispatchnamespacescriptassetupload_test.go From 813b47b136cd4e9095aa00f3921f2d94242287e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 00:16:54 +0000 Subject: [PATCH 09/10] chore(api): update composite API spec --- .stats.yml | 6 +- addressing/prefix_test.go | 1 + api.md | 8 +- cloudforce_one/threatevent.go | 62 ++- iam/resourcegroup.go | 485 +++++++++++++++- origin_ca_certificates/origincacertificate.go | 6 +- r2/bucketsippy.go | 80 ++- zero_trust/dlpentry.go | 511 +++++++++++------ zero_trust/dlpentrycustom.go | 516 +++++++++++------ zero_trust/dlpentryintegration.go | 520 ++++++++++++------ zero_trust/dlpentrypredefined.go | 520 ++++++++++++------ 11 files changed, 1981 insertions(+), 734 deletions(-) diff --git a/.stats.yml b/.stats.yml index d5f31810161..9b58245ae27 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 1931 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d01829c5ff74f82c372d7c132f3c9adcef9a7ac392e1dc7ff431f3397c94b6fb.yml -openapi_spec_hash: 36f226c48f0fda588903ef75a766ccb1 +configured_endpoints: 1932 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6183ef87f1b8eea6ad4bae542bfde2ec23a5526ae2b7bacdf6c6a4c48d990995.yml +openapi_spec_hash: 9c8ac3d56571ebf1e170d993b71ccb4d config_hash: bfa05f973c1b1797df33a05f942d5fac diff --git a/addressing/prefix_test.go b/addressing/prefix_test.go index 7320e93ec5a..37a069d010d 100644 --- a/addressing/prefix_test.go +++ b/addressing/prefix_test.go @@ -33,6 +33,7 @@ func TestPrefixNewWithOptionalParams(t *testing.T) { CIDR: cloudflare.F("192.0.2.0/24"), DelegateLOACreation: cloudflare.F(true), Description: cloudflare.F("Internal test prefix"), + LOADocumentID: cloudflare.F("d933b1530bc56c9953cf8ce166da8004"), }) if err != nil { var apierr *cloudflare.Error diff --git a/api.md b/api.md index c0f74288256..d4605bf59e6 100644 --- a/api.md +++ b/api.md @@ -3229,8 +3229,13 @@ Methods: ## LOADocuments +Response Types: + +- addressing.LOADocumentNewResponse + Methods: +- client.Addressing.LOADocuments.New(ctx context.Context, params addressing.LOADocumentNewParams) (addressing.LOADocumentNewResponse, error) - client.Addressing.LOADocuments.Get(ctx context.Context, loaDocumentID string, query addressing.LOADocumentGetParams) (http.Response, error) ## Prefixes @@ -8706,6 +8711,7 @@ Response Types: - cloudforce_one.ThreatEventNewResponse - cloudforce_one.ThreatEventListResponse - cloudforce_one.ThreatEventDeleteResponse +- cloudforce_one.ThreatEventBulkNewResponse - cloudforce_one.ThreatEventEditResponse - cloudforce_one.ThreatEventGetResponse @@ -8714,7 +8720,7 @@ Methods: - client.CloudforceOne.ThreatEvents.New(ctx context.Context, params cloudforce_one.ThreatEventNewParams) (cloudforce_one.ThreatEventNewResponse, error) - client.CloudforceOne.ThreatEvents.List(ctx context.Context, params cloudforce_one.ThreatEventListParams) ([]cloudforce_one.ThreatEventListResponse, error) - client.CloudforceOne.ThreatEvents.Delete(ctx context.Context, eventID string, body cloudforce_one.ThreatEventDeleteParams) (cloudforce_one.ThreatEventDeleteResponse, error) -- client.CloudforceOne.ThreatEvents.BulkNew(ctx context.Context, params cloudforce_one.ThreatEventBulkNewParams) (float64, error) +- client.CloudforceOne.ThreatEvents.BulkNew(ctx context.Context, params cloudforce_one.ThreatEventBulkNewParams) (cloudforce_one.ThreatEventBulkNewResponse, error) - client.CloudforceOne.ThreatEvents.Edit(ctx context.Context, eventID string, params cloudforce_one.ThreatEventEditParams) (cloudforce_one.ThreatEventEditResponse, error) - client.CloudforceOne.ThreatEvents.Get(ctx context.Context, eventID string, query cloudforce_one.ThreatEventGetParams) (cloudforce_one.ThreatEventGetResponse, error) diff --git a/cloudforce_one/threatevent.go b/cloudforce_one/threatevent.go index 9998cb10a22..67559a3452f 100644 --- a/cloudforce_one/threatevent.go +++ b/cloudforce_one/threatevent.go @@ -115,7 +115,7 @@ func (r *ThreatEventService) Delete(ctx context.Context, eventID string, body Th // IDs) in your account, use the // [`List Datasets`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/list/) // endpoint. -func (r *ThreatEventService) BulkNew(ctx context.Context, params ThreatEventBulkNewParams, opts ...option.RequestOption) (res *float64, err error) { +func (r *ThreatEventService) BulkNew(ctx context.Context, params ThreatEventBulkNewParams, opts ...option.RequestOption) (res *ThreatEventBulkNewResponse, err error) { opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { err = errors.New("missing required account_id parameter") @@ -320,6 +320,66 @@ func (r threatEventDeleteResponseJSON) RawJSON() string { return r.raw } +// Detailed result of bulk event creation with auto-tag management +type ThreatEventBulkNewResponse struct { + // Number of events created + CreatedEventsCount float64 `json:"createdEventsCount,required"` + // Number of indicators created + CreatedIndicatorsCount float64 `json:"createdIndicatorsCount,required"` + // Number of tags created in SoT + CreatedTagsCount float64 `json:"createdTagsCount,required"` + // Number of errors encountered + ErrorCount float64 `json:"errorCount,required"` + // Array of error details + Errors []ThreatEventBulkNewResponseError `json:"errors"` + JSON threatEventBulkNewResponseJSON `json:"-"` +} + +// threatEventBulkNewResponseJSON contains the JSON metadata for the struct +// [ThreatEventBulkNewResponse] +type threatEventBulkNewResponseJSON struct { + CreatedEventsCount apijson.Field + CreatedIndicatorsCount apijson.Field + CreatedTagsCount apijson.Field + ErrorCount apijson.Field + Errors apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ThreatEventBulkNewResponse) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r threatEventBulkNewResponseJSON) RawJSON() string { + return r.raw +} + +type ThreatEventBulkNewResponseError struct { + // Error message + Error string `json:"error,required"` + // Index of the event that caused the error + EventIndex float64 `json:"eventIndex,required"` + JSON threatEventBulkNewResponseErrorJSON `json:"-"` +} + +// threatEventBulkNewResponseErrorJSON contains the JSON metadata for the struct +// [ThreatEventBulkNewResponseError] +type threatEventBulkNewResponseErrorJSON struct { + Error apijson.Field + EventIndex apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ThreatEventBulkNewResponseError) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r threatEventBulkNewResponseErrorJSON) RawJSON() string { + return r.raw +} + type ThreatEventEditResponse struct { Attacker string `json:"attacker,required"` AttackerCountry string `json:"attackerCountry,required"` diff --git a/iam/resourcegroup.go b/iam/resourcegroup.go index 30e08068bd9..93969764738 100644 --- a/iam/resourcegroup.go +++ b/iam/resourcegroup.go @@ -39,18 +39,24 @@ func NewResourceGroupService(opts ...option.RequestOption) (r *ResourceGroupServ // Create a new Resource Group under the specified account. func (r *ResourceGroupService) New(ctx context.Context, params ResourceGroupNewParams, opts ...option.RequestOption) (res *ResourceGroupNewResponse, err error) { + var env ResourceGroupNewResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { err = errors.New("missing required account_id parameter") return } path := fmt.Sprintf("accounts/%s/iam/resource_groups", params.AccountID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result return } // Modify an existing resource group. func (r *ResourceGroupService) Update(ctx context.Context, resourceGroupID string, params ResourceGroupUpdateParams, opts ...option.RequestOption) (res *ResourceGroupUpdateResponse, err error) { + var env ResourceGroupUpdateResponseEnvelope opts = slices.Concat(r.Options, opts) if params.AccountID.Value == "" { err = errors.New("missing required account_id parameter") @@ -61,7 +67,11 @@ func (r *ResourceGroupService) Update(ctx context.Context, resourceGroupID strin return } path := fmt.Sprintf("accounts/%s/iam/resource_groups/%s", params.AccountID, resourceGroupID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...) + if err != nil { + return + } + res = &env.Result return } @@ -115,6 +125,7 @@ func (r *ResourceGroupService) Delete(ctx context.Context, resourceGroupID strin // Get information about a specific resource group in an account. func (r *ResourceGroupService) Get(ctx context.Context, resourceGroupID string, query ResourceGroupGetParams, opts ...option.RequestOption) (res *ResourceGroupGetResponse, err error) { + var env ResourceGroupGetResponseEnvelope opts = slices.Concat(r.Options, opts) if query.AccountID.Value == "" { err = errors.New("missing required account_id parameter") @@ -125,27 +136,34 @@ func (r *ResourceGroupService) Get(ctx context.Context, resourceGroupID string, return } path := fmt.Sprintf("accounts/%s/iam/resource_groups/%s", query.AccountID, resourceGroupID) - err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...) + err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...) + if err != nil { + return + } + res = &env.Result return } // A group of scoped resources. type ResourceGroupNewResponse struct { - // Identifier of the group. - ID string `json:"id"` + // Identifier of the resource group. + ID string `json:"id,required"` + // The scope associated to the resource group + Scope []ResourceGroupNewResponseScope `json:"scope,required"` // Attributes associated to the resource group. - Meta interface{} `json:"meta"` - // A scope is a combination of scope objects which provides additional context. - Scope ResourceGroupNewResponseScope `json:"scope"` - JSON resourceGroupNewResponseJSON `json:"-"` + Meta ResourceGroupNewResponseMeta `json:"meta"` + // Name of the resource group. + Name string `json:"name"` + JSON resourceGroupNewResponseJSON `json:"-"` } // resourceGroupNewResponseJSON contains the JSON metadata for the struct // [ResourceGroupNewResponse] type resourceGroupNewResponseJSON struct { ID apijson.Field - Meta apijson.Field Scope apijson.Field + Meta apijson.Field + Name apijson.Field raw string ExtraFields map[string]apijson.Field } @@ -163,8 +181,7 @@ type ResourceGroupNewResponseScope struct { // This is a combination of pre-defined resource name and identifier (like Account // ID etc.) Key string `json:"key,required"` - // A list of scope objects for additional context. The number of Scope objects - // should not be zero. + // A list of scope objects for additional context. Objects []ResourceGroupNewResponseScopeObject `json:"objects,required"` JSON resourceGroupNewResponseScopeJSON `json:"-"` } @@ -211,6 +228,30 @@ func (r resourceGroupNewResponseScopeObjectJSON) RawJSON() string { return r.raw } +// Attributes associated to the resource group. +type ResourceGroupNewResponseMeta struct { + Key string `json:"key"` + Value string `json:"value"` + JSON resourceGroupNewResponseMetaJSON `json:"-"` +} + +// resourceGroupNewResponseMetaJSON contains the JSON metadata for the struct +// [ResourceGroupNewResponseMeta] +type resourceGroupNewResponseMetaJSON struct { + Key apijson.Field + Value apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupNewResponseMeta) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupNewResponseMetaJSON) RawJSON() string { + return r.raw +} + // A group of scoped resources. type ResourceGroupUpdateResponse struct { // Identifier of the resource group. @@ -596,6 +637,146 @@ func (r ResourceGroupNewParamsScopeObject) MarshalJSON() (data []byte, err error return apijson.MarshalRoot(r) } +type ResourceGroupNewResponseEnvelope struct { + Errors []ResourceGroupNewResponseEnvelopeErrors `json:"errors,required"` + Messages []ResourceGroupNewResponseEnvelopeMessages `json:"messages,required"` + // Whether the API call was successful. + Success ResourceGroupNewResponseEnvelopeSuccess `json:"success,required"` + // A group of scoped resources. + Result ResourceGroupNewResponse `json:"result"` + JSON resourceGroupNewResponseEnvelopeJSON `json:"-"` +} + +// resourceGroupNewResponseEnvelopeJSON contains the JSON metadata for the struct +// [ResourceGroupNewResponseEnvelope] +type resourceGroupNewResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupNewResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupNewResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ResourceGroupNewResponseEnvelopeErrorsSource `json:"source"` + JSON resourceGroupNewResponseEnvelopeErrorsJSON `json:"-"` +} + +// resourceGroupNewResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [ResourceGroupNewResponseEnvelopeErrors] +type resourceGroupNewResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupNewResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupNewResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON resourceGroupNewResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// resourceGroupNewResponseEnvelopeErrorsSourceJSON contains the JSON metadata for +// the struct [ResourceGroupNewResponseEnvelopeErrorsSource] +type resourceGroupNewResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupNewResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupNewResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ResourceGroupNewResponseEnvelopeMessagesSource `json:"source"` + JSON resourceGroupNewResponseEnvelopeMessagesJSON `json:"-"` +} + +// resourceGroupNewResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [ResourceGroupNewResponseEnvelopeMessages] +type resourceGroupNewResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupNewResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupNewResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON resourceGroupNewResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// resourceGroupNewResponseEnvelopeMessagesSourceJSON contains the JSON metadata +// for the struct [ResourceGroupNewResponseEnvelopeMessagesSource] +type resourceGroupNewResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupNewResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. +type ResourceGroupNewResponseEnvelopeSuccess bool + +const ( + ResourceGroupNewResponseEnvelopeSuccessTrue ResourceGroupNewResponseEnvelopeSuccess = true +) + +func (r ResourceGroupNewResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case ResourceGroupNewResponseEnvelopeSuccessTrue: + return true + } + return false +} + type ResourceGroupUpdateParams struct { // Account identifier tag. AccountID param.Field[string] `path:"account_id,required"` @@ -635,6 +816,146 @@ func (r ResourceGroupUpdateParamsScopeObject) MarshalJSON() (data []byte, err er return apijson.MarshalRoot(r) } +type ResourceGroupUpdateResponseEnvelope struct { + Errors []ResourceGroupUpdateResponseEnvelopeErrors `json:"errors,required"` + Messages []ResourceGroupUpdateResponseEnvelopeMessages `json:"messages,required"` + // Whether the API call was successful. + Success ResourceGroupUpdateResponseEnvelopeSuccess `json:"success,required"` + // A group of scoped resources. + Result ResourceGroupUpdateResponse `json:"result"` + JSON resourceGroupUpdateResponseEnvelopeJSON `json:"-"` +} + +// resourceGroupUpdateResponseEnvelopeJSON contains the JSON metadata for the +// struct [ResourceGroupUpdateResponseEnvelope] +type resourceGroupUpdateResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupUpdateResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupUpdateResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ResourceGroupUpdateResponseEnvelopeErrorsSource `json:"source"` + JSON resourceGroupUpdateResponseEnvelopeErrorsJSON `json:"-"` +} + +// resourceGroupUpdateResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [ResourceGroupUpdateResponseEnvelopeErrors] +type resourceGroupUpdateResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupUpdateResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupUpdateResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON resourceGroupUpdateResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// resourceGroupUpdateResponseEnvelopeErrorsSourceJSON contains the JSON metadata +// for the struct [ResourceGroupUpdateResponseEnvelopeErrorsSource] +type resourceGroupUpdateResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupUpdateResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupUpdateResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ResourceGroupUpdateResponseEnvelopeMessagesSource `json:"source"` + JSON resourceGroupUpdateResponseEnvelopeMessagesJSON `json:"-"` +} + +// resourceGroupUpdateResponseEnvelopeMessagesJSON contains the JSON metadata for +// the struct [ResourceGroupUpdateResponseEnvelopeMessages] +type resourceGroupUpdateResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupUpdateResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupUpdateResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON resourceGroupUpdateResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// resourceGroupUpdateResponseEnvelopeMessagesSourceJSON contains the JSON metadata +// for the struct [ResourceGroupUpdateResponseEnvelopeMessagesSource] +type resourceGroupUpdateResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupUpdateResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. +type ResourceGroupUpdateResponseEnvelopeSuccess bool + +const ( + ResourceGroupUpdateResponseEnvelopeSuccessTrue ResourceGroupUpdateResponseEnvelopeSuccess = true +) + +func (r ResourceGroupUpdateResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case ResourceGroupUpdateResponseEnvelopeSuccessTrue: + return true + } + return false +} + type ResourceGroupListParams struct { // Account identifier tag. AccountID param.Field[string] `path:"account_id,required"` @@ -801,3 +1122,143 @@ type ResourceGroupGetParams struct { // Account identifier tag. AccountID param.Field[string] `path:"account_id,required"` } + +type ResourceGroupGetResponseEnvelope struct { + Errors []ResourceGroupGetResponseEnvelopeErrors `json:"errors,required"` + Messages []ResourceGroupGetResponseEnvelopeMessages `json:"messages,required"` + // Whether the API call was successful. + Success ResourceGroupGetResponseEnvelopeSuccess `json:"success,required"` + // A group of scoped resources. + Result ResourceGroupGetResponse `json:"result"` + JSON resourceGroupGetResponseEnvelopeJSON `json:"-"` +} + +// resourceGroupGetResponseEnvelopeJSON contains the JSON metadata for the struct +// [ResourceGroupGetResponseEnvelope] +type resourceGroupGetResponseEnvelopeJSON struct { + Errors apijson.Field + Messages apijson.Field + Success apijson.Field + Result apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupGetResponseEnvelopeJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupGetResponseEnvelopeErrors struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ResourceGroupGetResponseEnvelopeErrorsSource `json:"source"` + JSON resourceGroupGetResponseEnvelopeErrorsJSON `json:"-"` +} + +// resourceGroupGetResponseEnvelopeErrorsJSON contains the JSON metadata for the +// struct [ResourceGroupGetResponseEnvelopeErrors] +type resourceGroupGetResponseEnvelopeErrorsJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupGetResponseEnvelopeErrorsJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupGetResponseEnvelopeErrorsSource struct { + Pointer string `json:"pointer"` + JSON resourceGroupGetResponseEnvelopeErrorsSourceJSON `json:"-"` +} + +// resourceGroupGetResponseEnvelopeErrorsSourceJSON contains the JSON metadata for +// the struct [ResourceGroupGetResponseEnvelopeErrorsSource] +type resourceGroupGetResponseEnvelopeErrorsSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupGetResponseEnvelopeErrorsSourceJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupGetResponseEnvelopeMessages struct { + Code int64 `json:"code,required"` + Message string `json:"message,required"` + DocumentationURL string `json:"documentation_url"` + Source ResourceGroupGetResponseEnvelopeMessagesSource `json:"source"` + JSON resourceGroupGetResponseEnvelopeMessagesJSON `json:"-"` +} + +// resourceGroupGetResponseEnvelopeMessagesJSON contains the JSON metadata for the +// struct [ResourceGroupGetResponseEnvelopeMessages] +type resourceGroupGetResponseEnvelopeMessagesJSON struct { + Code apijson.Field + Message apijson.Field + DocumentationURL apijson.Field + Source apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupGetResponseEnvelopeMessagesJSON) RawJSON() string { + return r.raw +} + +type ResourceGroupGetResponseEnvelopeMessagesSource struct { + Pointer string `json:"pointer"` + JSON resourceGroupGetResponseEnvelopeMessagesSourceJSON `json:"-"` +} + +// resourceGroupGetResponseEnvelopeMessagesSourceJSON contains the JSON metadata +// for the struct [ResourceGroupGetResponseEnvelopeMessagesSource] +type resourceGroupGetResponseEnvelopeMessagesSourceJSON struct { + Pointer apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ResourceGroupGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r resourceGroupGetResponseEnvelopeMessagesSourceJSON) RawJSON() string { + return r.raw +} + +// Whether the API call was successful. +type ResourceGroupGetResponseEnvelopeSuccess bool + +const ( + ResourceGroupGetResponseEnvelopeSuccessTrue ResourceGroupGetResponseEnvelopeSuccess = true +) + +func (r ResourceGroupGetResponseEnvelopeSuccess) IsKnown() bool { + switch r { + case ResourceGroupGetResponseEnvelopeSuccessTrue: + return true + } + return false +} diff --git a/origin_ca_certificates/origincacertificate.go b/origin_ca_certificates/origincacertificate.go index 1af7e786b5f..cef66f7fa92 100644 --- a/origin_ca_certificates/origincacertificate.go +++ b/origin_ca_certificates/origincacertificate.go @@ -188,13 +188,13 @@ func (r originCACertificateDeleteResponseJSON) RawJSON() string { type OriginCACertificateNewParams struct { // The Certificate Signing Request (CSR). Must be newline-encoded. - Csr param.Field[string] `json:"csr"` + Csr param.Field[string] `json:"csr,required"` // Array of hostnames or wildcard names (e.g., \*.example.com) bound to the // certificate. - Hostnames param.Field[[]string] `json:"hostnames"` + Hostnames param.Field[[]string] `json:"hostnames,required"` // Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), // or "keyless-certificate" (for Keyless SSL servers). - RequestType param.Field[shared.CertificateRequestType] `json:"request_type"` + RequestType param.Field[shared.CertificateRequestType] `json:"request_type,required"` // The number of days for which the certificate should be valid. RequestedValidity param.Field[ssl.RequestValidity] `json:"requested_validity"` } diff --git a/r2/bucketsippy.go b/r2/bucketsippy.go index 101f14e4033..ff360f19ece 100644 --- a/r2/bucketsippy.go +++ b/r2/bucketsippy.go @@ -180,9 +180,11 @@ func (r sippyDestinationJSON) RawJSON() string { // Details about the configured source bucket. type SippySource struct { - // Name of the bucket on the provider. - Bucket string `json:"bucket"` - Provider SippySourceProvider `json:"provider"` + // Name of the bucket on the provider (AWS, GCS only). + Bucket string `json:"bucket,nullable"` + // S3-compatible URL (Generic S3-compatible providers only). + BucketURL string `json:"bucketUrl,nullable"` + Provider SippySourceProvider `json:"provider"` // Region where the bucket resides (AWS only). Region string `json:"region,nullable"` JSON sippySourceJSON `json:"-"` @@ -191,6 +193,7 @@ type SippySource struct { // sippySourceJSON contains the JSON metadata for the struct [SippySource] type sippySourceJSON struct { Bucket apijson.Field + BucketURL apijson.Field Provider apijson.Field Region apijson.Field raw string @@ -210,11 +213,12 @@ type SippySourceProvider string const ( SippySourceProviderAws SippySourceProvider = "aws" SippySourceProviderGcs SippySourceProvider = "gcs" + SippySourceProviderS3 SippySourceProvider = "s3" ) func (r SippySourceProvider) IsKnown() bool { switch r { - case SippySourceProviderAws, SippySourceProviderGcs: + case SippySourceProviderAws, SippySourceProviderGcs, SippySourceProviderS3: return true } return false @@ -279,7 +283,8 @@ func (r BucketSippyUpdateParamsBody) MarshalJSON() (data []byte, err error) { func (r BucketSippyUpdateParamsBody) implementsBucketSippyUpdateParamsBodyUnion() {} // Satisfied by [r2.BucketSippyUpdateParamsBodyR2EnableSippyAws], -// [r2.BucketSippyUpdateParamsBodyR2EnableSippyGcs], [BucketSippyUpdateParamsBody]. +// [r2.BucketSippyUpdateParamsBodyR2EnableSippyGcs], +// [r2.BucketSippyUpdateParamsBodyR2EnableSippyS3], [BucketSippyUpdateParamsBody]. type BucketSippyUpdateParamsBodyUnion interface { implementsBucketSippyUpdateParamsBodyUnion() } @@ -416,6 +421,71 @@ func (r BucketSippyUpdateParamsBodyR2EnableSippyGcsSourceProvider) IsKnown() boo return false } +type BucketSippyUpdateParamsBodyR2EnableSippyS3 struct { + // R2 bucket to copy objects to. + Destination param.Field[BucketSippyUpdateParamsBodyR2EnableSippyS3Destination] `json:"destination"` + // General S3-compatible provider to copy objects from. + Source param.Field[BucketSippyUpdateParamsBodyR2EnableSippyS3Source] `json:"source"` +} + +func (r BucketSippyUpdateParamsBodyR2EnableSippyS3) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r BucketSippyUpdateParamsBodyR2EnableSippyS3) implementsBucketSippyUpdateParamsBodyUnion() {} + +// R2 bucket to copy objects to. +type BucketSippyUpdateParamsBodyR2EnableSippyS3Destination struct { + // ID of a Cloudflare API token. This is the value labelled "Access Key ID" when + // creating an API. token from the + // [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). + // + // Sippy will use this token when writing objects to R2, so it is best to scope + // this token to the bucket you're enabling Sippy for. + AccessKeyID param.Field[string] `json:"accessKeyId"` + Provider param.Field[Provider] `json:"provider"` + // Value of a Cloudflare API token. This is the value labelled "Secret Access Key" + // when creating an API. token from the + // [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). + // + // Sippy will use this token when writing objects to R2, so it is best to scope + // this token to the bucket you're enabling Sippy for. + SecretAccessKey param.Field[string] `json:"secretAccessKey"` +} + +func (r BucketSippyUpdateParamsBodyR2EnableSippyS3Destination) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +// General S3-compatible provider to copy objects from. +type BucketSippyUpdateParamsBodyR2EnableSippyS3Source struct { + // Access Key ID of an IAM credential (ideally scoped to a single S3 bucket). + AccessKeyID param.Field[string] `json:"accessKeyId"` + // URL to the S3-compatible API of the bucket. + BucketURL param.Field[string] `json:"bucketUrl"` + Provider param.Field[BucketSippyUpdateParamsBodyR2EnableSippyS3SourceProvider] `json:"provider"` + // Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket). + SecretAccessKey param.Field[string] `json:"secretAccessKey"` +} + +func (r BucketSippyUpdateParamsBodyR2EnableSippyS3Source) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +type BucketSippyUpdateParamsBodyR2EnableSippyS3SourceProvider string + +const ( + BucketSippyUpdateParamsBodyR2EnableSippyS3SourceProviderS3 BucketSippyUpdateParamsBodyR2EnableSippyS3SourceProvider = "s3" +) + +func (r BucketSippyUpdateParamsBodyR2EnableSippyS3SourceProvider) IsKnown() bool { + switch r { + case BucketSippyUpdateParamsBodyR2EnableSippyS3SourceProviderS3: + return true + } + return false +} + // Jurisdiction where objects in this bucket are guaranteed to be stored. type BucketSippyUpdateParamsCfR2Jurisdiction string diff --git a/zero_trust/dlpentry.go b/zero_trust/dlpentry.go index 106a5fa8940..99615925399 100644 --- a/zero_trust/dlpentry.go +++ b/zero_trust/dlpentry.go @@ -1220,14 +1220,23 @@ type DLPEntryGetResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryGetResponsePredefinedConfidence]. + // [DLPEntryGetResponsePredefinedEntryConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` ProfileID string `json:"profile_id,nullable" format:"uuid"` - Secret bool `json:"secret"` - UpdatedAt time.Time `json:"updated_at" format:"date-time"` - // This field can have the runtime type of [DLPEntryGetResponsePredefinedVariant]. + // This field can have the runtime type of + // [[]DLPEntryGetResponseCustomEntryProfile], + // [[]DLPEntryGetResponsePredefinedEntryProfile], + // [[]DLPEntryGetResponseIntegrationEntryProfile], + // [[]DLPEntryGetResponseExactDataEntryProfile], + // [[]DLPEntryGetResponseDocumentFingerprintEntryProfile], + // [[]DLPEntryGetResponseWordListEntryProfile]. + Profiles interface{} `json:"profiles"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPEntryGetResponsePredefinedEntryVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -1247,6 +1256,7 @@ type dlpEntryGetResponseJSON struct { CreatedAt apijson.Field Pattern apijson.Field ProfileID apijson.Field + Profiles apijson.Field Secret apijson.Field UpdatedAt apijson.Field Variant apijson.Field @@ -1271,17 +1281,20 @@ func (r *DLPEntryGetResponse) UnmarshalJSON(data []byte) (err error) { // AsUnion returns a [DLPEntryGetResponseUnion] interface which you can cast to the // specific types for more type safety. // -// Possible runtime types of the union are [DLPEntryGetResponseCustom], -// [DLPEntryGetResponsePredefined], [DLPEntryGetResponseIntegration], -// [DLPEntryGetResponseExactData], [DLPEntryGetResponseDocumentFingerprint], -// [DLPEntryGetResponseWordList]. +// Possible runtime types of the union are [DLPEntryGetResponseCustomEntry], +// [DLPEntryGetResponsePredefinedEntry], [DLPEntryGetResponseIntegrationEntry], +// [DLPEntryGetResponseExactDataEntry], +// [DLPEntryGetResponseDocumentFingerprintEntry], +// [DLPEntryGetResponseWordListEntry]. func (r DLPEntryGetResponse) AsUnion() DLPEntryGetResponseUnion { return r.union } -// Union satisfied by [DLPEntryGetResponseCustom], [DLPEntryGetResponsePredefined], -// [DLPEntryGetResponseIntegration], [DLPEntryGetResponseExactData], -// [DLPEntryGetResponseDocumentFingerprint] or [DLPEntryGetResponseWordList]. +// Union satisfied by [DLPEntryGetResponseCustomEntry], +// [DLPEntryGetResponsePredefinedEntry], [DLPEntryGetResponseIntegrationEntry], +// [DLPEntryGetResponseExactDataEntry], +// [DLPEntryGetResponseDocumentFingerprintEntry] or +// [DLPEntryGetResponseWordListEntry]. type DLPEntryGetResponseUnion interface { implementsDLPEntryGetResponse() } @@ -1289,55 +1302,50 @@ type DLPEntryGetResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryGetResponseUnion)(nil)).Elem(), - "type", + "", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseCustom{}), - DiscriminatorValue: "custom", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseCustomEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponsePredefined{}), - DiscriminatorValue: "predefined", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponsePredefinedEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseIntegration{}), - DiscriminatorValue: "integration", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseIntegrationEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseExactData{}), - DiscriminatorValue: "exact_data", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseExactDataEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseDocumentFingerprint{}), - DiscriminatorValue: "document_fingerprint", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseDocumentFingerprintEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryGetResponseWordList{}), - DiscriminatorValue: "word_list", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryGetResponseWordListEntry{}), }, ) } -type DLPEntryGetResponseCustom struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryGetResponseCustomType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryGetResponseCustomJSON `json:"-"` +type DLPEntryGetResponseCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryGetResponseCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryGetResponseCustomEntryProfile `json:"profiles"` + JSON dlpEntryGetResponseCustomEntryJSON `json:"-"` } -// dlpEntryGetResponseCustomJSON contains the JSON metadata for the struct -// [DLPEntryGetResponseCustom] -type dlpEntryGetResponseCustomJSON struct { +// dlpEntryGetResponseCustomEntryJSON contains the JSON metadata for the struct +// [DLPEntryGetResponseCustomEntry] +type dlpEntryGetResponseCustomEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1346,119 +1354,170 @@ type dlpEntryGetResponseCustomJSON struct { Type apijson.Field UpdatedAt apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseCustom) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseCustomJSON) RawJSON() string { +func (r dlpEntryGetResponseCustomEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseCustom) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseCustomEntry) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseCustomType string +type DLPEntryGetResponseCustomEntryType string const ( - DLPEntryGetResponseCustomTypeCustom DLPEntryGetResponseCustomType = "custom" + DLPEntryGetResponseCustomEntryTypeCustom DLPEntryGetResponseCustomEntryType = "custom" ) -func (r DLPEntryGetResponseCustomType) IsKnown() bool { +func (r DLPEntryGetResponseCustomEntryType) IsKnown() bool { switch r { - case DLPEntryGetResponseCustomTypeCustom: + case DLPEntryGetResponseCustomEntryTypeCustom: return true } return false } -type DLPEntryGetResponsePredefined struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryGetResponsePredefinedConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryGetResponsePredefinedType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryGetResponsePredefinedVariant `json:"variant"` - JSON dlpEntryGetResponsePredefinedJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryGetResponseCustomEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryGetResponseCustomEntryProfileJSON `json:"-"` +} + +// dlpEntryGetResponseCustomEntryProfileJSON contains the JSON metadata for the +// struct [DLPEntryGetResponseCustomEntryProfile] +type dlpEntryGetResponseCustomEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryGetResponseCustomEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryGetResponseCustomEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryGetResponsePredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryGetResponsePredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryGetResponsePredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryGetResponsePredefinedEntryProfile `json:"profiles"` + Variant DLPEntryGetResponsePredefinedEntryVariant `json:"variant"` + JSON dlpEntryGetResponsePredefinedEntryJSON `json:"-"` } -// dlpEntryGetResponsePredefinedJSON contains the JSON metadata for the struct -// [DLPEntryGetResponsePredefined] -type dlpEntryGetResponsePredefinedJSON struct { +// dlpEntryGetResponsePredefinedEntryJSON contains the JSON metadata for the struct +// [DLPEntryGetResponsePredefinedEntry] +type dlpEntryGetResponsePredefinedEntryJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field Name apijson.Field Type apijson.Field ProfileID apijson.Field + Profiles apijson.Field Variant apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponsePredefinedJSON) RawJSON() string { +func (r dlpEntryGetResponsePredefinedEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponsePredefined) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponsePredefinedEntry) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponsePredefinedConfidence struct { +type DLPEntryGetResponsePredefinedEntryConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryGetResponsePredefinedConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryGetResponsePredefinedEntryConfidenceJSON `json:"-"` } -// dlpEntryGetResponsePredefinedConfidenceJSON contains the JSON metadata for the -// struct [DLPEntryGetResponsePredefinedConfidence] -type dlpEntryGetResponsePredefinedConfidenceJSON struct { +// dlpEntryGetResponsePredefinedEntryConfidenceJSON contains the JSON metadata for +// the struct [DLPEntryGetResponsePredefinedEntryConfidence] +type dlpEntryGetResponsePredefinedEntryConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponsePredefinedConfidenceJSON) RawJSON() string { +func (r dlpEntryGetResponsePredefinedEntryConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryGetResponsePredefinedType string +type DLPEntryGetResponsePredefinedEntryType string const ( - DLPEntryGetResponsePredefinedTypePredefined DLPEntryGetResponsePredefinedType = "predefined" + DLPEntryGetResponsePredefinedEntryTypePredefined DLPEntryGetResponsePredefinedEntryType = "predefined" ) -func (r DLPEntryGetResponsePredefinedType) IsKnown() bool { +func (r DLPEntryGetResponsePredefinedEntryType) IsKnown() bool { switch r { - case DLPEntryGetResponsePredefinedTypePredefined: + case DLPEntryGetResponsePredefinedEntryTypePredefined: return true } return false } -type DLPEntryGetResponsePredefinedVariant struct { - TopicType DLPEntryGetResponsePredefinedVariantTopicType `json:"topic_type,required"` - Type DLPEntryGetResponsePredefinedVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryGetResponsePredefinedVariantJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryGetResponsePredefinedEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryGetResponsePredefinedEntryProfileJSON `json:"-"` +} + +// dlpEntryGetResponsePredefinedEntryProfileJSON contains the JSON metadata for the +// struct [DLPEntryGetResponsePredefinedEntryProfile] +type dlpEntryGetResponsePredefinedEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryGetResponsePredefinedEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -// dlpEntryGetResponsePredefinedVariantJSON contains the JSON metadata for the -// struct [DLPEntryGetResponsePredefinedVariant] -type dlpEntryGetResponsePredefinedVariantJSON struct { +func (r dlpEntryGetResponsePredefinedEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryGetResponsePredefinedEntryVariant struct { + TopicType DLPEntryGetResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPEntryGetResponsePredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryGetResponsePredefinedEntryVariantJSON `json:"-"` +} + +// dlpEntryGetResponsePredefinedEntryVariantJSON contains the JSON metadata for the +// struct [DLPEntryGetResponsePredefinedEntryVariant] +type dlpEntryGetResponsePredefinedEntryVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -1466,57 +1525,58 @@ type dlpEntryGetResponsePredefinedVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponsePredefinedVariantJSON) RawJSON() string { +func (r dlpEntryGetResponsePredefinedEntryVariantJSON) RawJSON() string { return r.raw } -type DLPEntryGetResponsePredefinedVariantTopicType string +type DLPEntryGetResponsePredefinedEntryVariantTopicType string const ( - DLPEntryGetResponsePredefinedVariantTopicTypeIntent DLPEntryGetResponsePredefinedVariantTopicType = "Intent" - DLPEntryGetResponsePredefinedVariantTopicTypeContent DLPEntryGetResponsePredefinedVariantTopicType = "Content" + DLPEntryGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryGetResponsePredefinedEntryVariantTopicType = "Intent" + DLPEntryGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryGetResponsePredefinedEntryVariantTopicType = "Content" ) -func (r DLPEntryGetResponsePredefinedVariantTopicType) IsKnown() bool { +func (r DLPEntryGetResponsePredefinedEntryVariantTopicType) IsKnown() bool { switch r { - case DLPEntryGetResponsePredefinedVariantTopicTypeIntent, DLPEntryGetResponsePredefinedVariantTopicTypeContent: + case DLPEntryGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryGetResponsePredefinedEntryVariantTopicTypeContent: return true } return false } -type DLPEntryGetResponsePredefinedVariantType string +type DLPEntryGetResponsePredefinedEntryVariantType string const ( - DLPEntryGetResponsePredefinedVariantTypePromptTopic DLPEntryGetResponsePredefinedVariantType = "PromptTopic" + DLPEntryGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryGetResponsePredefinedEntryVariantType = "PromptTopic" ) -func (r DLPEntryGetResponsePredefinedVariantType) IsKnown() bool { +func (r DLPEntryGetResponsePredefinedEntryVariantType) IsKnown() bool { switch r { - case DLPEntryGetResponsePredefinedVariantTypePromptTopic: + case DLPEntryGetResponsePredefinedEntryVariantTypePromptTopic: return true } return false } -type DLPEntryGetResponseIntegration struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryGetResponseIntegrationType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryGetResponseIntegrationJSON `json:"-"` +type DLPEntryGetResponseIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryGetResponseIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryGetResponseIntegrationEntryProfile `json:"profiles"` + JSON dlpEntryGetResponseIntegrationEntryJSON `json:"-"` } -// dlpEntryGetResponseIntegrationJSON contains the JSON metadata for the struct -// [DLPEntryGetResponseIntegration] -type dlpEntryGetResponseIntegrationJSON struct { +// dlpEntryGetResponseIntegrationEntryJSON contains the JSON metadata for the +// struct [DLPEntryGetResponseIntegrationEntry] +type dlpEntryGetResponseIntegrationEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1524,51 +1584,77 @@ type dlpEntryGetResponseIntegrationJSON struct { Type apijson.Field UpdatedAt apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseIntegrationJSON) RawJSON() string { +func (r dlpEntryGetResponseIntegrationEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseIntegration) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseIntegrationEntry) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseIntegrationType string +type DLPEntryGetResponseIntegrationEntryType string const ( - DLPEntryGetResponseIntegrationTypeIntegration DLPEntryGetResponseIntegrationType = "integration" + DLPEntryGetResponseIntegrationEntryTypeIntegration DLPEntryGetResponseIntegrationEntryType = "integration" ) -func (r DLPEntryGetResponseIntegrationType) IsKnown() bool { +func (r DLPEntryGetResponseIntegrationEntryType) IsKnown() bool { switch r { - case DLPEntryGetResponseIntegrationTypeIntegration: + case DLPEntryGetResponseIntegrationEntryTypeIntegration: return true } return false } -type DLPEntryGetResponseExactData struct { +// Computed entry field for a profile that an entry is shared into. +type DLPEntryGetResponseIntegrationEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryGetResponseIntegrationEntryProfileJSON `json:"-"` +} + +// dlpEntryGetResponseIntegrationEntryProfileJSON contains the JSON metadata for +// the struct [DLPEntryGetResponseIntegrationEntryProfile] +type dlpEntryGetResponseIntegrationEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryGetResponseIntegrationEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryGetResponseIntegrationEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryGetResponseExactDataEntry struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryGetResponseExactDataType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryGetResponseExactDataJSON `json:"-"` -} - -// dlpEntryGetResponseExactDataJSON contains the JSON metadata for the struct -// [DLPEntryGetResponseExactData] -type dlpEntryGetResponseExactDataJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryGetResponseExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Profiles []DLPEntryGetResponseExactDataEntryProfile `json:"profiles"` + JSON dlpEntryGetResponseExactDataEntryJSON `json:"-"` +} + +// dlpEntryGetResponseExactDataEntryJSON contains the JSON metadata for the struct +// [DLPEntryGetResponseExactDataEntry] +type dlpEntryGetResponseExactDataEntryJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -1577,96 +1663,148 @@ type dlpEntryGetResponseExactDataJSON struct { Secret apijson.Field Type apijson.Field UpdatedAt apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseExactData) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseExactDataJSON) RawJSON() string { +func (r dlpEntryGetResponseExactDataEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseExactData) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseExactDataEntry) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseExactDataType string +type DLPEntryGetResponseExactDataEntryType string const ( - DLPEntryGetResponseExactDataTypeExactData DLPEntryGetResponseExactDataType = "exact_data" + DLPEntryGetResponseExactDataEntryTypeExactData DLPEntryGetResponseExactDataEntryType = "exact_data" ) -func (r DLPEntryGetResponseExactDataType) IsKnown() bool { +func (r DLPEntryGetResponseExactDataEntryType) IsKnown() bool { switch r { - case DLPEntryGetResponseExactDataTypeExactData: + case DLPEntryGetResponseExactDataEntryTypeExactData: return true } return false } -type DLPEntryGetResponseDocumentFingerprint struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryGetResponseDocumentFingerprintType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryGetResponseDocumentFingerprintJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryGetResponseExactDataEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryGetResponseExactDataEntryProfileJSON `json:"-"` } -// dlpEntryGetResponseDocumentFingerprintJSON contains the JSON metadata for the -// struct [DLPEntryGetResponseDocumentFingerprint] -type dlpEntryGetResponseDocumentFingerprintJSON struct { +// dlpEntryGetResponseExactDataEntryProfileJSON contains the JSON metadata for the +// struct [DLPEntryGetResponseExactDataEntryProfile] +type dlpEntryGetResponseExactDataEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryGetResponseExactDataEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryGetResponseExactDataEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryGetResponseDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryGetResponseDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Profiles []DLPEntryGetResponseDocumentFingerprintEntryProfile `json:"profiles"` + JSON dlpEntryGetResponseDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpEntryGetResponseDocumentFingerprintEntryJSON contains the JSON metadata for +// the struct [DLPEntryGetResponseDocumentFingerprintEntry] +type dlpEntryGetResponseDocumentFingerprintEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field Name apijson.Field Type apijson.Field UpdatedAt apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseDocumentFingerprintJSON) RawJSON() string { +func (r dlpEntryGetResponseDocumentFingerprintEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseDocumentFingerprint) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseDocumentFingerprintEntry) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseDocumentFingerprintType string +type DLPEntryGetResponseDocumentFingerprintEntryType string const ( - DLPEntryGetResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryGetResponseDocumentFingerprintType = "document_fingerprint" + DLPEntryGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryGetResponseDocumentFingerprintEntryType = "document_fingerprint" ) -func (r DLPEntryGetResponseDocumentFingerprintType) IsKnown() bool { +func (r DLPEntryGetResponseDocumentFingerprintEntryType) IsKnown() bool { switch r { - case DLPEntryGetResponseDocumentFingerprintTypeDocumentFingerprint: + case DLPEntryGetResponseDocumentFingerprintEntryTypeDocumentFingerprint: return true } return false } -type DLPEntryGetResponseWordList struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryGetResponseWordListType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryGetResponseWordListJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryGetResponseDocumentFingerprintEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryGetResponseDocumentFingerprintEntryProfileJSON `json:"-"` } -// dlpEntryGetResponseWordListJSON contains the JSON metadata for the struct -// [DLPEntryGetResponseWordList] -type dlpEntryGetResponseWordListJSON struct { +// dlpEntryGetResponseDocumentFingerprintEntryProfileJSON contains the JSON +// metadata for the struct [DLPEntryGetResponseDocumentFingerprintEntryProfile] +type dlpEntryGetResponseDocumentFingerprintEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryGetResponseDocumentFingerprintEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryGetResponseDocumentFingerprintEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryGetResponseWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryGetResponseWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryGetResponseWordListEntryProfile `json:"profiles"` + JSON dlpEntryGetResponseWordListEntryJSON `json:"-"` +} + +// dlpEntryGetResponseWordListEntryJSON contains the JSON metadata for the struct +// [DLPEntryGetResponseWordListEntry] +type dlpEntryGetResponseWordListEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1675,34 +1813,59 @@ type dlpEntryGetResponseWordListJSON struct { UpdatedAt apijson.Field WordList apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryGetResponseWordList) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryGetResponseWordListJSON) RawJSON() string { +func (r dlpEntryGetResponseWordListEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryGetResponseWordList) implementsDLPEntryGetResponse() {} +func (r DLPEntryGetResponseWordListEntry) implementsDLPEntryGetResponse() {} -type DLPEntryGetResponseWordListType string +type DLPEntryGetResponseWordListEntryType string const ( - DLPEntryGetResponseWordListTypeWordList DLPEntryGetResponseWordListType = "word_list" + DLPEntryGetResponseWordListEntryTypeWordList DLPEntryGetResponseWordListEntryType = "word_list" ) -func (r DLPEntryGetResponseWordListType) IsKnown() bool { +func (r DLPEntryGetResponseWordListEntryType) IsKnown() bool { switch r { - case DLPEntryGetResponseWordListTypeWordList: + case DLPEntryGetResponseWordListEntryTypeWordList: return true } return false } +// Computed entry field for a profile that an entry is shared into. +type DLPEntryGetResponseWordListEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryGetResponseWordListEntryProfileJSON `json:"-"` +} + +// dlpEntryGetResponseWordListEntryProfileJSON contains the JSON metadata for the +// struct [DLPEntryGetResponseWordListEntryProfile] +type dlpEntryGetResponseWordListEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryGetResponseWordListEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryGetResponseWordListEntryProfileJSON) RawJSON() string { + return r.raw +} + type DLPEntryGetResponseType string const ( diff --git a/zero_trust/dlpentrycustom.go b/zero_trust/dlpentrycustom.go index 6891656994c..9859a9a5f36 100644 --- a/zero_trust/dlpentrycustom.go +++ b/zero_trust/dlpentrycustom.go @@ -737,15 +737,23 @@ type DLPEntryCustomGetResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryCustomGetResponsePredefinedConfidence]. + // [DLPEntryCustomGetResponsePredefinedEntryConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` ProfileID string `json:"profile_id,nullable" format:"uuid"` - Secret bool `json:"secret"` - UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryCustomGetResponsePredefinedVariant]. + // [[]DLPEntryCustomGetResponseCustomEntryProfile], + // [[]DLPEntryCustomGetResponsePredefinedEntryProfile], + // [[]DLPEntryCustomGetResponseIntegrationEntryProfile], + // [[]DLPEntryCustomGetResponseExactDataEntryProfile], + // [[]DLPEntryCustomGetResponseDocumentFingerprintEntryProfile], + // [[]DLPEntryCustomGetResponseWordListEntryProfile]. + Profiles interface{} `json:"profiles"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPEntryCustomGetResponsePredefinedEntryVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -765,6 +773,7 @@ type dlpEntryCustomGetResponseJSON struct { CreatedAt apijson.Field Pattern apijson.Field ProfileID apijson.Field + Profiles apijson.Field Secret apijson.Field UpdatedAt apijson.Field Variant apijson.Field @@ -789,20 +798,22 @@ func (r *DLPEntryCustomGetResponse) UnmarshalJSON(data []byte) (err error) { // AsUnion returns a [DLPEntryCustomGetResponseUnion] interface which you can cast // to the specific types for more type safety. // -// Possible runtime types of the union are [DLPEntryCustomGetResponseCustom], -// [DLPEntryCustomGetResponsePredefined], [DLPEntryCustomGetResponseIntegration], -// [DLPEntryCustomGetResponseExactData], -// [DLPEntryCustomGetResponseDocumentFingerprint], -// [DLPEntryCustomGetResponseWordList]. +// Possible runtime types of the union are [DLPEntryCustomGetResponseCustomEntry], +// [DLPEntryCustomGetResponsePredefinedEntry], +// [DLPEntryCustomGetResponseIntegrationEntry], +// [DLPEntryCustomGetResponseExactDataEntry], +// [DLPEntryCustomGetResponseDocumentFingerprintEntry], +// [DLPEntryCustomGetResponseWordListEntry]. func (r DLPEntryCustomGetResponse) AsUnion() DLPEntryCustomGetResponseUnion { return r.union } -// Union satisfied by [DLPEntryCustomGetResponseCustom], -// [DLPEntryCustomGetResponsePredefined], [DLPEntryCustomGetResponseIntegration], -// [DLPEntryCustomGetResponseExactData], -// [DLPEntryCustomGetResponseDocumentFingerprint] or -// [DLPEntryCustomGetResponseWordList]. +// Union satisfied by [DLPEntryCustomGetResponseCustomEntry], +// [DLPEntryCustomGetResponsePredefinedEntry], +// [DLPEntryCustomGetResponseIntegrationEntry], +// [DLPEntryCustomGetResponseExactDataEntry], +// [DLPEntryCustomGetResponseDocumentFingerprintEntry] or +// [DLPEntryCustomGetResponseWordListEntry]. type DLPEntryCustomGetResponseUnion interface { implementsDLPEntryCustomGetResponse() } @@ -810,55 +821,50 @@ type DLPEntryCustomGetResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryCustomGetResponseUnion)(nil)).Elem(), - "type", + "", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseCustom{}), - DiscriminatorValue: "custom", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseCustomEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponsePredefined{}), - DiscriminatorValue: "predefined", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponsePredefinedEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseIntegration{}), - DiscriminatorValue: "integration", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseIntegrationEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseExactData{}), - DiscriminatorValue: "exact_data", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseExactDataEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseDocumentFingerprint{}), - DiscriminatorValue: "document_fingerprint", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseDocumentFingerprintEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryCustomGetResponseWordList{}), - DiscriminatorValue: "word_list", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryCustomGetResponseWordListEntry{}), }, ) } -type DLPEntryCustomGetResponseCustom struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryCustomGetResponseCustomType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryCustomGetResponseCustomJSON `json:"-"` +type DLPEntryCustomGetResponseCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryCustomGetResponseCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryCustomGetResponseCustomEntryProfile `json:"profiles"` + JSON dlpEntryCustomGetResponseCustomEntryJSON `json:"-"` } -// dlpEntryCustomGetResponseCustomJSON contains the JSON metadata for the struct -// [DLPEntryCustomGetResponseCustom] -type dlpEntryCustomGetResponseCustomJSON struct { +// dlpEntryCustomGetResponseCustomEntryJSON contains the JSON metadata for the +// struct [DLPEntryCustomGetResponseCustomEntry] +type dlpEntryCustomGetResponseCustomEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -867,119 +873,170 @@ type dlpEntryCustomGetResponseCustomJSON struct { Type apijson.Field UpdatedAt apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseCustom) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseCustomJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseCustomEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseCustom) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseCustomEntry) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseCustomType string +type DLPEntryCustomGetResponseCustomEntryType string const ( - DLPEntryCustomGetResponseCustomTypeCustom DLPEntryCustomGetResponseCustomType = "custom" + DLPEntryCustomGetResponseCustomEntryTypeCustom DLPEntryCustomGetResponseCustomEntryType = "custom" ) -func (r DLPEntryCustomGetResponseCustomType) IsKnown() bool { +func (r DLPEntryCustomGetResponseCustomEntryType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseCustomTypeCustom: + case DLPEntryCustomGetResponseCustomEntryTypeCustom: return true } return false } -type DLPEntryCustomGetResponsePredefined struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryCustomGetResponsePredefinedConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomGetResponsePredefinedType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryCustomGetResponsePredefinedVariant `json:"variant"` - JSON dlpEntryCustomGetResponsePredefinedJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryCustomGetResponseCustomEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryCustomGetResponseCustomEntryProfileJSON `json:"-"` +} + +// dlpEntryCustomGetResponseCustomEntryProfileJSON contains the JSON metadata for +// the struct [DLPEntryCustomGetResponseCustomEntryProfile] +type dlpEntryCustomGetResponseCustomEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryCustomGetResponseCustomEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryCustomGetResponseCustomEntryProfileJSON) RawJSON() string { + return r.raw } -// dlpEntryCustomGetResponsePredefinedJSON contains the JSON metadata for the -// struct [DLPEntryCustomGetResponsePredefined] -type dlpEntryCustomGetResponsePredefinedJSON struct { +type DLPEntryCustomGetResponsePredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryCustomGetResponsePredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomGetResponsePredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryCustomGetResponsePredefinedEntryProfile `json:"profiles"` + Variant DLPEntryCustomGetResponsePredefinedEntryVariant `json:"variant"` + JSON dlpEntryCustomGetResponsePredefinedEntryJSON `json:"-"` +} + +// dlpEntryCustomGetResponsePredefinedEntryJSON contains the JSON metadata for the +// struct [DLPEntryCustomGetResponsePredefinedEntry] +type dlpEntryCustomGetResponsePredefinedEntryJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field Name apijson.Field Type apijson.Field ProfileID apijson.Field + Profiles apijson.Field Variant apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponsePredefinedJSON) RawJSON() string { +func (r dlpEntryCustomGetResponsePredefinedEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponsePredefined) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponsePredefinedEntry) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponsePredefinedConfidence struct { +type DLPEntryCustomGetResponsePredefinedEntryConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryCustomGetResponsePredefinedConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON `json:"-"` } -// dlpEntryCustomGetResponsePredefinedConfidenceJSON contains the JSON metadata for -// the struct [DLPEntryCustomGetResponsePredefinedConfidence] -type dlpEntryCustomGetResponsePredefinedConfidenceJSON struct { +// dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON contains the JSON +// metadata for the struct [DLPEntryCustomGetResponsePredefinedEntryConfidence] +type dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponsePredefinedConfidenceJSON) RawJSON() string { +func (r dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryCustomGetResponsePredefinedType string +type DLPEntryCustomGetResponsePredefinedEntryType string const ( - DLPEntryCustomGetResponsePredefinedTypePredefined DLPEntryCustomGetResponsePredefinedType = "predefined" + DLPEntryCustomGetResponsePredefinedEntryTypePredefined DLPEntryCustomGetResponsePredefinedEntryType = "predefined" ) -func (r DLPEntryCustomGetResponsePredefinedType) IsKnown() bool { +func (r DLPEntryCustomGetResponsePredefinedEntryType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponsePredefinedTypePredefined: + case DLPEntryCustomGetResponsePredefinedEntryTypePredefined: return true } return false } -type DLPEntryCustomGetResponsePredefinedVariant struct { - TopicType DLPEntryCustomGetResponsePredefinedVariantTopicType `json:"topic_type,required"` - Type DLPEntryCustomGetResponsePredefinedVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryCustomGetResponsePredefinedVariantJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryCustomGetResponsePredefinedEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryCustomGetResponsePredefinedEntryProfileJSON `json:"-"` } -// dlpEntryCustomGetResponsePredefinedVariantJSON contains the JSON metadata for -// the struct [DLPEntryCustomGetResponsePredefinedVariant] -type dlpEntryCustomGetResponsePredefinedVariantJSON struct { +// dlpEntryCustomGetResponsePredefinedEntryProfileJSON contains the JSON metadata +// for the struct [DLPEntryCustomGetResponsePredefinedEntryProfile] +type dlpEntryCustomGetResponsePredefinedEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryCustomGetResponsePredefinedEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryCustomGetResponsePredefinedEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryCustomGetResponsePredefinedEntryVariant struct { + TopicType DLPEntryCustomGetResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPEntryCustomGetResponsePredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryCustomGetResponsePredefinedEntryVariantJSON `json:"-"` +} + +// dlpEntryCustomGetResponsePredefinedEntryVariantJSON contains the JSON metadata +// for the struct [DLPEntryCustomGetResponsePredefinedEntryVariant] +type dlpEntryCustomGetResponsePredefinedEntryVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -987,57 +1044,58 @@ type dlpEntryCustomGetResponsePredefinedVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponsePredefinedVariantJSON) RawJSON() string { +func (r dlpEntryCustomGetResponsePredefinedEntryVariantJSON) RawJSON() string { return r.raw } -type DLPEntryCustomGetResponsePredefinedVariantTopicType string +type DLPEntryCustomGetResponsePredefinedEntryVariantTopicType string const ( - DLPEntryCustomGetResponsePredefinedVariantTopicTypeIntent DLPEntryCustomGetResponsePredefinedVariantTopicType = "Intent" - DLPEntryCustomGetResponsePredefinedVariantTopicTypeContent DLPEntryCustomGetResponsePredefinedVariantTopicType = "Content" + DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryCustomGetResponsePredefinedEntryVariantTopicType = "Intent" + DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryCustomGetResponsePredefinedEntryVariantTopicType = "Content" ) -func (r DLPEntryCustomGetResponsePredefinedVariantTopicType) IsKnown() bool { +func (r DLPEntryCustomGetResponsePredefinedEntryVariantTopicType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponsePredefinedVariantTopicTypeIntent, DLPEntryCustomGetResponsePredefinedVariantTopicTypeContent: + case DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeContent: return true } return false } -type DLPEntryCustomGetResponsePredefinedVariantType string +type DLPEntryCustomGetResponsePredefinedEntryVariantType string const ( - DLPEntryCustomGetResponsePredefinedVariantTypePromptTopic DLPEntryCustomGetResponsePredefinedVariantType = "PromptTopic" + DLPEntryCustomGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryCustomGetResponsePredefinedEntryVariantType = "PromptTopic" ) -func (r DLPEntryCustomGetResponsePredefinedVariantType) IsKnown() bool { +func (r DLPEntryCustomGetResponsePredefinedEntryVariantType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponsePredefinedVariantTypePromptTopic: + case DLPEntryCustomGetResponsePredefinedEntryVariantTypePromptTopic: return true } return false } -type DLPEntryCustomGetResponseIntegration struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomGetResponseIntegrationType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryCustomGetResponseIntegrationJSON `json:"-"` +type DLPEntryCustomGetResponseIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomGetResponseIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryCustomGetResponseIntegrationEntryProfile `json:"profiles"` + JSON dlpEntryCustomGetResponseIntegrationEntryJSON `json:"-"` } -// dlpEntryCustomGetResponseIntegrationJSON contains the JSON metadata for the -// struct [DLPEntryCustomGetResponseIntegration] -type dlpEntryCustomGetResponseIntegrationJSON struct { +// dlpEntryCustomGetResponseIntegrationEntryJSON contains the JSON metadata for the +// struct [DLPEntryCustomGetResponseIntegrationEntry] +type dlpEntryCustomGetResponseIntegrationEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1045,51 +1103,77 @@ type dlpEntryCustomGetResponseIntegrationJSON struct { Type apijson.Field UpdatedAt apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseIntegrationJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseIntegrationEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseIntegration) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseIntegrationEntry) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseIntegrationType string +type DLPEntryCustomGetResponseIntegrationEntryType string const ( - DLPEntryCustomGetResponseIntegrationTypeIntegration DLPEntryCustomGetResponseIntegrationType = "integration" + DLPEntryCustomGetResponseIntegrationEntryTypeIntegration DLPEntryCustomGetResponseIntegrationEntryType = "integration" ) -func (r DLPEntryCustomGetResponseIntegrationType) IsKnown() bool { +func (r DLPEntryCustomGetResponseIntegrationEntryType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseIntegrationTypeIntegration: + case DLPEntryCustomGetResponseIntegrationEntryTypeIntegration: return true } return false } -type DLPEntryCustomGetResponseExactData struct { +// Computed entry field for a profile that an entry is shared into. +type DLPEntryCustomGetResponseIntegrationEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryCustomGetResponseIntegrationEntryProfileJSON `json:"-"` +} + +// dlpEntryCustomGetResponseIntegrationEntryProfileJSON contains the JSON metadata +// for the struct [DLPEntryCustomGetResponseIntegrationEntryProfile] +type dlpEntryCustomGetResponseIntegrationEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryCustomGetResponseIntegrationEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryCustomGetResponseIntegrationEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryCustomGetResponseExactDataEntry struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryCustomGetResponseExactDataType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryCustomGetResponseExactDataJSON `json:"-"` -} - -// dlpEntryCustomGetResponseExactDataJSON contains the JSON metadata for the struct -// [DLPEntryCustomGetResponseExactData] -type dlpEntryCustomGetResponseExactDataJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryCustomGetResponseExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Profiles []DLPEntryCustomGetResponseExactDataEntryProfile `json:"profiles"` + JSON dlpEntryCustomGetResponseExactDataEntryJSON `json:"-"` +} + +// dlpEntryCustomGetResponseExactDataEntryJSON contains the JSON metadata for the +// struct [DLPEntryCustomGetResponseExactDataEntry] +type dlpEntryCustomGetResponseExactDataEntryJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -1098,96 +1182,149 @@ type dlpEntryCustomGetResponseExactDataJSON struct { Secret apijson.Field Type apijson.Field UpdatedAt apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseExactData) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseExactDataJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseExactDataEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseExactData) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseExactDataEntry) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseExactDataType string +type DLPEntryCustomGetResponseExactDataEntryType string const ( - DLPEntryCustomGetResponseExactDataTypeExactData DLPEntryCustomGetResponseExactDataType = "exact_data" + DLPEntryCustomGetResponseExactDataEntryTypeExactData DLPEntryCustomGetResponseExactDataEntryType = "exact_data" ) -func (r DLPEntryCustomGetResponseExactDataType) IsKnown() bool { +func (r DLPEntryCustomGetResponseExactDataEntryType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseExactDataTypeExactData: + case DLPEntryCustomGetResponseExactDataEntryTypeExactData: return true } return false } -type DLPEntryCustomGetResponseDocumentFingerprint struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomGetResponseDocumentFingerprintType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryCustomGetResponseDocumentFingerprintJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryCustomGetResponseExactDataEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryCustomGetResponseExactDataEntryProfileJSON `json:"-"` } -// dlpEntryCustomGetResponseDocumentFingerprintJSON contains the JSON metadata for -// the struct [DLPEntryCustomGetResponseDocumentFingerprint] -type dlpEntryCustomGetResponseDocumentFingerprintJSON struct { +// dlpEntryCustomGetResponseExactDataEntryProfileJSON contains the JSON metadata +// for the struct [DLPEntryCustomGetResponseExactDataEntryProfile] +type dlpEntryCustomGetResponseExactDataEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryCustomGetResponseExactDataEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryCustomGetResponseExactDataEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryCustomGetResponseDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomGetResponseDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Profiles []DLPEntryCustomGetResponseDocumentFingerprintEntryProfile `json:"profiles"` + JSON dlpEntryCustomGetResponseDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpEntryCustomGetResponseDocumentFingerprintEntryJSON contains the JSON metadata +// for the struct [DLPEntryCustomGetResponseDocumentFingerprintEntry] +type dlpEntryCustomGetResponseDocumentFingerprintEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field Name apijson.Field Type apijson.Field UpdatedAt apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseDocumentFingerprintJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseDocumentFingerprintEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseDocumentFingerprint) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseDocumentFingerprintEntry) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseDocumentFingerprintType string +type DLPEntryCustomGetResponseDocumentFingerprintEntryType string const ( - DLPEntryCustomGetResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryCustomGetResponseDocumentFingerprintType = "document_fingerprint" + DLPEntryCustomGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryCustomGetResponseDocumentFingerprintEntryType = "document_fingerprint" ) -func (r DLPEntryCustomGetResponseDocumentFingerprintType) IsKnown() bool { +func (r DLPEntryCustomGetResponseDocumentFingerprintEntryType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseDocumentFingerprintTypeDocumentFingerprint: + case DLPEntryCustomGetResponseDocumentFingerprintEntryTypeDocumentFingerprint: return true } return false } -type DLPEntryCustomGetResponseWordList struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryCustomGetResponseWordListType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryCustomGetResponseWordListJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryCustomGetResponseDocumentFingerprintEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryCustomGetResponseDocumentFingerprintEntryProfileJSON `json:"-"` +} + +// dlpEntryCustomGetResponseDocumentFingerprintEntryProfileJSON contains the JSON +// metadata for the struct +// [DLPEntryCustomGetResponseDocumentFingerprintEntryProfile] +type dlpEntryCustomGetResponseDocumentFingerprintEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryCustomGetResponseDocumentFingerprintEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -// dlpEntryCustomGetResponseWordListJSON contains the JSON metadata for the struct -// [DLPEntryCustomGetResponseWordList] -type dlpEntryCustomGetResponseWordListJSON struct { +func (r dlpEntryCustomGetResponseDocumentFingerprintEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryCustomGetResponseWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryCustomGetResponseWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryCustomGetResponseWordListEntryProfile `json:"profiles"` + JSON dlpEntryCustomGetResponseWordListEntryJSON `json:"-"` +} + +// dlpEntryCustomGetResponseWordListEntryJSON contains the JSON metadata for the +// struct [DLPEntryCustomGetResponseWordListEntry] +type dlpEntryCustomGetResponseWordListEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1196,34 +1333,59 @@ type dlpEntryCustomGetResponseWordListJSON struct { UpdatedAt apijson.Field WordList apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryCustomGetResponseWordList) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryCustomGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryCustomGetResponseWordListJSON) RawJSON() string { +func (r dlpEntryCustomGetResponseWordListEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryCustomGetResponseWordList) implementsDLPEntryCustomGetResponse() {} +func (r DLPEntryCustomGetResponseWordListEntry) implementsDLPEntryCustomGetResponse() {} -type DLPEntryCustomGetResponseWordListType string +type DLPEntryCustomGetResponseWordListEntryType string const ( - DLPEntryCustomGetResponseWordListTypeWordList DLPEntryCustomGetResponseWordListType = "word_list" + DLPEntryCustomGetResponseWordListEntryTypeWordList DLPEntryCustomGetResponseWordListEntryType = "word_list" ) -func (r DLPEntryCustomGetResponseWordListType) IsKnown() bool { +func (r DLPEntryCustomGetResponseWordListEntryType) IsKnown() bool { switch r { - case DLPEntryCustomGetResponseWordListTypeWordList: + case DLPEntryCustomGetResponseWordListEntryTypeWordList: return true } return false } +// Computed entry field for a profile that an entry is shared into. +type DLPEntryCustomGetResponseWordListEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryCustomGetResponseWordListEntryProfileJSON `json:"-"` +} + +// dlpEntryCustomGetResponseWordListEntryProfileJSON contains the JSON metadata for +// the struct [DLPEntryCustomGetResponseWordListEntryProfile] +type dlpEntryCustomGetResponseWordListEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryCustomGetResponseWordListEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryCustomGetResponseWordListEntryProfileJSON) RawJSON() string { + return r.raw +} + type DLPEntryCustomGetResponseType string const ( diff --git a/zero_trust/dlpentryintegration.go b/zero_trust/dlpentryintegration.go index bd6f5e19cab..097871193ba 100644 --- a/zero_trust/dlpentryintegration.go +++ b/zero_trust/dlpentryintegration.go @@ -738,15 +738,23 @@ type DLPEntryIntegrationGetResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryIntegrationGetResponsePredefinedConfidence]. + // [DLPEntryIntegrationGetResponsePredefinedEntryConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` ProfileID string `json:"profile_id,nullable" format:"uuid"` - Secret bool `json:"secret"` - UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryIntegrationGetResponsePredefinedVariant]. + // [[]DLPEntryIntegrationGetResponseCustomEntryProfile], + // [[]DLPEntryIntegrationGetResponsePredefinedEntryProfile], + // [[]DLPEntryIntegrationGetResponseIntegrationEntryProfile], + // [[]DLPEntryIntegrationGetResponseExactDataEntryProfile], + // [[]DLPEntryIntegrationGetResponseDocumentFingerprintEntryProfile], + // [[]DLPEntryIntegrationGetResponseWordListEntryProfile]. + Profiles interface{} `json:"profiles"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPEntryIntegrationGetResponsePredefinedEntryVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -766,6 +774,7 @@ type dlpEntryIntegrationGetResponseJSON struct { CreatedAt apijson.Field Pattern apijson.Field ProfileID apijson.Field + Profiles apijson.Field Secret apijson.Field UpdatedAt apijson.Field Variant apijson.Field @@ -790,22 +799,23 @@ func (r *DLPEntryIntegrationGetResponse) UnmarshalJSON(data []byte) (err error) // AsUnion returns a [DLPEntryIntegrationGetResponseUnion] interface which you can // cast to the specific types for more type safety. // -// Possible runtime types of the union are [DLPEntryIntegrationGetResponseCustom], -// [DLPEntryIntegrationGetResponsePredefined], -// [DLPEntryIntegrationGetResponseIntegration], -// [DLPEntryIntegrationGetResponseExactData], -// [DLPEntryIntegrationGetResponseDocumentFingerprint], -// [DLPEntryIntegrationGetResponseWordList]. +// Possible runtime types of the union are +// [DLPEntryIntegrationGetResponseCustomEntry], +// [DLPEntryIntegrationGetResponsePredefinedEntry], +// [DLPEntryIntegrationGetResponseIntegrationEntry], +// [DLPEntryIntegrationGetResponseExactDataEntry], +// [DLPEntryIntegrationGetResponseDocumentFingerprintEntry], +// [DLPEntryIntegrationGetResponseWordListEntry]. func (r DLPEntryIntegrationGetResponse) AsUnion() DLPEntryIntegrationGetResponseUnion { return r.union } -// Union satisfied by [DLPEntryIntegrationGetResponseCustom], -// [DLPEntryIntegrationGetResponsePredefined], -// [DLPEntryIntegrationGetResponseIntegration], -// [DLPEntryIntegrationGetResponseExactData], -// [DLPEntryIntegrationGetResponseDocumentFingerprint] or -// [DLPEntryIntegrationGetResponseWordList]. +// Union satisfied by [DLPEntryIntegrationGetResponseCustomEntry], +// [DLPEntryIntegrationGetResponsePredefinedEntry], +// [DLPEntryIntegrationGetResponseIntegrationEntry], +// [DLPEntryIntegrationGetResponseExactDataEntry], +// [DLPEntryIntegrationGetResponseDocumentFingerprintEntry] or +// [DLPEntryIntegrationGetResponseWordListEntry]. type DLPEntryIntegrationGetResponseUnion interface { implementsDLPEntryIntegrationGetResponse() } @@ -813,55 +823,50 @@ type DLPEntryIntegrationGetResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryIntegrationGetResponseUnion)(nil)).Elem(), - "type", + "", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseCustom{}), - DiscriminatorValue: "custom", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseCustomEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponsePredefined{}), - DiscriminatorValue: "predefined", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponsePredefinedEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseIntegration{}), - DiscriminatorValue: "integration", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseIntegrationEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseExactData{}), - DiscriminatorValue: "exact_data", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseExactDataEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseDocumentFingerprint{}), - DiscriminatorValue: "document_fingerprint", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseDocumentFingerprintEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryIntegrationGetResponseWordList{}), - DiscriminatorValue: "word_list", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryIntegrationGetResponseWordListEntry{}), }, ) } -type DLPEntryIntegrationGetResponseCustom struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryIntegrationGetResponseCustomType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryIntegrationGetResponseCustomJSON `json:"-"` +type DLPEntryIntegrationGetResponseCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryIntegrationGetResponseCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryIntegrationGetResponseCustomEntryProfile `json:"profiles"` + JSON dlpEntryIntegrationGetResponseCustomEntryJSON `json:"-"` } -// dlpEntryIntegrationGetResponseCustomJSON contains the JSON metadata for the -// struct [DLPEntryIntegrationGetResponseCustom] -type dlpEntryIntegrationGetResponseCustomJSON struct { +// dlpEntryIntegrationGetResponseCustomEntryJSON contains the JSON metadata for the +// struct [DLPEntryIntegrationGetResponseCustomEntry] +type dlpEntryIntegrationGetResponseCustomEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -870,119 +875,171 @@ type dlpEntryIntegrationGetResponseCustomJSON struct { Type apijson.Field UpdatedAt apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseCustom) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseCustomJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseCustomEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseCustom) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponseCustomEntry) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponseCustomType string +type DLPEntryIntegrationGetResponseCustomEntryType string const ( - DLPEntryIntegrationGetResponseCustomTypeCustom DLPEntryIntegrationGetResponseCustomType = "custom" + DLPEntryIntegrationGetResponseCustomEntryTypeCustom DLPEntryIntegrationGetResponseCustomEntryType = "custom" ) -func (r DLPEntryIntegrationGetResponseCustomType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseCustomEntryType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseCustomTypeCustom: + case DLPEntryIntegrationGetResponseCustomEntryTypeCustom: return true } return false } -type DLPEntryIntegrationGetResponsePredefined struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryIntegrationGetResponsePredefinedConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationGetResponsePredefinedType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryIntegrationGetResponsePredefinedVariant `json:"variant"` - JSON dlpEntryIntegrationGetResponsePredefinedJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryIntegrationGetResponseCustomEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryIntegrationGetResponseCustomEntryProfileJSON `json:"-"` } -// dlpEntryIntegrationGetResponsePredefinedJSON contains the JSON metadata for the -// struct [DLPEntryIntegrationGetResponsePredefined] -type dlpEntryIntegrationGetResponsePredefinedJSON struct { +// dlpEntryIntegrationGetResponseCustomEntryProfileJSON contains the JSON metadata +// for the struct [DLPEntryIntegrationGetResponseCustomEntryProfile] +type dlpEntryIntegrationGetResponseCustomEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryIntegrationGetResponseCustomEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryIntegrationGetResponseCustomEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryIntegrationGetResponsePredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryIntegrationGetResponsePredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationGetResponsePredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryIntegrationGetResponsePredefinedEntryProfile `json:"profiles"` + Variant DLPEntryIntegrationGetResponsePredefinedEntryVariant `json:"variant"` + JSON dlpEntryIntegrationGetResponsePredefinedEntryJSON `json:"-"` +} + +// dlpEntryIntegrationGetResponsePredefinedEntryJSON contains the JSON metadata for +// the struct [DLPEntryIntegrationGetResponsePredefinedEntry] +type dlpEntryIntegrationGetResponsePredefinedEntryJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field Name apijson.Field Type apijson.Field ProfileID apijson.Field + Profiles apijson.Field Variant apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponsePredefinedJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponsePredefinedEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponsePredefined) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponsePredefinedEntry) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponsePredefinedConfidence struct { +type DLPEntryIntegrationGetResponsePredefinedEntryConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryIntegrationGetResponsePredefinedConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON `json:"-"` } -// dlpEntryIntegrationGetResponsePredefinedConfidenceJSON contains the JSON -// metadata for the struct [DLPEntryIntegrationGetResponsePredefinedConfidence] -type dlpEntryIntegrationGetResponsePredefinedConfidenceJSON struct { +// dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON contains the JSON +// metadata for the struct +// [DLPEntryIntegrationGetResponsePredefinedEntryConfidence] +type dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponsePredefinedConfidenceJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryIntegrationGetResponsePredefinedType string +type DLPEntryIntegrationGetResponsePredefinedEntryType string const ( - DLPEntryIntegrationGetResponsePredefinedTypePredefined DLPEntryIntegrationGetResponsePredefinedType = "predefined" + DLPEntryIntegrationGetResponsePredefinedEntryTypePredefined DLPEntryIntegrationGetResponsePredefinedEntryType = "predefined" ) -func (r DLPEntryIntegrationGetResponsePredefinedType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponsePredefinedEntryType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponsePredefinedTypePredefined: + case DLPEntryIntegrationGetResponsePredefinedEntryTypePredefined: return true } return false } -type DLPEntryIntegrationGetResponsePredefinedVariant struct { - TopicType DLPEntryIntegrationGetResponsePredefinedVariantTopicType `json:"topic_type,required"` - Type DLPEntryIntegrationGetResponsePredefinedVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryIntegrationGetResponsePredefinedVariantJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryIntegrationGetResponsePredefinedEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryIntegrationGetResponsePredefinedEntryProfileJSON `json:"-"` } -// dlpEntryIntegrationGetResponsePredefinedVariantJSON contains the JSON metadata -// for the struct [DLPEntryIntegrationGetResponsePredefinedVariant] -type dlpEntryIntegrationGetResponsePredefinedVariantJSON struct { +// dlpEntryIntegrationGetResponsePredefinedEntryProfileJSON contains the JSON +// metadata for the struct [DLPEntryIntegrationGetResponsePredefinedEntryProfile] +type dlpEntryIntegrationGetResponsePredefinedEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryIntegrationGetResponsePredefinedEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryIntegrationGetResponsePredefinedEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryIntegrationGetResponsePredefinedEntryVariant struct { + TopicType DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPEntryIntegrationGetResponsePredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON `json:"-"` +} + +// dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON contains the JSON +// metadata for the struct [DLPEntryIntegrationGetResponsePredefinedEntryVariant] +type dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -990,57 +1047,58 @@ type dlpEntryIntegrationGetResponsePredefinedVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponsePredefinedVariantJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON) RawJSON() string { return r.raw } -type DLPEntryIntegrationGetResponsePredefinedVariantTopicType string +type DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType string const ( - DLPEntryIntegrationGetResponsePredefinedVariantTopicTypeIntent DLPEntryIntegrationGetResponsePredefinedVariantTopicType = "Intent" - DLPEntryIntegrationGetResponsePredefinedVariantTopicTypeContent DLPEntryIntegrationGetResponsePredefinedVariantTopicType = "Content" + DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType = "Intent" + DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType = "Content" ) -func (r DLPEntryIntegrationGetResponsePredefinedVariantTopicType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponsePredefinedVariantTopicTypeIntent, DLPEntryIntegrationGetResponsePredefinedVariantTopicTypeContent: + case DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeContent: return true } return false } -type DLPEntryIntegrationGetResponsePredefinedVariantType string +type DLPEntryIntegrationGetResponsePredefinedEntryVariantType string const ( - DLPEntryIntegrationGetResponsePredefinedVariantTypePromptTopic DLPEntryIntegrationGetResponsePredefinedVariantType = "PromptTopic" + DLPEntryIntegrationGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryIntegrationGetResponsePredefinedEntryVariantType = "PromptTopic" ) -func (r DLPEntryIntegrationGetResponsePredefinedVariantType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponsePredefinedEntryVariantType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponsePredefinedVariantTypePromptTopic: + case DLPEntryIntegrationGetResponsePredefinedEntryVariantTypePromptTopic: return true } return false } -type DLPEntryIntegrationGetResponseIntegration struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationGetResponseIntegrationType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryIntegrationGetResponseIntegrationJSON `json:"-"` +type DLPEntryIntegrationGetResponseIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationGetResponseIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryIntegrationGetResponseIntegrationEntryProfile `json:"profiles"` + JSON dlpEntryIntegrationGetResponseIntegrationEntryJSON `json:"-"` } -// dlpEntryIntegrationGetResponseIntegrationJSON contains the JSON metadata for the -// struct [DLPEntryIntegrationGetResponseIntegration] -type dlpEntryIntegrationGetResponseIntegrationJSON struct { +// dlpEntryIntegrationGetResponseIntegrationEntryJSON contains the JSON metadata +// for the struct [DLPEntryIntegrationGetResponseIntegrationEntry] +type dlpEntryIntegrationGetResponseIntegrationEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1048,51 +1106,77 @@ type dlpEntryIntegrationGetResponseIntegrationJSON struct { Type apijson.Field UpdatedAt apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseIntegrationJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseIntegrationEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseIntegration) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponseIntegrationEntry) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponseIntegrationType string +type DLPEntryIntegrationGetResponseIntegrationEntryType string const ( - DLPEntryIntegrationGetResponseIntegrationTypeIntegration DLPEntryIntegrationGetResponseIntegrationType = "integration" + DLPEntryIntegrationGetResponseIntegrationEntryTypeIntegration DLPEntryIntegrationGetResponseIntegrationEntryType = "integration" ) -func (r DLPEntryIntegrationGetResponseIntegrationType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseIntegrationEntryType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseIntegrationTypeIntegration: + case DLPEntryIntegrationGetResponseIntegrationEntryTypeIntegration: return true } return false } -type DLPEntryIntegrationGetResponseExactData struct { +// Computed entry field for a profile that an entry is shared into. +type DLPEntryIntegrationGetResponseIntegrationEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryIntegrationGetResponseIntegrationEntryProfileJSON `json:"-"` +} + +// dlpEntryIntegrationGetResponseIntegrationEntryProfileJSON contains the JSON +// metadata for the struct [DLPEntryIntegrationGetResponseIntegrationEntryProfile] +type dlpEntryIntegrationGetResponseIntegrationEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryIntegrationGetResponseIntegrationEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryIntegrationGetResponseIntegrationEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryIntegrationGetResponseExactDataEntry struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryIntegrationGetResponseExactDataType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryIntegrationGetResponseExactDataJSON `json:"-"` -} - -// dlpEntryIntegrationGetResponseExactDataJSON contains the JSON metadata for the -// struct [DLPEntryIntegrationGetResponseExactData] -type dlpEntryIntegrationGetResponseExactDataJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryIntegrationGetResponseExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Profiles []DLPEntryIntegrationGetResponseExactDataEntryProfile `json:"profiles"` + JSON dlpEntryIntegrationGetResponseExactDataEntryJSON `json:"-"` +} + +// dlpEntryIntegrationGetResponseExactDataEntryJSON contains the JSON metadata for +// the struct [DLPEntryIntegrationGetResponseExactDataEntry] +type dlpEntryIntegrationGetResponseExactDataEntryJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -1101,97 +1185,150 @@ type dlpEntryIntegrationGetResponseExactDataJSON struct { Secret apijson.Field Type apijson.Field UpdatedAt apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseExactData) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseExactDataJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseExactDataEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseExactData) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponseExactDataEntry) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponseExactDataType string +type DLPEntryIntegrationGetResponseExactDataEntryType string const ( - DLPEntryIntegrationGetResponseExactDataTypeExactData DLPEntryIntegrationGetResponseExactDataType = "exact_data" + DLPEntryIntegrationGetResponseExactDataEntryTypeExactData DLPEntryIntegrationGetResponseExactDataEntryType = "exact_data" ) -func (r DLPEntryIntegrationGetResponseExactDataType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseExactDataEntryType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseExactDataTypeExactData: + case DLPEntryIntegrationGetResponseExactDataEntryTypeExactData: return true } return false } -type DLPEntryIntegrationGetResponseDocumentFingerprint struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationGetResponseDocumentFingerprintType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryIntegrationGetResponseDocumentFingerprintJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryIntegrationGetResponseExactDataEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryIntegrationGetResponseExactDataEntryProfileJSON `json:"-"` } -// dlpEntryIntegrationGetResponseDocumentFingerprintJSON contains the JSON metadata -// for the struct [DLPEntryIntegrationGetResponseDocumentFingerprint] -type dlpEntryIntegrationGetResponseDocumentFingerprintJSON struct { +// dlpEntryIntegrationGetResponseExactDataEntryProfileJSON contains the JSON +// metadata for the struct [DLPEntryIntegrationGetResponseExactDataEntryProfile] +type dlpEntryIntegrationGetResponseExactDataEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryIntegrationGetResponseExactDataEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryIntegrationGetResponseExactDataEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryIntegrationGetResponseDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationGetResponseDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Profiles []DLPEntryIntegrationGetResponseDocumentFingerprintEntryProfile `json:"profiles"` + JSON dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON contains the JSON +// metadata for the struct [DLPEntryIntegrationGetResponseDocumentFingerprintEntry] +type dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field Name apijson.Field Type apijson.Field UpdatedAt apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseDocumentFingerprintJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseDocumentFingerprint) implementsDLPEntryIntegrationGetResponse() { +func (r DLPEntryIntegrationGetResponseDocumentFingerprintEntry) implementsDLPEntryIntegrationGetResponse() { } -type DLPEntryIntegrationGetResponseDocumentFingerprintType string +type DLPEntryIntegrationGetResponseDocumentFingerprintEntryType string const ( - DLPEntryIntegrationGetResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryIntegrationGetResponseDocumentFingerprintType = "document_fingerprint" + DLPEntryIntegrationGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryIntegrationGetResponseDocumentFingerprintEntryType = "document_fingerprint" ) -func (r DLPEntryIntegrationGetResponseDocumentFingerprintType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseDocumentFingerprintEntryType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseDocumentFingerprintTypeDocumentFingerprint: + case DLPEntryIntegrationGetResponseDocumentFingerprintEntryTypeDocumentFingerprint: return true } return false } -type DLPEntryIntegrationGetResponseWordList struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryIntegrationGetResponseWordListType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryIntegrationGetResponseWordListJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryIntegrationGetResponseDocumentFingerprintEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryIntegrationGetResponseDocumentFingerprintEntryProfileJSON `json:"-"` +} + +// dlpEntryIntegrationGetResponseDocumentFingerprintEntryProfileJSON contains the +// JSON metadata for the struct +// [DLPEntryIntegrationGetResponseDocumentFingerprintEntryProfile] +type dlpEntryIntegrationGetResponseDocumentFingerprintEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryIntegrationGetResponseDocumentFingerprintEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -// dlpEntryIntegrationGetResponseWordListJSON contains the JSON metadata for the -// struct [DLPEntryIntegrationGetResponseWordList] -type dlpEntryIntegrationGetResponseWordListJSON struct { +func (r dlpEntryIntegrationGetResponseDocumentFingerprintEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryIntegrationGetResponseWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryIntegrationGetResponseWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryIntegrationGetResponseWordListEntryProfile `json:"profiles"` + JSON dlpEntryIntegrationGetResponseWordListEntryJSON `json:"-"` +} + +// dlpEntryIntegrationGetResponseWordListEntryJSON contains the JSON metadata for +// the struct [DLPEntryIntegrationGetResponseWordListEntry] +type dlpEntryIntegrationGetResponseWordListEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1200,34 +1337,59 @@ type dlpEntryIntegrationGetResponseWordListJSON struct { UpdatedAt apijson.Field WordList apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryIntegrationGetResponseWordList) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryIntegrationGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryIntegrationGetResponseWordListJSON) RawJSON() string { +func (r dlpEntryIntegrationGetResponseWordListEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryIntegrationGetResponseWordList) implementsDLPEntryIntegrationGetResponse() {} +func (r DLPEntryIntegrationGetResponseWordListEntry) implementsDLPEntryIntegrationGetResponse() {} -type DLPEntryIntegrationGetResponseWordListType string +type DLPEntryIntegrationGetResponseWordListEntryType string const ( - DLPEntryIntegrationGetResponseWordListTypeWordList DLPEntryIntegrationGetResponseWordListType = "word_list" + DLPEntryIntegrationGetResponseWordListEntryTypeWordList DLPEntryIntegrationGetResponseWordListEntryType = "word_list" ) -func (r DLPEntryIntegrationGetResponseWordListType) IsKnown() bool { +func (r DLPEntryIntegrationGetResponseWordListEntryType) IsKnown() bool { switch r { - case DLPEntryIntegrationGetResponseWordListTypeWordList: + case DLPEntryIntegrationGetResponseWordListEntryTypeWordList: return true } return false } +// Computed entry field for a profile that an entry is shared into. +type DLPEntryIntegrationGetResponseWordListEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryIntegrationGetResponseWordListEntryProfileJSON `json:"-"` +} + +// dlpEntryIntegrationGetResponseWordListEntryProfileJSON contains the JSON +// metadata for the struct [DLPEntryIntegrationGetResponseWordListEntryProfile] +type dlpEntryIntegrationGetResponseWordListEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryIntegrationGetResponseWordListEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryIntegrationGetResponseWordListEntryProfileJSON) RawJSON() string { + return r.raw +} + type DLPEntryIntegrationGetResponseType string const ( diff --git a/zero_trust/dlpentrypredefined.go b/zero_trust/dlpentrypredefined.go index b994f804864..6057c9ee929 100644 --- a/zero_trust/dlpentrypredefined.go +++ b/zero_trust/dlpentrypredefined.go @@ -898,15 +898,23 @@ type DLPEntryPredefinedGetResponse struct { // a case-sensitive manner Cannot be set to false if secret is true CaseSensitive bool `json:"case_sensitive"` // This field can have the runtime type of - // [DLPEntryPredefinedGetResponsePredefinedConfidence]. + // [DLPEntryPredefinedGetResponsePredefinedEntryConfidence]. Confidence interface{} `json:"confidence"` CreatedAt time.Time `json:"created_at" format:"date-time"` Pattern Pattern `json:"pattern"` ProfileID string `json:"profile_id,nullable" format:"uuid"` - Secret bool `json:"secret"` - UpdatedAt time.Time `json:"updated_at" format:"date-time"` // This field can have the runtime type of - // [DLPEntryPredefinedGetResponsePredefinedVariant]. + // [[]DLPEntryPredefinedGetResponseCustomEntryProfile], + // [[]DLPEntryPredefinedGetResponsePredefinedEntryProfile], + // [[]DLPEntryPredefinedGetResponseIntegrationEntryProfile], + // [[]DLPEntryPredefinedGetResponseExactDataEntryProfile], + // [[]DLPEntryPredefinedGetResponseDocumentFingerprintEntryProfile], + // [[]DLPEntryPredefinedGetResponseWordListEntryProfile]. + Profiles interface{} `json:"profiles"` + Secret bool `json:"secret"` + UpdatedAt time.Time `json:"updated_at" format:"date-time"` + // This field can have the runtime type of + // [DLPEntryPredefinedGetResponsePredefinedEntryVariant]. Variant interface{} `json:"variant"` // This field can have the runtime type of [interface{}]. WordList interface{} `json:"word_list"` @@ -926,6 +934,7 @@ type dlpEntryPredefinedGetResponseJSON struct { CreatedAt apijson.Field Pattern apijson.Field ProfileID apijson.Field + Profiles apijson.Field Secret apijson.Field UpdatedAt apijson.Field Variant apijson.Field @@ -950,22 +959,23 @@ func (r *DLPEntryPredefinedGetResponse) UnmarshalJSON(data []byte) (err error) { // AsUnion returns a [DLPEntryPredefinedGetResponseUnion] interface which you can // cast to the specific types for more type safety. // -// Possible runtime types of the union are [DLPEntryPredefinedGetResponseCustom], -// [DLPEntryPredefinedGetResponsePredefined], -// [DLPEntryPredefinedGetResponseIntegration], -// [DLPEntryPredefinedGetResponseExactData], -// [DLPEntryPredefinedGetResponseDocumentFingerprint], -// [DLPEntryPredefinedGetResponseWordList]. +// Possible runtime types of the union are +// [DLPEntryPredefinedGetResponseCustomEntry], +// [DLPEntryPredefinedGetResponsePredefinedEntry], +// [DLPEntryPredefinedGetResponseIntegrationEntry], +// [DLPEntryPredefinedGetResponseExactDataEntry], +// [DLPEntryPredefinedGetResponseDocumentFingerprintEntry], +// [DLPEntryPredefinedGetResponseWordListEntry]. func (r DLPEntryPredefinedGetResponse) AsUnion() DLPEntryPredefinedGetResponseUnion { return r.union } -// Union satisfied by [DLPEntryPredefinedGetResponseCustom], -// [DLPEntryPredefinedGetResponsePredefined], -// [DLPEntryPredefinedGetResponseIntegration], -// [DLPEntryPredefinedGetResponseExactData], -// [DLPEntryPredefinedGetResponseDocumentFingerprint] or -// [DLPEntryPredefinedGetResponseWordList]. +// Union satisfied by [DLPEntryPredefinedGetResponseCustomEntry], +// [DLPEntryPredefinedGetResponsePredefinedEntry], +// [DLPEntryPredefinedGetResponseIntegrationEntry], +// [DLPEntryPredefinedGetResponseExactDataEntry], +// [DLPEntryPredefinedGetResponseDocumentFingerprintEntry] or +// [DLPEntryPredefinedGetResponseWordListEntry]. type DLPEntryPredefinedGetResponseUnion interface { implementsDLPEntryPredefinedGetResponse() } @@ -973,55 +983,50 @@ type DLPEntryPredefinedGetResponseUnion interface { func init() { apijson.RegisterUnion( reflect.TypeOf((*DLPEntryPredefinedGetResponseUnion)(nil)).Elem(), - "type", + "", apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseCustom{}), - DiscriminatorValue: "custom", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseCustomEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponsePredefined{}), - DiscriminatorValue: "predefined", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponsePredefinedEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseIntegration{}), - DiscriminatorValue: "integration", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseIntegrationEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseExactData{}), - DiscriminatorValue: "exact_data", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseExactDataEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseDocumentFingerprint{}), - DiscriminatorValue: "document_fingerprint", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseDocumentFingerprintEntry{}), }, apijson.UnionVariant{ - TypeFilter: gjson.JSON, - Type: reflect.TypeOf(DLPEntryPredefinedGetResponseWordList{}), - DiscriminatorValue: "word_list", + TypeFilter: gjson.JSON, + Type: reflect.TypeOf(DLPEntryPredefinedGetResponseWordListEntry{}), }, ) } -type DLPEntryPredefinedGetResponseCustom struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Pattern Pattern `json:"pattern,required"` - Type DLPEntryPredefinedGetResponseCustomType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryPredefinedGetResponseCustomJSON `json:"-"` +type DLPEntryPredefinedGetResponseCustomEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Pattern Pattern `json:"pattern,required"` + Type DLPEntryPredefinedGetResponseCustomEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryPredefinedGetResponseCustomEntryProfile `json:"profiles"` + JSON dlpEntryPredefinedGetResponseCustomEntryJSON `json:"-"` } -// dlpEntryPredefinedGetResponseCustomJSON contains the JSON metadata for the -// struct [DLPEntryPredefinedGetResponseCustom] -type dlpEntryPredefinedGetResponseCustomJSON struct { +// dlpEntryPredefinedGetResponseCustomEntryJSON contains the JSON metadata for the +// struct [DLPEntryPredefinedGetResponseCustomEntry] +type dlpEntryPredefinedGetResponseCustomEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1030,119 +1035,170 @@ type dlpEntryPredefinedGetResponseCustomJSON struct { Type apijson.Field UpdatedAt apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseCustom) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseCustomJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseCustomEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseCustom) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponseCustomEntry) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponseCustomType string +type DLPEntryPredefinedGetResponseCustomEntryType string const ( - DLPEntryPredefinedGetResponseCustomTypeCustom DLPEntryPredefinedGetResponseCustomType = "custom" + DLPEntryPredefinedGetResponseCustomEntryTypeCustom DLPEntryPredefinedGetResponseCustomEntryType = "custom" ) -func (r DLPEntryPredefinedGetResponseCustomType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseCustomEntryType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseCustomTypeCustom: + case DLPEntryPredefinedGetResponseCustomEntryTypeCustom: return true } return false } -type DLPEntryPredefinedGetResponsePredefined struct { - ID string `json:"id,required" format:"uuid"` - Confidence DLPEntryPredefinedGetResponsePredefinedConfidence `json:"confidence,required"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedGetResponsePredefinedType `json:"type,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - Variant DLPEntryPredefinedGetResponsePredefinedVariant `json:"variant"` - JSON dlpEntryPredefinedGetResponsePredefinedJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryPredefinedGetResponseCustomEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryPredefinedGetResponseCustomEntryProfileJSON `json:"-"` } -// dlpEntryPredefinedGetResponsePredefinedJSON contains the JSON metadata for the -// struct [DLPEntryPredefinedGetResponsePredefined] -type dlpEntryPredefinedGetResponsePredefinedJSON struct { +// dlpEntryPredefinedGetResponseCustomEntryProfileJSON contains the JSON metadata +// for the struct [DLPEntryPredefinedGetResponseCustomEntryProfile] +type dlpEntryPredefinedGetResponseCustomEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryPredefinedGetResponseCustomEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryPredefinedGetResponseCustomEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryPredefinedGetResponsePredefinedEntry struct { + ID string `json:"id,required" format:"uuid"` + Confidence DLPEntryPredefinedGetResponsePredefinedEntryConfidence `json:"confidence,required"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedGetResponsePredefinedEntryType `json:"type,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryPredefinedGetResponsePredefinedEntryProfile `json:"profiles"` + Variant DLPEntryPredefinedGetResponsePredefinedEntryVariant `json:"variant"` + JSON dlpEntryPredefinedGetResponsePredefinedEntryJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponsePredefinedEntryJSON contains the JSON metadata for +// the struct [DLPEntryPredefinedGetResponsePredefinedEntry] +type dlpEntryPredefinedGetResponsePredefinedEntryJSON struct { ID apijson.Field Confidence apijson.Field Enabled apijson.Field Name apijson.Field Type apijson.Field ProfileID apijson.Field + Profiles apijson.Field Variant apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponsePredefined) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponsePredefinedJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponsePredefinedEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponsePredefined) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponsePredefinedEntry) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponsePredefinedConfidence struct { +type DLPEntryPredefinedGetResponsePredefinedEntryConfidence struct { // Indicates whether this entry has AI remote service validation. AIContextAvailable bool `json:"ai_context_available,required"` // Indicates whether this entry has any form of validation that is not an AI remote // service. - Available bool `json:"available,required"` - JSON dlpEntryPredefinedGetResponsePredefinedConfidenceJSON `json:"-"` + Available bool `json:"available,required"` + JSON dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON `json:"-"` } -// dlpEntryPredefinedGetResponsePredefinedConfidenceJSON contains the JSON metadata -// for the struct [DLPEntryPredefinedGetResponsePredefinedConfidence] -type dlpEntryPredefinedGetResponsePredefinedConfidenceJSON struct { +// dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON contains the JSON +// metadata for the struct [DLPEntryPredefinedGetResponsePredefinedEntryConfidence] +type dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON struct { AIContextAvailable apijson.Field Available apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponsePredefinedConfidenceJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON) RawJSON() string { return r.raw } -type DLPEntryPredefinedGetResponsePredefinedType string +type DLPEntryPredefinedGetResponsePredefinedEntryType string const ( - DLPEntryPredefinedGetResponsePredefinedTypePredefined DLPEntryPredefinedGetResponsePredefinedType = "predefined" + DLPEntryPredefinedGetResponsePredefinedEntryTypePredefined DLPEntryPredefinedGetResponsePredefinedEntryType = "predefined" ) -func (r DLPEntryPredefinedGetResponsePredefinedType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponsePredefinedEntryType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponsePredefinedTypePredefined: + case DLPEntryPredefinedGetResponsePredefinedEntryTypePredefined: return true } return false } -type DLPEntryPredefinedGetResponsePredefinedVariant struct { - TopicType DLPEntryPredefinedGetResponsePredefinedVariantTopicType `json:"topic_type,required"` - Type DLPEntryPredefinedGetResponsePredefinedVariantType `json:"type,required"` - Description string `json:"description,nullable"` - JSON dlpEntryPredefinedGetResponsePredefinedVariantJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryPredefinedGetResponsePredefinedEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryPredefinedGetResponsePredefinedEntryProfileJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponsePredefinedEntryProfileJSON contains the JSON +// metadata for the struct [DLPEntryPredefinedGetResponsePredefinedEntryProfile] +type dlpEntryPredefinedGetResponsePredefinedEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryPredefinedGetResponsePredefinedEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -// dlpEntryPredefinedGetResponsePredefinedVariantJSON contains the JSON metadata -// for the struct [DLPEntryPredefinedGetResponsePredefinedVariant] -type dlpEntryPredefinedGetResponsePredefinedVariantJSON struct { +func (r dlpEntryPredefinedGetResponsePredefinedEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryPredefinedGetResponsePredefinedEntryVariant struct { + TopicType DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType `json:"topic_type,required"` + Type DLPEntryPredefinedGetResponsePredefinedEntryVariantType `json:"type,required"` + Description string `json:"description,nullable"` + JSON dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON contains the JSON +// metadata for the struct [DLPEntryPredefinedGetResponsePredefinedEntryVariant] +type dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON struct { TopicType apijson.Field Type apijson.Field Description apijson.Field @@ -1150,57 +1206,58 @@ type dlpEntryPredefinedGetResponsePredefinedVariantJSON struct { ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponsePredefinedVariantJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON) RawJSON() string { return r.raw } -type DLPEntryPredefinedGetResponsePredefinedVariantTopicType string +type DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType string const ( - DLPEntryPredefinedGetResponsePredefinedVariantTopicTypeIntent DLPEntryPredefinedGetResponsePredefinedVariantTopicType = "Intent" - DLPEntryPredefinedGetResponsePredefinedVariantTopicTypeContent DLPEntryPredefinedGetResponsePredefinedVariantTopicType = "Content" + DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType = "Intent" + DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType = "Content" ) -func (r DLPEntryPredefinedGetResponsePredefinedVariantTopicType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponsePredefinedVariantTopicTypeIntent, DLPEntryPredefinedGetResponsePredefinedVariantTopicTypeContent: + case DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeContent: return true } return false } -type DLPEntryPredefinedGetResponsePredefinedVariantType string +type DLPEntryPredefinedGetResponsePredefinedEntryVariantType string const ( - DLPEntryPredefinedGetResponsePredefinedVariantTypePromptTopic DLPEntryPredefinedGetResponsePredefinedVariantType = "PromptTopic" + DLPEntryPredefinedGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryPredefinedGetResponsePredefinedEntryVariantType = "PromptTopic" ) -func (r DLPEntryPredefinedGetResponsePredefinedVariantType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponsePredefinedEntryVariantType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponsePredefinedVariantTypePromptTopic: + case DLPEntryPredefinedGetResponsePredefinedEntryVariantTypePromptTopic: return true } return false } -type DLPEntryPredefinedGetResponseIntegration struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedGetResponseIntegrationType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryPredefinedGetResponseIntegrationJSON `json:"-"` +type DLPEntryPredefinedGetResponseIntegrationEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedGetResponseIntegrationEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryPredefinedGetResponseIntegrationEntryProfile `json:"profiles"` + JSON dlpEntryPredefinedGetResponseIntegrationEntryJSON `json:"-"` } -// dlpEntryPredefinedGetResponseIntegrationJSON contains the JSON metadata for the -// struct [DLPEntryPredefinedGetResponseIntegration] -type dlpEntryPredefinedGetResponseIntegrationJSON struct { +// dlpEntryPredefinedGetResponseIntegrationEntryJSON contains the JSON metadata for +// the struct [DLPEntryPredefinedGetResponseIntegrationEntry] +type dlpEntryPredefinedGetResponseIntegrationEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1208,51 +1265,77 @@ type dlpEntryPredefinedGetResponseIntegrationJSON struct { Type apijson.Field UpdatedAt apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseIntegration) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseIntegrationJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseIntegrationEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseIntegration) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponseIntegrationEntry) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponseIntegrationType string +type DLPEntryPredefinedGetResponseIntegrationEntryType string const ( - DLPEntryPredefinedGetResponseIntegrationTypeIntegration DLPEntryPredefinedGetResponseIntegrationType = "integration" + DLPEntryPredefinedGetResponseIntegrationEntryTypeIntegration DLPEntryPredefinedGetResponseIntegrationEntryType = "integration" ) -func (r DLPEntryPredefinedGetResponseIntegrationType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseIntegrationEntryType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseIntegrationTypeIntegration: + case DLPEntryPredefinedGetResponseIntegrationEntryTypeIntegration: return true } return false } -type DLPEntryPredefinedGetResponseExactData struct { +// Computed entry field for a profile that an entry is shared into. +type DLPEntryPredefinedGetResponseIntegrationEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryPredefinedGetResponseIntegrationEntryProfileJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponseIntegrationEntryProfileJSON contains the JSON +// metadata for the struct [DLPEntryPredefinedGetResponseIntegrationEntryProfile] +type dlpEntryPredefinedGetResponseIntegrationEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryPredefinedGetResponseIntegrationEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryPredefinedGetResponseIntegrationEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryPredefinedGetResponseExactDataEntry struct { ID string `json:"id,required" format:"uuid"` // Only applies to custom word lists. Determines if the words should be matched in // a case-sensitive manner Cannot be set to false if secret is true - CaseSensitive bool `json:"case_sensitive,required"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Secret bool `json:"secret,required"` - Type DLPEntryPredefinedGetResponseExactDataType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryPredefinedGetResponseExactDataJSON `json:"-"` -} - -// dlpEntryPredefinedGetResponseExactDataJSON contains the JSON metadata for the -// struct [DLPEntryPredefinedGetResponseExactData] -type dlpEntryPredefinedGetResponseExactDataJSON struct { + CaseSensitive bool `json:"case_sensitive,required"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Secret bool `json:"secret,required"` + Type DLPEntryPredefinedGetResponseExactDataEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Profiles []DLPEntryPredefinedGetResponseExactDataEntryProfile `json:"profiles"` + JSON dlpEntryPredefinedGetResponseExactDataEntryJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponseExactDataEntryJSON contains the JSON metadata for +// the struct [DLPEntryPredefinedGetResponseExactDataEntry] +type dlpEntryPredefinedGetResponseExactDataEntryJSON struct { ID apijson.Field CaseSensitive apijson.Field CreatedAt apijson.Field @@ -1261,96 +1344,150 @@ type dlpEntryPredefinedGetResponseExactDataJSON struct { Secret apijson.Field Type apijson.Field UpdatedAt apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseExactData) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseExactDataJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseExactDataEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseExactData) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponseExactDataEntry) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponseExactDataType string +type DLPEntryPredefinedGetResponseExactDataEntryType string const ( - DLPEntryPredefinedGetResponseExactDataTypeExactData DLPEntryPredefinedGetResponseExactDataType = "exact_data" + DLPEntryPredefinedGetResponseExactDataEntryTypeExactData DLPEntryPredefinedGetResponseExactDataEntryType = "exact_data" ) -func (r DLPEntryPredefinedGetResponseExactDataType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseExactDataEntryType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseExactDataTypeExactData: + case DLPEntryPredefinedGetResponseExactDataEntryTypeExactData: return true } return false } -type DLPEntryPredefinedGetResponseDocumentFingerprint struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedGetResponseDocumentFingerprintType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - JSON dlpEntryPredefinedGetResponseDocumentFingerprintJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryPredefinedGetResponseExactDataEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryPredefinedGetResponseExactDataEntryProfileJSON `json:"-"` } -// dlpEntryPredefinedGetResponseDocumentFingerprintJSON contains the JSON metadata -// for the struct [DLPEntryPredefinedGetResponseDocumentFingerprint] -type dlpEntryPredefinedGetResponseDocumentFingerprintJSON struct { +// dlpEntryPredefinedGetResponseExactDataEntryProfileJSON contains the JSON +// metadata for the struct [DLPEntryPredefinedGetResponseExactDataEntryProfile] +type dlpEntryPredefinedGetResponseExactDataEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryPredefinedGetResponseExactDataEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryPredefinedGetResponseExactDataEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryPredefinedGetResponseDocumentFingerprintEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedGetResponseDocumentFingerprintEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + Profiles []DLPEntryPredefinedGetResponseDocumentFingerprintEntryProfile `json:"profiles"` + JSON dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON contains the JSON +// metadata for the struct [DLPEntryPredefinedGetResponseDocumentFingerprintEntry] +type dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field Name apijson.Field Type apijson.Field UpdatedAt apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseDocumentFingerprintJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseDocumentFingerprint) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponseDocumentFingerprintEntry) implementsDLPEntryPredefinedGetResponse() { +} -type DLPEntryPredefinedGetResponseDocumentFingerprintType string +type DLPEntryPredefinedGetResponseDocumentFingerprintEntryType string const ( - DLPEntryPredefinedGetResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryPredefinedGetResponseDocumentFingerprintType = "document_fingerprint" + DLPEntryPredefinedGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryPredefinedGetResponseDocumentFingerprintEntryType = "document_fingerprint" ) -func (r DLPEntryPredefinedGetResponseDocumentFingerprintType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseDocumentFingerprintEntryType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseDocumentFingerprintTypeDocumentFingerprint: + case DLPEntryPredefinedGetResponseDocumentFingerprintEntryTypeDocumentFingerprint: return true } return false } -type DLPEntryPredefinedGetResponseWordList struct { - ID string `json:"id,required" format:"uuid"` - CreatedAt time.Time `json:"created_at,required" format:"date-time"` - Enabled bool `json:"enabled,required"` - Name string `json:"name,required"` - Type DLPEntryPredefinedGetResponseWordListType `json:"type,required"` - UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList interface{} `json:"word_list,required"` - ProfileID string `json:"profile_id,nullable" format:"uuid"` - JSON dlpEntryPredefinedGetResponseWordListJSON `json:"-"` +// Computed entry field for a profile that an entry is shared into. +type DLPEntryPredefinedGetResponseDocumentFingerprintEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryPredefinedGetResponseDocumentFingerprintEntryProfileJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponseDocumentFingerprintEntryProfileJSON contains the +// JSON metadata for the struct +// [DLPEntryPredefinedGetResponseDocumentFingerprintEntryProfile] +type dlpEntryPredefinedGetResponseDocumentFingerprintEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryPredefinedGetResponseDocumentFingerprintEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) } -// dlpEntryPredefinedGetResponseWordListJSON contains the JSON metadata for the -// struct [DLPEntryPredefinedGetResponseWordList] -type dlpEntryPredefinedGetResponseWordListJSON struct { +func (r dlpEntryPredefinedGetResponseDocumentFingerprintEntryProfileJSON) RawJSON() string { + return r.raw +} + +type DLPEntryPredefinedGetResponseWordListEntry struct { + ID string `json:"id,required" format:"uuid"` + CreatedAt time.Time `json:"created_at,required" format:"date-time"` + Enabled bool `json:"enabled,required"` + Name string `json:"name,required"` + Type DLPEntryPredefinedGetResponseWordListEntryType `json:"type,required"` + UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` + WordList interface{} `json:"word_list,required"` + ProfileID string `json:"profile_id,nullable" format:"uuid"` + Profiles []DLPEntryPredefinedGetResponseWordListEntryProfile `json:"profiles"` + JSON dlpEntryPredefinedGetResponseWordListEntryJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponseWordListEntryJSON contains the JSON metadata for +// the struct [DLPEntryPredefinedGetResponseWordListEntry] +type dlpEntryPredefinedGetResponseWordListEntryJSON struct { ID apijson.Field CreatedAt apijson.Field Enabled apijson.Field @@ -1359,34 +1496,59 @@ type dlpEntryPredefinedGetResponseWordListJSON struct { UpdatedAt apijson.Field WordList apijson.Field ProfileID apijson.Field + Profiles apijson.Field raw string ExtraFields map[string]apijson.Field } -func (r *DLPEntryPredefinedGetResponseWordList) UnmarshalJSON(data []byte) (err error) { +func (r *DLPEntryPredefinedGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) { return apijson.UnmarshalRoot(data, r) } -func (r dlpEntryPredefinedGetResponseWordListJSON) RawJSON() string { +func (r dlpEntryPredefinedGetResponseWordListEntryJSON) RawJSON() string { return r.raw } -func (r DLPEntryPredefinedGetResponseWordList) implementsDLPEntryPredefinedGetResponse() {} +func (r DLPEntryPredefinedGetResponseWordListEntry) implementsDLPEntryPredefinedGetResponse() {} -type DLPEntryPredefinedGetResponseWordListType string +type DLPEntryPredefinedGetResponseWordListEntryType string const ( - DLPEntryPredefinedGetResponseWordListTypeWordList DLPEntryPredefinedGetResponseWordListType = "word_list" + DLPEntryPredefinedGetResponseWordListEntryTypeWordList DLPEntryPredefinedGetResponseWordListEntryType = "word_list" ) -func (r DLPEntryPredefinedGetResponseWordListType) IsKnown() bool { +func (r DLPEntryPredefinedGetResponseWordListEntryType) IsKnown() bool { switch r { - case DLPEntryPredefinedGetResponseWordListTypeWordList: + case DLPEntryPredefinedGetResponseWordListEntryTypeWordList: return true } return false } +// Computed entry field for a profile that an entry is shared into. +type DLPEntryPredefinedGetResponseWordListEntryProfile struct { + ID string `json:"id,required" format:"uuid"` + Name string `json:"name,required"` + JSON dlpEntryPredefinedGetResponseWordListEntryProfileJSON `json:"-"` +} + +// dlpEntryPredefinedGetResponseWordListEntryProfileJSON contains the JSON metadata +// for the struct [DLPEntryPredefinedGetResponseWordListEntryProfile] +type dlpEntryPredefinedGetResponseWordListEntryProfileJSON struct { + ID apijson.Field + Name apijson.Field + raw string + ExtraFields map[string]apijson.Field +} + +func (r *DLPEntryPredefinedGetResponseWordListEntryProfile) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r dlpEntryPredefinedGetResponseWordListEntryProfileJSON) RawJSON() string { + return r.raw +} + type DLPEntryPredefinedGetResponseType string const ( From 3d96a2c049c0171ca6ce87a2f6df69b0912e7a88 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 00:17:26 +0000 Subject: [PATCH 10/10] release: 6.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e704c06d45c..0bce92bfc19 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "6.3.0" + ".": "6.4.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index a4929aa573e..13a33a0f310 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 6.4.0 (2025-12-03) + +Full Changelog: [v6.3.0...v6.4.0](https://github.com/cloudflare/cloudflare-go/compare/v6.3.0...v6.4.0) + +### Features + +* feat(r2_data_catalog): Configure SDKs/Terraform to use R2 Data Catalog routes ([d1b1eab](https://github.com/cloudflare/cloudflare-go/commit/d1b1eab741593d97221a099b07e120cc205999dc)) +* feat(silences): add a new alert silencing api ([fbe4969](https://github.com/cloudflare/cloudflare-go/commit/fbe4969d2d8b61c2e8c635543297a04e14435391)) + + +### Chores + +* **api:** update composite API spec ([813b47b](https://github.com/cloudflare/cloudflare-go/commit/813b47b136cd4e9095aa00f3921f2d94242287e9)) +* **api:** update composite API spec ([86f0a73](https://github.com/cloudflare/cloudflare-go/commit/86f0a73093fe70cec9766b585281f396ec500c76)) + ## 6.3.0 (2025-11-19) Full Changelog: [v6.2.0...v6.3.0](https://github.com/cloudflare/cloudflare-go/compare/v6.2.0...v6.3.0) diff --git a/README.md b/README.md index 52839e7ff4e..c070c8bf758 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Or to pin the version: ```sh -go get -u 'github.com/cloudflare/cloudflare-go/v4@v6.3.0' +go get -u 'github.com/cloudflare/cloudflare-go/v4@v6.4.0' ``` diff --git a/internal/version.go b/internal/version.go index cc2cf4e2b21..74ff7068f22 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "6.3.0" // x-release-please-version +const PackageVersion = "6.4.0" // x-release-please-version