diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 0bce92bfc19..d742a39ba26 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "6.4.0"
+ ".": "6.5.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 79bf1caa946..6ef29d3ca2e 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 1932
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6183ef87f1b8eea6ad4bae542bfde2ec23a5526ae2b7bacdf6c6a4c48d990995.yml
-openapi_spec_hash: 9c8ac3d56571ebf1e170d993b71ccb4d
-config_hash: aaacea52b646facd5527d7b1e928123d
+configured_endpoints: 1948
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d3b3813ba8fb0b5303cfad8fcbd363941c494711e4cce61069553692b664774f.yml
+openapi_spec_hash: 4f467a53fd61500db4f7561dcfaaa088
+config_hash: e46aac70a20120e31732b1248c24ef48
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3f987d3910c..07906551816 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,28 @@
# Changelog
+## 6.5.0 (2025-12-17)
+
+Full Changelog: [v6.4.0...v6.5.0](https://github.com/cloudflare/cloudflare-go/compare/v6.4.0...v6.5.0)
+
+### Features
+
+* **ai_gateway:** add `zdr` field ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
+* **ai_search**: add AI Search endpoints ([9d95c4b](https://github.com/cloudflare/cloudflare-go/commit/9d95c4baab206211083fbf85ab04ff3fa9205fc8))
+* **leaked_credentials_check**: Add GET endpoint for leaked_credentials_check/detections ([2c4f6f5](https://github.com/cloudflare/cloudflare-go/commit/2c4f6f5f09e5aba4afe79b4df782032b242bf2af))
+* **magic_transit:** support custom remote identities ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
+* **r2:** add `keys` to super slurper response types ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
+* **radar:** support filtering results by agent type ([2020995](https://github.com/cloudflare/cloudflare-go/commit/2020995fcd4a89b52f8b1bf2f78303a90fa4e66a))
+* **workers:** add startup_time_ms to version types ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
+* **zero_trust:** support new gateway list types ([2020995](https://github.com/cloudflare/cloudflare-go/commit/2020995fcd4a89b52f8b1bf2f78303a90fa4e66a))
+
+### Chores
+
+* **accounts:** docs, tests updates ([f85b933](https://github.com/cloudflare/cloudflare-go/commit/f85b93344696aab1472cbe94c51badf28c6a5de7))
+* **api_gateway** Deprecate API Shield Schema Validation resources ([ae8644c](https://github.com/cloudflare/cloudflare-go/commit/ae8644cb41a29e0a1496b79cbe797365be1cb253))
+* **internal:** codegen related update ([d2d0a29](https://github.com/cloudflare/cloudflare-go/commit/d2d0a295b5658e40177ec6af88b7d6a5d4bbc8bb))
+* **load_balancers:** update pool, monitor nullability ([2020995](https://github.com/cloudflare/cloudflare-go/commit/2020995fcd4a89b52f8b1bf2f78303a90fa4e66a))
+* **zero_trus:** refactor DLP entry types ([23fdbc6](https://github.com/cloudflare/cloudflare-go/commit/23fdbc69d399ef783bf4ad85df3ae07cf8ffb794))
+
## 6.4.0 (2025-12-04)
Full Changelog: [v6.3.0...v6.4.0](https://github.com/cloudflare/cloudflare-go/compare/v6.3.0...v6.4.0)
diff --git a/README.md b/README.md
index c070c8bf758..496df9123ca 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.4.0'
+go get -u 'github.com/cloudflare/cloudflare-go/v4@v6.5.0'
```
diff --git a/accounts/logaudit.go b/accounts/logaudit.go
index 2bae438a213..a578ea32295 100644
--- a/accounts/logaudit.go
+++ b/accounts/logaudit.go
@@ -625,6 +625,8 @@ func (r LogAuditListParamsActorTypeNot) IsKnown() bool {
// Deprecated: deprecated in favor of ID. Use ID to query by the audit log ID.
type LogAuditListParamsAuditLogID struct {
// Filters out audit logs by their IDs.
+ //
+ // Deprecated: deprecated
Not param.Field[[]string] `query:"not"`
}
diff --git a/accounts/logaudit_test.go b/accounts/logaudit_test.go
index e3acbf2b671..d91ad23951f 100644
--- a/accounts/logaudit_test.go
+++ b/accounts/logaudit_test.go
@@ -66,6 +66,9 @@ 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/ai/tomarkdown.go b/ai/tomarkdown.go
index f2a9668ec8e..d1986d006c6 100644
--- a/ai/tomarkdown.go
+++ b/ai/tomarkdown.go
@@ -67,15 +67,15 @@ func (r *ToMarkdownService) SupportedAutoPaging(ctx context.Context, query ToMar
}
// Convert Files into Markdown
-func (r *ToMarkdownService) Transform(ctx context.Context, file io.Reader, body ToMarkdownTransformParams, opts ...option.RequestOption) (res *pagination.SinglePage[ToMarkdownTransformResponse], err error) {
+func (r *ToMarkdownService) Transform(ctx context.Context, file io.Reader, params ToMarkdownTransformParams, opts ...option.RequestOption) (res *pagination.SinglePage[ToMarkdownTransformResponse], err error) {
var raw *http.Response
opts = slices.Concat(r.Options, opts)
opts = append([]option.RequestOption{option.WithRequestBody("application/octet-stream", file), option.WithResponseInto(&raw)}, opts...)
- if body.AccountID.Value == "" {
+ if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
return
}
- path := fmt.Sprintf("accounts/%s/ai/tomarkdown", body.AccountID)
+ path := fmt.Sprintf("accounts/%s/ai/tomarkdown", params.AccountID)
cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, nil, &res, opts...)
if err != nil {
return nil, err
@@ -89,8 +89,8 @@ func (r *ToMarkdownService) Transform(ctx context.Context, file io.Reader, body
}
// Convert Files into Markdown
-func (r *ToMarkdownService) TransformAutoPaging(ctx context.Context, file io.Reader, body ToMarkdownTransformParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ToMarkdownTransformResponse] {
- return pagination.NewSinglePageAutoPager(r.Transform(ctx, file, body, opts...))
+func (r *ToMarkdownService) TransformAutoPaging(ctx context.Context, file io.Reader, params ToMarkdownTransformParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ToMarkdownTransformResponse] {
+ return pagination.NewSinglePageAutoPager(r.Transform(ctx, file, params, opts...))
}
type ToMarkdownSupportedResponse struct {
diff --git a/ai_gateway/aigateway.go b/ai_gateway/aigateway.go
index c5021ed7dc9..879d3956fd1 100644
--- a/ai_gateway/aigateway.go
+++ b/ai_gateway/aigateway.go
@@ -180,6 +180,7 @@ type AIGatewayNewResponse struct {
Otel []AIGatewayNewResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayNewResponseStripe `json:"stripe,nullable"`
+ Zdr bool `json:"zdr"`
JSON aiGatewayNewResponseJSON `json:"-"`
}
@@ -207,6 +208,7 @@ type aiGatewayNewResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
+ Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -463,6 +465,7 @@ type AIGatewayUpdateResponse struct {
Otel []AIGatewayUpdateResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayUpdateResponseStripe `json:"stripe,nullable"`
+ Zdr bool `json:"zdr"`
JSON aiGatewayUpdateResponseJSON `json:"-"`
}
@@ -490,6 +493,7 @@ type aiGatewayUpdateResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
+ Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -747,6 +751,7 @@ type AIGatewayListResponse struct {
Otel []AIGatewayListResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayListResponseStripe `json:"stripe,nullable"`
+ Zdr bool `json:"zdr"`
JSON aiGatewayListResponseJSON `json:"-"`
}
@@ -774,6 +779,7 @@ type aiGatewayListResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
+ Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -1031,6 +1037,7 @@ type AIGatewayDeleteResponse struct {
Otel []AIGatewayDeleteResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayDeleteResponseStripe `json:"stripe,nullable"`
+ Zdr bool `json:"zdr"`
JSON aiGatewayDeleteResponseJSON `json:"-"`
}
@@ -1058,6 +1065,7 @@ type aiGatewayDeleteResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
+ Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -1315,6 +1323,7 @@ type AIGatewayGetResponse struct {
Otel []AIGatewayGetResponseOtel `json:"otel,nullable"`
StoreID string `json:"store_id,nullable"`
Stripe AIGatewayGetResponseStripe `json:"stripe,nullable"`
+ Zdr bool `json:"zdr"`
JSON aiGatewayGetResponseJSON `json:"-"`
}
@@ -1342,6 +1351,7 @@ type aiGatewayGetResponseJSON struct {
Otel apijson.Field
StoreID apijson.Field
Stripe apijson.Field
+ Zdr apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
@@ -1590,6 +1600,7 @@ type AIGatewayNewParams struct {
LogManagementStrategy param.Field[AIGatewayNewParamsLogManagementStrategy] `json:"log_management_strategy"`
Logpush param.Field[bool] `json:"logpush"`
LogpushPublicKey param.Field[string] `json:"logpush_public_key"`
+ Zdr param.Field[bool] `json:"zdr"`
}
func (r AIGatewayNewParams) MarshalJSON() (data []byte, err error) {
@@ -1666,6 +1677,7 @@ type AIGatewayUpdateParams struct {
Otel param.Field[[]AIGatewayUpdateParamsOtel] `json:"otel"`
StoreID param.Field[string] `json:"store_id"`
Stripe param.Field[AIGatewayUpdateParamsStripe] `json:"stripe"`
+ Zdr param.Field[bool] `json:"zdr"`
}
func (r AIGatewayUpdateParams) MarshalJSON() (data []byte, err error) {
diff --git a/ai_gateway/aigateway_test.go b/ai_gateway/aigateway_test.go
index 8fd4f6ca7f4..7cdb9dff1b4 100644
--- a/ai_gateway/aigateway_test.go
+++ b/ai_gateway/aigateway_test.go
@@ -41,6 +41,7 @@ func TestAIGatewayNewWithOptionalParams(t *testing.T) {
LogManagementStrategy: cloudflare.F(ai_gateway.AIGatewayNewParamsLogManagementStrategyStopInserting),
Logpush: cloudflare.F(true),
LogpushPublicKey: cloudflare.F("xxxxxxxxxxxxxxxx"),
+ Zdr: cloudflare.F(true),
})
if err != nil {
var apierr *cloudflare.Error
@@ -99,6 +100,7 @@ func TestAIGatewayUpdateWithOptionalParams(t *testing.T) {
Payload: cloudflare.F("payload"),
}}),
}),
+ Zdr: cloudflare.F(true),
},
)
if err != nil {
diff --git a/ai_search/aisearch.go b/ai_search/aisearch.go
new file mode 100644
index 00000000000..040d969b059
--- /dev/null
+++ b/ai_search/aisearch.go
@@ -0,0 +1,30 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search
+
+import (
+ "github.com/cloudflare/cloudflare-go/v6/option"
+)
+
+// AISearchService 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 [NewAISearchService] method instead.
+type AISearchService struct {
+ Options []option.RequestOption
+ Instances *InstanceService
+ Tokens *TokenService
+}
+
+// NewAISearchService 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 NewAISearchService(opts ...option.RequestOption) (r *AISearchService) {
+ r = &AISearchService{}
+ r.Options = opts
+ r.Instances = NewInstanceService(opts...)
+ r.Tokens = NewTokenService(opts...)
+ return
+}
diff --git a/ai_search/aliases.go b/ai_search/aliases.go
new file mode 100644
index 00000000000..7cf95c94125
--- /dev/null
+++ b/ai_search/aliases.go
@@ -0,0 +1,467 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search
+
+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/ai_search/instance.go b/ai_search/instance.go
new file mode 100644
index 00000000000..676d436139a
--- /dev/null
+++ b/ai_search/instance.go
@@ -0,0 +1,2996 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search
+
+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/r2"
+)
+
+// InstanceService 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 [NewInstanceService] method instead.
+type InstanceService struct {
+ Options []option.RequestOption
+ Items *InstanceItemService
+ Jobs *InstanceJobService
+}
+
+// NewInstanceService 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 NewInstanceService(opts ...option.RequestOption) (r *InstanceService) {
+ r = &InstanceService{}
+ r.Options = opts
+ r.Items = NewInstanceItemService(opts...)
+ r.Jobs = NewInstanceJobService(opts...)
+ return
+}
+
+// Create new instances.
+func (r *InstanceService) New(ctx context.Context, params InstanceNewParams, opts ...option.RequestOption) (res *InstanceNewResponse, err error) {
+ var env InstanceNewResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if params.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances", params.AccountID)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// Update instances.
+func (r *InstanceService) Update(ctx context.Context, id string, params InstanceUpdateParams, opts ...option.RequestOption) (res *InstanceUpdateResponse, err error) {
+ var env InstanceUpdateResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if params.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s", params.AccountID, id)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPut, path, params, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// List instances.
+func (r *InstanceService) List(ctx context.Context, params InstanceListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[InstanceListResponse], 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/ai-search/instances", 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 instances.
+func (r *InstanceService) ListAutoPaging(ctx context.Context, params InstanceListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[InstanceListResponse] {
+ return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...))
+}
+
+// Delete instances.
+func (r *InstanceService) Delete(ctx context.Context, id string, body InstanceDeleteParams, opts ...option.RequestOption) (res *InstanceDeleteResponse, err error) {
+ var env InstanceDeleteResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if body.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s", body.AccountID, id)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// Read instances.
+func (r *InstanceService) Read(ctx context.Context, id string, query InstanceReadParams, opts ...option.RequestOption) (res *InstanceReadResponse, err error) {
+ var env InstanceReadResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if query.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s", query.AccountID, id)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// Stats
+func (r *InstanceService) Stats(ctx context.Context, id string, query InstanceStatsParams, opts ...option.RequestOption) (res *InstanceStatsResponse, err error) {
+ var env InstanceStatsResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if query.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s/stats", query.AccountID, id)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+type InstanceNewResponse struct {
+ // Use your AI Search ID.
+ ID string `json:"id,required"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ InternalID string `json:"internal_id,required" format:"uuid"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Source string `json:"source,required"`
+ TokenID string `json:"token_id,required" format:"uuid"`
+ Type InstanceNewResponseType `json:"type,required"`
+ VectorizeName string `json:"vectorize_name,required"`
+ AIGatewayID string `json:"ai_gateway_id"`
+ AISearchModel InstanceNewResponseAISearchModel `json:"ai_search_model"`
+ Cache bool `json:"cache"`
+ CacheThreshold InstanceNewResponseCacheThreshold `json:"cache_threshold"`
+ Chunk bool `json:"chunk"`
+ ChunkOverlap int64 `json:"chunk_overlap"`
+ ChunkSize int64 `json:"chunk_size"`
+ CreatedBy string `json:"created_by"`
+ EmbeddingModel InstanceNewResponseEmbeddingModel `json:"embedding_model"`
+ Enable bool `json:"enable"`
+ EngineVersion float64 `json:"engine_version"`
+ LastActivity time.Time `json:"last_activity" format:"date-time"`
+ MaxNumResults int64 `json:"max_num_results"`
+ Metadata InstanceNewResponseMetadata `json:"metadata"`
+ ModifiedBy string `json:"modified_by"`
+ Paused bool `json:"paused"`
+ Reranking bool `json:"reranking"`
+ RerankingModel InstanceNewResponseRerankingModel `json:"reranking_model"`
+ RewriteModel InstanceNewResponseRewriteModel `json:"rewrite_model"`
+ RewriteQuery bool `json:"rewrite_query"`
+ ScoreThreshold float64 `json:"score_threshold"`
+ SourceParams InstanceNewResponseSourceParams `json:"source_params"`
+ Status string `json:"status"`
+ Summarization bool `json:"summarization"`
+ SummarizationModel InstanceNewResponseSummarizationModel `json:"summarization_model"`
+ SystemPromptAISearch string `json:"system_prompt_ai_search"`
+ SystemPromptIndexSummarization string `json:"system_prompt_index_summarization"`
+ SystemPromptRewriteQuery string `json:"system_prompt_rewrite_query"`
+ VectorizeActiveNamespace string `json:"vectorize_active_namespace"`
+ JSON instanceNewResponseJSON `json:"-"`
+}
+
+// instanceNewResponseJSON contains the JSON metadata for the struct
+// [InstanceNewResponse]
+type instanceNewResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CreatedAt apijson.Field
+ InternalID apijson.Field
+ ModifiedAt apijson.Field
+ Source apijson.Field
+ TokenID apijson.Field
+ Type apijson.Field
+ VectorizeName apijson.Field
+ AIGatewayID apijson.Field
+ AISearchModel apijson.Field
+ Cache apijson.Field
+ CacheThreshold apijson.Field
+ Chunk apijson.Field
+ ChunkOverlap apijson.Field
+ ChunkSize apijson.Field
+ CreatedBy apijson.Field
+ EmbeddingModel apijson.Field
+ Enable apijson.Field
+ EngineVersion apijson.Field
+ LastActivity apijson.Field
+ MaxNumResults apijson.Field
+ Metadata apijson.Field
+ ModifiedBy apijson.Field
+ Paused apijson.Field
+ Reranking apijson.Field
+ RerankingModel apijson.Field
+ RewriteModel apijson.Field
+ RewriteQuery apijson.Field
+ ScoreThreshold apijson.Field
+ SourceParams apijson.Field
+ Status apijson.Field
+ Summarization apijson.Field
+ SummarizationModel apijson.Field
+ SystemPromptAISearch apijson.Field
+ SystemPromptIndexSummarization apijson.Field
+ SystemPromptRewriteQuery apijson.Field
+ VectorizeActiveNamespace apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceNewResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceNewResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceNewResponseType string
+
+const (
+ InstanceNewResponseTypeR2 InstanceNewResponseType = "r2"
+ InstanceNewResponseTypeWebCrawler InstanceNewResponseType = "web-crawler"
+)
+
+func (r InstanceNewResponseType) IsKnown() bool {
+ switch r {
+ case InstanceNewResponseTypeR2, InstanceNewResponseTypeWebCrawler:
+ return true
+ }
+ return false
+}
+
+type InstanceNewResponseAISearchModel string
+
+const (
+ InstanceNewResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceNewResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceNewResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceNewResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceNewResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceNewResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceNewResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceNewResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceNewResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceNewResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceNewResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceNewResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceNewResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceNewResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceNewResponseAISearchModelAnthropicClaude3_7Sonnet InstanceNewResponseAISearchModel = "anthropic/claude-3-7-sonnet"
+ InstanceNewResponseAISearchModelAnthropicClaudeSonnet4 InstanceNewResponseAISearchModel = "anthropic/claude-sonnet-4"
+ InstanceNewResponseAISearchModelAnthropicClaudeOpus4 InstanceNewResponseAISearchModel = "anthropic/claude-opus-4"
+ InstanceNewResponseAISearchModelAnthropicClaude3_5Haiku InstanceNewResponseAISearchModel = "anthropic/claude-3-5-haiku"
+ InstanceNewResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceNewResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceNewResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceNewResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceNewResponseAISearchModelCerebrasLlama3_3_70b InstanceNewResponseAISearchModel = "cerebras/llama-3.3-70b"
+ InstanceNewResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceNewResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceNewResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceNewResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceNewResponseAISearchModelCerebrasGptOSs120b InstanceNewResponseAISearchModel = "cerebras/gpt-oss-120b"
+ InstanceNewResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceNewResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceNewResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceNewResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceNewResponseAISearchModelGrokGrok4 InstanceNewResponseAISearchModel = "grok/grok-4"
+ InstanceNewResponseAISearchModelGroqLlama3_3_70bVersatile InstanceNewResponseAISearchModel = "groq/llama-3.3-70b-versatile"
+ InstanceNewResponseAISearchModelGroqLlama3_1_8bInstant InstanceNewResponseAISearchModel = "groq/llama-3.1-8b-instant"
+ InstanceNewResponseAISearchModelOpenAIGpt5 InstanceNewResponseAISearchModel = "openai/gpt-5"
+ InstanceNewResponseAISearchModelOpenAIGpt5Mini InstanceNewResponseAISearchModel = "openai/gpt-5-mini"
+ InstanceNewResponseAISearchModelOpenAIGpt5Nano InstanceNewResponseAISearchModel = "openai/gpt-5-nano"
+ InstanceNewResponseAISearchModelEmpty InstanceNewResponseAISearchModel = ""
+)
+
+func (r InstanceNewResponseAISearchModel) IsKnown() bool {
+ switch r {
+ case InstanceNewResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceNewResponseAISearchModelCfMetaLlama3_1_8bInstructFast, InstanceNewResponseAISearchModelCfMetaLlama3_1_8bInstructFp8, InstanceNewResponseAISearchModelCfMetaLlama4Scout17b16eInstruct, InstanceNewResponseAISearchModelCfQwenQwen3_30bA3bFp8, InstanceNewResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceNewResponseAISearchModelCfMoonshotaiKimiK2Instruct, InstanceNewResponseAISearchModelAnthropicClaude3_7Sonnet, InstanceNewResponseAISearchModelAnthropicClaudeSonnet4, InstanceNewResponseAISearchModelAnthropicClaudeOpus4, InstanceNewResponseAISearchModelAnthropicClaude3_5Haiku, InstanceNewResponseAISearchModelCerebrasQwen3_235bA22bInstruct, InstanceNewResponseAISearchModelCerebrasQwen3_235bA22bThinking, InstanceNewResponseAISearchModelCerebrasLlama3_3_70b, InstanceNewResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct, InstanceNewResponseAISearchModelCerebrasLlama4Scout17b16eInstruct, InstanceNewResponseAISearchModelCerebrasGptOSs120b, InstanceNewResponseAISearchModelGoogleAIStudioGemini2_5Flash, InstanceNewResponseAISearchModelGoogleAIStudioGemini2_5Pro, InstanceNewResponseAISearchModelGrokGrok4, InstanceNewResponseAISearchModelGroqLlama3_3_70bVersatile, InstanceNewResponseAISearchModelGroqLlama3_1_8bInstant, InstanceNewResponseAISearchModelOpenAIGpt5, InstanceNewResponseAISearchModelOpenAIGpt5Mini, InstanceNewResponseAISearchModelOpenAIGpt5Nano, InstanceNewResponseAISearchModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceNewResponseCacheThreshold string
+
+const (
+ InstanceNewResponseCacheThresholdSuperStrictMatch InstanceNewResponseCacheThreshold = "super_strict_match"
+ InstanceNewResponseCacheThresholdCloseEnough InstanceNewResponseCacheThreshold = "close_enough"
+ InstanceNewResponseCacheThresholdFlexibleFriend InstanceNewResponseCacheThreshold = "flexible_friend"
+ InstanceNewResponseCacheThresholdAnythingGoes InstanceNewResponseCacheThreshold = "anything_goes"
+)
+
+func (r InstanceNewResponseCacheThreshold) IsKnown() bool {
+ switch r {
+ case InstanceNewResponseCacheThresholdSuperStrictMatch, InstanceNewResponseCacheThresholdCloseEnough, InstanceNewResponseCacheThresholdFlexibleFriend, InstanceNewResponseCacheThresholdAnythingGoes:
+ return true
+ }
+ return false
+}
+
+type InstanceNewResponseEmbeddingModel string
+
+const (
+ InstanceNewResponseEmbeddingModelCfBaaiBgeM3 InstanceNewResponseEmbeddingModel = "@cf/baai/bge-m3"
+ InstanceNewResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceNewResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
+ InstanceNewResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceNewResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
+ InstanceNewResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceNewResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
+ InstanceNewResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceNewResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
+ InstanceNewResponseEmbeddingModelOpenAITextEmbedding3Small InstanceNewResponseEmbeddingModel = "openai/text-embedding-3-small"
+ InstanceNewResponseEmbeddingModelOpenAITextEmbedding3Large InstanceNewResponseEmbeddingModel = "openai/text-embedding-3-large"
+ InstanceNewResponseEmbeddingModelEmpty InstanceNewResponseEmbeddingModel = ""
+)
+
+func (r InstanceNewResponseEmbeddingModel) IsKnown() bool {
+ switch r {
+ case InstanceNewResponseEmbeddingModelCfBaaiBgeM3, InstanceNewResponseEmbeddingModelCfBaaiBgeLargeEnV1_5, InstanceNewResponseEmbeddingModelCfGoogleEmbeddinggemma300m, InstanceNewResponseEmbeddingModelCfQwenQwen3Embedding0_6b, InstanceNewResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001, InstanceNewResponseEmbeddingModelOpenAITextEmbedding3Small, InstanceNewResponseEmbeddingModelOpenAITextEmbedding3Large, InstanceNewResponseEmbeddingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceNewResponseMetadata struct {
+ CreatedFromAISearchWizard bool `json:"created_from_aisearch_wizard"`
+ WorkerDomain string `json:"worker_domain"`
+ JSON instanceNewResponseMetadataJSON `json:"-"`
+}
+
+// instanceNewResponseMetadataJSON contains the JSON metadata for the struct
+// [InstanceNewResponseMetadata]
+type instanceNewResponseMetadataJSON struct {
+ CreatedFromAISearchWizard apijson.Field
+ WorkerDomain apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceNewResponseMetadata) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceNewResponseMetadataJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceNewResponseRerankingModel string
+
+const (
+ InstanceNewResponseRerankingModelCfBaaiBgeRerankerBase InstanceNewResponseRerankingModel = "@cf/baai/bge-reranker-base"
+ InstanceNewResponseRerankingModelEmpty InstanceNewResponseRerankingModel = ""
+)
+
+func (r InstanceNewResponseRerankingModel) IsKnown() bool {
+ switch r {
+ case InstanceNewResponseRerankingModelCfBaaiBgeRerankerBase, InstanceNewResponseRerankingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceNewResponseRewriteModel string
+
+const (
+ InstanceNewResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceNewResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceNewResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceNewResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceNewResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceNewResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceNewResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceNewResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceNewResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceNewResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceNewResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceNewResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceNewResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceNewResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceNewResponseRewriteModelAnthropicClaude3_7Sonnet InstanceNewResponseRewriteModel = "anthropic/claude-3-7-sonnet"
+ InstanceNewResponseRewriteModelAnthropicClaudeSonnet4 InstanceNewResponseRewriteModel = "anthropic/claude-sonnet-4"
+ InstanceNewResponseRewriteModelAnthropicClaudeOpus4 InstanceNewResponseRewriteModel = "anthropic/claude-opus-4"
+ InstanceNewResponseRewriteModelAnthropicClaude3_5Haiku InstanceNewResponseRewriteModel = "anthropic/claude-3-5-haiku"
+ InstanceNewResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceNewResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceNewResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceNewResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceNewResponseRewriteModelCerebrasLlama3_3_70b InstanceNewResponseRewriteModel = "cerebras/llama-3.3-70b"
+ InstanceNewResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceNewResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceNewResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceNewResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceNewResponseRewriteModelCerebrasGptOSs120b InstanceNewResponseRewriteModel = "cerebras/gpt-oss-120b"
+ InstanceNewResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceNewResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceNewResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceNewResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceNewResponseRewriteModelGrokGrok4 InstanceNewResponseRewriteModel = "grok/grok-4"
+ InstanceNewResponseRewriteModelGroqLlama3_3_70bVersatile InstanceNewResponseRewriteModel = "groq/llama-3.3-70b-versatile"
+ InstanceNewResponseRewriteModelGroqLlama3_1_8bInstant InstanceNewResponseRewriteModel = "groq/llama-3.1-8b-instant"
+ InstanceNewResponseRewriteModelOpenAIGpt5 InstanceNewResponseRewriteModel = "openai/gpt-5"
+ InstanceNewResponseRewriteModelOpenAIGpt5Mini InstanceNewResponseRewriteModel = "openai/gpt-5-mini"
+ InstanceNewResponseRewriteModelOpenAIGpt5Nano InstanceNewResponseRewriteModel = "openai/gpt-5-nano"
+ InstanceNewResponseRewriteModelEmpty InstanceNewResponseRewriteModel = ""
+)
+
+func (r InstanceNewResponseRewriteModel) IsKnown() bool {
+ switch r {
+ case InstanceNewResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceNewResponseRewriteModelCfMetaLlama3_1_8bInstructFast, InstanceNewResponseRewriteModelCfMetaLlama3_1_8bInstructFp8, InstanceNewResponseRewriteModelCfMetaLlama4Scout17b16eInstruct, InstanceNewResponseRewriteModelCfQwenQwen3_30bA3bFp8, InstanceNewResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceNewResponseRewriteModelCfMoonshotaiKimiK2Instruct, InstanceNewResponseRewriteModelAnthropicClaude3_7Sonnet, InstanceNewResponseRewriteModelAnthropicClaudeSonnet4, InstanceNewResponseRewriteModelAnthropicClaudeOpus4, InstanceNewResponseRewriteModelAnthropicClaude3_5Haiku, InstanceNewResponseRewriteModelCerebrasQwen3_235bA22bInstruct, InstanceNewResponseRewriteModelCerebrasQwen3_235bA22bThinking, InstanceNewResponseRewriteModelCerebrasLlama3_3_70b, InstanceNewResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct, InstanceNewResponseRewriteModelCerebrasLlama4Scout17b16eInstruct, InstanceNewResponseRewriteModelCerebrasGptOSs120b, InstanceNewResponseRewriteModelGoogleAIStudioGemini2_5Flash, InstanceNewResponseRewriteModelGoogleAIStudioGemini2_5Pro, InstanceNewResponseRewriteModelGrokGrok4, InstanceNewResponseRewriteModelGroqLlama3_3_70bVersatile, InstanceNewResponseRewriteModelGroqLlama3_1_8bInstant, InstanceNewResponseRewriteModelOpenAIGpt5, InstanceNewResponseRewriteModelOpenAIGpt5Mini, InstanceNewResponseRewriteModelOpenAIGpt5Nano, InstanceNewResponseRewriteModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceNewResponseSourceParams struct {
+ // List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ // /private/\*_, _\private\*)
+ ExcludeItems []string `json:"exclude_items"`
+ // List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ // /docs/\*_, _\blog\*.html)
+ IncludeItems []string `json:"include_items"`
+ Prefix string `json:"prefix"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ WebCrawler InstanceNewResponseSourceParamsWebCrawler `json:"web_crawler"`
+ JSON instanceNewResponseSourceParamsJSON `json:"-"`
+}
+
+// instanceNewResponseSourceParamsJSON contains the JSON metadata for the struct
+// [InstanceNewResponseSourceParams]
+type instanceNewResponseSourceParamsJSON struct {
+ ExcludeItems apijson.Field
+ IncludeItems apijson.Field
+ Prefix apijson.Field
+ R2Jurisdiction apijson.Field
+ WebCrawler apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceNewResponseSourceParams) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceNewResponseSourceParamsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceNewResponseSourceParamsWebCrawler struct {
+ ParseOptions InstanceNewResponseSourceParamsWebCrawlerParseOptions `json:"parse_options"`
+ ParseType InstanceNewResponseSourceParamsWebCrawlerParseType `json:"parse_type"`
+ StoreOptions InstanceNewResponseSourceParamsWebCrawlerStoreOptions `json:"store_options"`
+ JSON instanceNewResponseSourceParamsWebCrawlerJSON `json:"-"`
+}
+
+// instanceNewResponseSourceParamsWebCrawlerJSON contains the JSON metadata for the
+// struct [InstanceNewResponseSourceParamsWebCrawler]
+type instanceNewResponseSourceParamsWebCrawlerJSON struct {
+ ParseOptions apijson.Field
+ ParseType apijson.Field
+ StoreOptions apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceNewResponseSourceParamsWebCrawler) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceNewResponseSourceParamsWebCrawlerJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceNewResponseSourceParamsWebCrawlerParseOptions struct {
+ IncludeHeaders map[string]string `json:"include_headers"`
+ IncludeImages bool `json:"include_images"`
+ UseBrowserRendering bool `json:"use_browser_rendering"`
+ JSON instanceNewResponseSourceParamsWebCrawlerParseOptionsJSON `json:"-"`
+}
+
+// instanceNewResponseSourceParamsWebCrawlerParseOptionsJSON contains the JSON
+// metadata for the struct [InstanceNewResponseSourceParamsWebCrawlerParseOptions]
+type instanceNewResponseSourceParamsWebCrawlerParseOptionsJSON struct {
+ IncludeHeaders apijson.Field
+ IncludeImages apijson.Field
+ UseBrowserRendering apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceNewResponseSourceParamsWebCrawlerParseOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceNewResponseSourceParamsWebCrawlerParseOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceNewResponseSourceParamsWebCrawlerParseType string
+
+const (
+ InstanceNewResponseSourceParamsWebCrawlerParseTypeSitemap InstanceNewResponseSourceParamsWebCrawlerParseType = "sitemap"
+ InstanceNewResponseSourceParamsWebCrawlerParseTypeFeedRss InstanceNewResponseSourceParamsWebCrawlerParseType = "feed-rss"
+)
+
+func (r InstanceNewResponseSourceParamsWebCrawlerParseType) IsKnown() bool {
+ switch r {
+ case InstanceNewResponseSourceParamsWebCrawlerParseTypeSitemap, InstanceNewResponseSourceParamsWebCrawlerParseTypeFeedRss:
+ return true
+ }
+ return false
+}
+
+type InstanceNewResponseSourceParamsWebCrawlerStoreOptions struct {
+ StorageID string `json:"storage_id,required"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ StorageType r2.Provider `json:"storage_type"`
+ JSON instanceNewResponseSourceParamsWebCrawlerStoreOptionsJSON `json:"-"`
+}
+
+// instanceNewResponseSourceParamsWebCrawlerStoreOptionsJSON contains the JSON
+// metadata for the struct [InstanceNewResponseSourceParamsWebCrawlerStoreOptions]
+type instanceNewResponseSourceParamsWebCrawlerStoreOptionsJSON struct {
+ StorageID apijson.Field
+ R2Jurisdiction apijson.Field
+ StorageType apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceNewResponseSourceParamsWebCrawlerStoreOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceNewResponseSourceParamsWebCrawlerStoreOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceNewResponseSummarizationModel string
+
+const (
+ InstanceNewResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast InstanceNewResponseSummarizationModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceNewResponseSummarizationModelCfMetaLlama3_1_8bInstructFast InstanceNewResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceNewResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8 InstanceNewResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceNewResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct InstanceNewResponseSummarizationModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceNewResponseSummarizationModelCfQwenQwen3_30bA3bFp8 InstanceNewResponseSummarizationModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceNewResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceNewResponseSummarizationModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceNewResponseSummarizationModelCfMoonshotaiKimiK2Instruct InstanceNewResponseSummarizationModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceNewResponseSummarizationModelAnthropicClaude3_7Sonnet InstanceNewResponseSummarizationModel = "anthropic/claude-3-7-sonnet"
+ InstanceNewResponseSummarizationModelAnthropicClaudeSonnet4 InstanceNewResponseSummarizationModel = "anthropic/claude-sonnet-4"
+ InstanceNewResponseSummarizationModelAnthropicClaudeOpus4 InstanceNewResponseSummarizationModel = "anthropic/claude-opus-4"
+ InstanceNewResponseSummarizationModelAnthropicClaude3_5Haiku InstanceNewResponseSummarizationModel = "anthropic/claude-3-5-haiku"
+ InstanceNewResponseSummarizationModelCerebrasQwen3_235bA22bInstruct InstanceNewResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceNewResponseSummarizationModelCerebrasQwen3_235bA22bThinking InstanceNewResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceNewResponseSummarizationModelCerebrasLlama3_3_70b InstanceNewResponseSummarizationModel = "cerebras/llama-3.3-70b"
+ InstanceNewResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct InstanceNewResponseSummarizationModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceNewResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct InstanceNewResponseSummarizationModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceNewResponseSummarizationModelCerebrasGptOSs120b InstanceNewResponseSummarizationModel = "cerebras/gpt-oss-120b"
+ InstanceNewResponseSummarizationModelGoogleAIStudioGemini2_5Flash InstanceNewResponseSummarizationModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceNewResponseSummarizationModelGoogleAIStudioGemini2_5Pro InstanceNewResponseSummarizationModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceNewResponseSummarizationModelGrokGrok4 InstanceNewResponseSummarizationModel = "grok/grok-4"
+ InstanceNewResponseSummarizationModelGroqLlama3_3_70bVersatile InstanceNewResponseSummarizationModel = "groq/llama-3.3-70b-versatile"
+ InstanceNewResponseSummarizationModelGroqLlama3_1_8bInstant InstanceNewResponseSummarizationModel = "groq/llama-3.1-8b-instant"
+ InstanceNewResponseSummarizationModelOpenAIGpt5 InstanceNewResponseSummarizationModel = "openai/gpt-5"
+ InstanceNewResponseSummarizationModelOpenAIGpt5Mini InstanceNewResponseSummarizationModel = "openai/gpt-5-mini"
+ InstanceNewResponseSummarizationModelOpenAIGpt5Nano InstanceNewResponseSummarizationModel = "openai/gpt-5-nano"
+ InstanceNewResponseSummarizationModelEmpty InstanceNewResponseSummarizationModel = ""
+)
+
+func (r InstanceNewResponseSummarizationModel) IsKnown() bool {
+ switch r {
+ case InstanceNewResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceNewResponseSummarizationModelCfMetaLlama3_1_8bInstructFast, InstanceNewResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8, InstanceNewResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct, InstanceNewResponseSummarizationModelCfQwenQwen3_30bA3bFp8, InstanceNewResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceNewResponseSummarizationModelCfMoonshotaiKimiK2Instruct, InstanceNewResponseSummarizationModelAnthropicClaude3_7Sonnet, InstanceNewResponseSummarizationModelAnthropicClaudeSonnet4, InstanceNewResponseSummarizationModelAnthropicClaudeOpus4, InstanceNewResponseSummarizationModelAnthropicClaude3_5Haiku, InstanceNewResponseSummarizationModelCerebrasQwen3_235bA22bInstruct, InstanceNewResponseSummarizationModelCerebrasQwen3_235bA22bThinking, InstanceNewResponseSummarizationModelCerebrasLlama3_3_70b, InstanceNewResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct, InstanceNewResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct, InstanceNewResponseSummarizationModelCerebrasGptOSs120b, InstanceNewResponseSummarizationModelGoogleAIStudioGemini2_5Flash, InstanceNewResponseSummarizationModelGoogleAIStudioGemini2_5Pro, InstanceNewResponseSummarizationModelGrokGrok4, InstanceNewResponseSummarizationModelGroqLlama3_3_70bVersatile, InstanceNewResponseSummarizationModelGroqLlama3_1_8bInstant, InstanceNewResponseSummarizationModelOpenAIGpt5, InstanceNewResponseSummarizationModelOpenAIGpt5Mini, InstanceNewResponseSummarizationModelOpenAIGpt5Nano, InstanceNewResponseSummarizationModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateResponse struct {
+ // Use your AI Search ID.
+ ID string `json:"id,required"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ InternalID string `json:"internal_id,required" format:"uuid"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Source string `json:"source,required"`
+ TokenID string `json:"token_id,required" format:"uuid"`
+ Type InstanceUpdateResponseType `json:"type,required"`
+ VectorizeName string `json:"vectorize_name,required"`
+ AIGatewayID string `json:"ai_gateway_id"`
+ AISearchModel InstanceUpdateResponseAISearchModel `json:"ai_search_model"`
+ Cache bool `json:"cache"`
+ CacheThreshold InstanceUpdateResponseCacheThreshold `json:"cache_threshold"`
+ Chunk bool `json:"chunk"`
+ ChunkOverlap int64 `json:"chunk_overlap"`
+ ChunkSize int64 `json:"chunk_size"`
+ CreatedBy string `json:"created_by"`
+ EmbeddingModel InstanceUpdateResponseEmbeddingModel `json:"embedding_model"`
+ Enable bool `json:"enable"`
+ EngineVersion float64 `json:"engine_version"`
+ LastActivity time.Time `json:"last_activity" format:"date-time"`
+ MaxNumResults int64 `json:"max_num_results"`
+ Metadata InstanceUpdateResponseMetadata `json:"metadata"`
+ ModifiedBy string `json:"modified_by"`
+ Paused bool `json:"paused"`
+ Reranking bool `json:"reranking"`
+ RerankingModel InstanceUpdateResponseRerankingModel `json:"reranking_model"`
+ RewriteModel InstanceUpdateResponseRewriteModel `json:"rewrite_model"`
+ RewriteQuery bool `json:"rewrite_query"`
+ ScoreThreshold float64 `json:"score_threshold"`
+ SourceParams InstanceUpdateResponseSourceParams `json:"source_params"`
+ Status string `json:"status"`
+ Summarization bool `json:"summarization"`
+ SummarizationModel InstanceUpdateResponseSummarizationModel `json:"summarization_model"`
+ SystemPromptAISearch string `json:"system_prompt_ai_search"`
+ SystemPromptIndexSummarization string `json:"system_prompt_index_summarization"`
+ SystemPromptRewriteQuery string `json:"system_prompt_rewrite_query"`
+ VectorizeActiveNamespace string `json:"vectorize_active_namespace"`
+ JSON instanceUpdateResponseJSON `json:"-"`
+}
+
+// instanceUpdateResponseJSON contains the JSON metadata for the struct
+// [InstanceUpdateResponse]
+type instanceUpdateResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CreatedAt apijson.Field
+ InternalID apijson.Field
+ ModifiedAt apijson.Field
+ Source apijson.Field
+ TokenID apijson.Field
+ Type apijson.Field
+ VectorizeName apijson.Field
+ AIGatewayID apijson.Field
+ AISearchModel apijson.Field
+ Cache apijson.Field
+ CacheThreshold apijson.Field
+ Chunk apijson.Field
+ ChunkOverlap apijson.Field
+ ChunkSize apijson.Field
+ CreatedBy apijson.Field
+ EmbeddingModel apijson.Field
+ Enable apijson.Field
+ EngineVersion apijson.Field
+ LastActivity apijson.Field
+ MaxNumResults apijson.Field
+ Metadata apijson.Field
+ ModifiedBy apijson.Field
+ Paused apijson.Field
+ Reranking apijson.Field
+ RerankingModel apijson.Field
+ RewriteModel apijson.Field
+ RewriteQuery apijson.Field
+ ScoreThreshold apijson.Field
+ SourceParams apijson.Field
+ Status apijson.Field
+ Summarization apijson.Field
+ SummarizationModel apijson.Field
+ SystemPromptAISearch apijson.Field
+ SystemPromptIndexSummarization apijson.Field
+ SystemPromptRewriteQuery apijson.Field
+ VectorizeActiveNamespace apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceUpdateResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceUpdateResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceUpdateResponseType string
+
+const (
+ InstanceUpdateResponseTypeR2 InstanceUpdateResponseType = "r2"
+ InstanceUpdateResponseTypeWebCrawler InstanceUpdateResponseType = "web-crawler"
+)
+
+func (r InstanceUpdateResponseType) IsKnown() bool {
+ switch r {
+ case InstanceUpdateResponseTypeR2, InstanceUpdateResponseTypeWebCrawler:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateResponseAISearchModel string
+
+const (
+ InstanceUpdateResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceUpdateResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceUpdateResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceUpdateResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceUpdateResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceUpdateResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceUpdateResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceUpdateResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceUpdateResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceUpdateResponseAISearchModelAnthropicClaude3_7Sonnet InstanceUpdateResponseAISearchModel = "anthropic/claude-3-7-sonnet"
+ InstanceUpdateResponseAISearchModelAnthropicClaudeSonnet4 InstanceUpdateResponseAISearchModel = "anthropic/claude-sonnet-4"
+ InstanceUpdateResponseAISearchModelAnthropicClaudeOpus4 InstanceUpdateResponseAISearchModel = "anthropic/claude-opus-4"
+ InstanceUpdateResponseAISearchModelAnthropicClaude3_5Haiku InstanceUpdateResponseAISearchModel = "anthropic/claude-3-5-haiku"
+ InstanceUpdateResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceUpdateResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceUpdateResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceUpdateResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceUpdateResponseAISearchModelCerebrasLlama3_3_70b InstanceUpdateResponseAISearchModel = "cerebras/llama-3.3-70b"
+ InstanceUpdateResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceUpdateResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateResponseAISearchModelCerebrasGptOSs120b InstanceUpdateResponseAISearchModel = "cerebras/gpt-oss-120b"
+ InstanceUpdateResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceUpdateResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceUpdateResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceUpdateResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceUpdateResponseAISearchModelGrokGrok4 InstanceUpdateResponseAISearchModel = "grok/grok-4"
+ InstanceUpdateResponseAISearchModelGroqLlama3_3_70bVersatile InstanceUpdateResponseAISearchModel = "groq/llama-3.3-70b-versatile"
+ InstanceUpdateResponseAISearchModelGroqLlama3_1_8bInstant InstanceUpdateResponseAISearchModel = "groq/llama-3.1-8b-instant"
+ InstanceUpdateResponseAISearchModelOpenAIGpt5 InstanceUpdateResponseAISearchModel = "openai/gpt-5"
+ InstanceUpdateResponseAISearchModelOpenAIGpt5Mini InstanceUpdateResponseAISearchModel = "openai/gpt-5-mini"
+ InstanceUpdateResponseAISearchModelOpenAIGpt5Nano InstanceUpdateResponseAISearchModel = "openai/gpt-5-nano"
+ InstanceUpdateResponseAISearchModelEmpty InstanceUpdateResponseAISearchModel = ""
+)
+
+func (r InstanceUpdateResponseAISearchModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceUpdateResponseAISearchModelCfMetaLlama3_1_8bInstructFast, InstanceUpdateResponseAISearchModelCfMetaLlama3_1_8bInstructFp8, InstanceUpdateResponseAISearchModelCfMetaLlama4Scout17b16eInstruct, InstanceUpdateResponseAISearchModelCfQwenQwen3_30bA3bFp8, InstanceUpdateResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceUpdateResponseAISearchModelCfMoonshotaiKimiK2Instruct, InstanceUpdateResponseAISearchModelAnthropicClaude3_7Sonnet, InstanceUpdateResponseAISearchModelAnthropicClaudeSonnet4, InstanceUpdateResponseAISearchModelAnthropicClaudeOpus4, InstanceUpdateResponseAISearchModelAnthropicClaude3_5Haiku, InstanceUpdateResponseAISearchModelCerebrasQwen3_235bA22bInstruct, InstanceUpdateResponseAISearchModelCerebrasQwen3_235bA22bThinking, InstanceUpdateResponseAISearchModelCerebrasLlama3_3_70b, InstanceUpdateResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct, InstanceUpdateResponseAISearchModelCerebrasLlama4Scout17b16eInstruct, InstanceUpdateResponseAISearchModelCerebrasGptOSs120b, InstanceUpdateResponseAISearchModelGoogleAIStudioGemini2_5Flash, InstanceUpdateResponseAISearchModelGoogleAIStudioGemini2_5Pro, InstanceUpdateResponseAISearchModelGrokGrok4, InstanceUpdateResponseAISearchModelGroqLlama3_3_70bVersatile, InstanceUpdateResponseAISearchModelGroqLlama3_1_8bInstant, InstanceUpdateResponseAISearchModelOpenAIGpt5, InstanceUpdateResponseAISearchModelOpenAIGpt5Mini, InstanceUpdateResponseAISearchModelOpenAIGpt5Nano, InstanceUpdateResponseAISearchModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateResponseCacheThreshold string
+
+const (
+ InstanceUpdateResponseCacheThresholdSuperStrictMatch InstanceUpdateResponseCacheThreshold = "super_strict_match"
+ InstanceUpdateResponseCacheThresholdCloseEnough InstanceUpdateResponseCacheThreshold = "close_enough"
+ InstanceUpdateResponseCacheThresholdFlexibleFriend InstanceUpdateResponseCacheThreshold = "flexible_friend"
+ InstanceUpdateResponseCacheThresholdAnythingGoes InstanceUpdateResponseCacheThreshold = "anything_goes"
+)
+
+func (r InstanceUpdateResponseCacheThreshold) IsKnown() bool {
+ switch r {
+ case InstanceUpdateResponseCacheThresholdSuperStrictMatch, InstanceUpdateResponseCacheThresholdCloseEnough, InstanceUpdateResponseCacheThresholdFlexibleFriend, InstanceUpdateResponseCacheThresholdAnythingGoes:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateResponseEmbeddingModel string
+
+const (
+ InstanceUpdateResponseEmbeddingModelCfBaaiBgeM3 InstanceUpdateResponseEmbeddingModel = "@cf/baai/bge-m3"
+ InstanceUpdateResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceUpdateResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
+ InstanceUpdateResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceUpdateResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
+ InstanceUpdateResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceUpdateResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
+ InstanceUpdateResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceUpdateResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
+ InstanceUpdateResponseEmbeddingModelOpenAITextEmbedding3Small InstanceUpdateResponseEmbeddingModel = "openai/text-embedding-3-small"
+ InstanceUpdateResponseEmbeddingModelOpenAITextEmbedding3Large InstanceUpdateResponseEmbeddingModel = "openai/text-embedding-3-large"
+ InstanceUpdateResponseEmbeddingModelEmpty InstanceUpdateResponseEmbeddingModel = ""
+)
+
+func (r InstanceUpdateResponseEmbeddingModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateResponseEmbeddingModelCfBaaiBgeM3, InstanceUpdateResponseEmbeddingModelCfBaaiBgeLargeEnV1_5, InstanceUpdateResponseEmbeddingModelCfGoogleEmbeddinggemma300m, InstanceUpdateResponseEmbeddingModelCfQwenQwen3Embedding0_6b, InstanceUpdateResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001, InstanceUpdateResponseEmbeddingModelOpenAITextEmbedding3Small, InstanceUpdateResponseEmbeddingModelOpenAITextEmbedding3Large, InstanceUpdateResponseEmbeddingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateResponseMetadata struct {
+ CreatedFromAISearchWizard bool `json:"created_from_aisearch_wizard"`
+ WorkerDomain string `json:"worker_domain"`
+ JSON instanceUpdateResponseMetadataJSON `json:"-"`
+}
+
+// instanceUpdateResponseMetadataJSON contains the JSON metadata for the struct
+// [InstanceUpdateResponseMetadata]
+type instanceUpdateResponseMetadataJSON struct {
+ CreatedFromAISearchWizard apijson.Field
+ WorkerDomain apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceUpdateResponseMetadata) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceUpdateResponseMetadataJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceUpdateResponseRerankingModel string
+
+const (
+ InstanceUpdateResponseRerankingModelCfBaaiBgeRerankerBase InstanceUpdateResponseRerankingModel = "@cf/baai/bge-reranker-base"
+ InstanceUpdateResponseRerankingModelEmpty InstanceUpdateResponseRerankingModel = ""
+)
+
+func (r InstanceUpdateResponseRerankingModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateResponseRerankingModelCfBaaiBgeRerankerBase, InstanceUpdateResponseRerankingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateResponseRewriteModel string
+
+const (
+ InstanceUpdateResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceUpdateResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceUpdateResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceUpdateResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceUpdateResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceUpdateResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceUpdateResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceUpdateResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceUpdateResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceUpdateResponseRewriteModelAnthropicClaude3_7Sonnet InstanceUpdateResponseRewriteModel = "anthropic/claude-3-7-sonnet"
+ InstanceUpdateResponseRewriteModelAnthropicClaudeSonnet4 InstanceUpdateResponseRewriteModel = "anthropic/claude-sonnet-4"
+ InstanceUpdateResponseRewriteModelAnthropicClaudeOpus4 InstanceUpdateResponseRewriteModel = "anthropic/claude-opus-4"
+ InstanceUpdateResponseRewriteModelAnthropicClaude3_5Haiku InstanceUpdateResponseRewriteModel = "anthropic/claude-3-5-haiku"
+ InstanceUpdateResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceUpdateResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceUpdateResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceUpdateResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceUpdateResponseRewriteModelCerebrasLlama3_3_70b InstanceUpdateResponseRewriteModel = "cerebras/llama-3.3-70b"
+ InstanceUpdateResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceUpdateResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateResponseRewriteModelCerebrasGptOSs120b InstanceUpdateResponseRewriteModel = "cerebras/gpt-oss-120b"
+ InstanceUpdateResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceUpdateResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceUpdateResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceUpdateResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceUpdateResponseRewriteModelGrokGrok4 InstanceUpdateResponseRewriteModel = "grok/grok-4"
+ InstanceUpdateResponseRewriteModelGroqLlama3_3_70bVersatile InstanceUpdateResponseRewriteModel = "groq/llama-3.3-70b-versatile"
+ InstanceUpdateResponseRewriteModelGroqLlama3_1_8bInstant InstanceUpdateResponseRewriteModel = "groq/llama-3.1-8b-instant"
+ InstanceUpdateResponseRewriteModelOpenAIGpt5 InstanceUpdateResponseRewriteModel = "openai/gpt-5"
+ InstanceUpdateResponseRewriteModelOpenAIGpt5Mini InstanceUpdateResponseRewriteModel = "openai/gpt-5-mini"
+ InstanceUpdateResponseRewriteModelOpenAIGpt5Nano InstanceUpdateResponseRewriteModel = "openai/gpt-5-nano"
+ InstanceUpdateResponseRewriteModelEmpty InstanceUpdateResponseRewriteModel = ""
+)
+
+func (r InstanceUpdateResponseRewriteModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceUpdateResponseRewriteModelCfMetaLlama3_1_8bInstructFast, InstanceUpdateResponseRewriteModelCfMetaLlama3_1_8bInstructFp8, InstanceUpdateResponseRewriteModelCfMetaLlama4Scout17b16eInstruct, InstanceUpdateResponseRewriteModelCfQwenQwen3_30bA3bFp8, InstanceUpdateResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceUpdateResponseRewriteModelCfMoonshotaiKimiK2Instruct, InstanceUpdateResponseRewriteModelAnthropicClaude3_7Sonnet, InstanceUpdateResponseRewriteModelAnthropicClaudeSonnet4, InstanceUpdateResponseRewriteModelAnthropicClaudeOpus4, InstanceUpdateResponseRewriteModelAnthropicClaude3_5Haiku, InstanceUpdateResponseRewriteModelCerebrasQwen3_235bA22bInstruct, InstanceUpdateResponseRewriteModelCerebrasQwen3_235bA22bThinking, InstanceUpdateResponseRewriteModelCerebrasLlama3_3_70b, InstanceUpdateResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct, InstanceUpdateResponseRewriteModelCerebrasLlama4Scout17b16eInstruct, InstanceUpdateResponseRewriteModelCerebrasGptOSs120b, InstanceUpdateResponseRewriteModelGoogleAIStudioGemini2_5Flash, InstanceUpdateResponseRewriteModelGoogleAIStudioGemini2_5Pro, InstanceUpdateResponseRewriteModelGrokGrok4, InstanceUpdateResponseRewriteModelGroqLlama3_3_70bVersatile, InstanceUpdateResponseRewriteModelGroqLlama3_1_8bInstant, InstanceUpdateResponseRewriteModelOpenAIGpt5, InstanceUpdateResponseRewriteModelOpenAIGpt5Mini, InstanceUpdateResponseRewriteModelOpenAIGpt5Nano, InstanceUpdateResponseRewriteModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateResponseSourceParams struct {
+ // List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ // /private/\*_, _\private\*)
+ ExcludeItems []string `json:"exclude_items"`
+ // List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ // /docs/\*_, _\blog\*.html)
+ IncludeItems []string `json:"include_items"`
+ Prefix string `json:"prefix"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ WebCrawler InstanceUpdateResponseSourceParamsWebCrawler `json:"web_crawler"`
+ JSON instanceUpdateResponseSourceParamsJSON `json:"-"`
+}
+
+// instanceUpdateResponseSourceParamsJSON contains the JSON metadata for the struct
+// [InstanceUpdateResponseSourceParams]
+type instanceUpdateResponseSourceParamsJSON struct {
+ ExcludeItems apijson.Field
+ IncludeItems apijson.Field
+ Prefix apijson.Field
+ R2Jurisdiction apijson.Field
+ WebCrawler apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceUpdateResponseSourceParams) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceUpdateResponseSourceParamsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceUpdateResponseSourceParamsWebCrawler struct {
+ ParseOptions InstanceUpdateResponseSourceParamsWebCrawlerParseOptions `json:"parse_options"`
+ ParseType InstanceUpdateResponseSourceParamsWebCrawlerParseType `json:"parse_type"`
+ StoreOptions InstanceUpdateResponseSourceParamsWebCrawlerStoreOptions `json:"store_options"`
+ JSON instanceUpdateResponseSourceParamsWebCrawlerJSON `json:"-"`
+}
+
+// instanceUpdateResponseSourceParamsWebCrawlerJSON contains the JSON metadata for
+// the struct [InstanceUpdateResponseSourceParamsWebCrawler]
+type instanceUpdateResponseSourceParamsWebCrawlerJSON struct {
+ ParseOptions apijson.Field
+ ParseType apijson.Field
+ StoreOptions apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceUpdateResponseSourceParamsWebCrawler) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceUpdateResponseSourceParamsWebCrawlerJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceUpdateResponseSourceParamsWebCrawlerParseOptions struct {
+ IncludeHeaders map[string]string `json:"include_headers"`
+ IncludeImages bool `json:"include_images"`
+ UseBrowserRendering bool `json:"use_browser_rendering"`
+ JSON instanceUpdateResponseSourceParamsWebCrawlerParseOptionsJSON `json:"-"`
+}
+
+// instanceUpdateResponseSourceParamsWebCrawlerParseOptionsJSON contains the JSON
+// metadata for the struct
+// [InstanceUpdateResponseSourceParamsWebCrawlerParseOptions]
+type instanceUpdateResponseSourceParamsWebCrawlerParseOptionsJSON struct {
+ IncludeHeaders apijson.Field
+ IncludeImages apijson.Field
+ UseBrowserRendering apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceUpdateResponseSourceParamsWebCrawlerParseOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceUpdateResponseSourceParamsWebCrawlerParseOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceUpdateResponseSourceParamsWebCrawlerParseType string
+
+const (
+ InstanceUpdateResponseSourceParamsWebCrawlerParseTypeSitemap InstanceUpdateResponseSourceParamsWebCrawlerParseType = "sitemap"
+ InstanceUpdateResponseSourceParamsWebCrawlerParseTypeFeedRss InstanceUpdateResponseSourceParamsWebCrawlerParseType = "feed-rss"
+)
+
+func (r InstanceUpdateResponseSourceParamsWebCrawlerParseType) IsKnown() bool {
+ switch r {
+ case InstanceUpdateResponseSourceParamsWebCrawlerParseTypeSitemap, InstanceUpdateResponseSourceParamsWebCrawlerParseTypeFeedRss:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateResponseSourceParamsWebCrawlerStoreOptions struct {
+ StorageID string `json:"storage_id,required"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ StorageType r2.Provider `json:"storage_type"`
+ JSON instanceUpdateResponseSourceParamsWebCrawlerStoreOptionsJSON `json:"-"`
+}
+
+// instanceUpdateResponseSourceParamsWebCrawlerStoreOptionsJSON contains the JSON
+// metadata for the struct
+// [InstanceUpdateResponseSourceParamsWebCrawlerStoreOptions]
+type instanceUpdateResponseSourceParamsWebCrawlerStoreOptionsJSON struct {
+ StorageID apijson.Field
+ R2Jurisdiction apijson.Field
+ StorageType apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceUpdateResponseSourceParamsWebCrawlerStoreOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceUpdateResponseSourceParamsWebCrawlerStoreOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceUpdateResponseSummarizationModel string
+
+const (
+ InstanceUpdateResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateResponseSummarizationModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceUpdateResponseSummarizationModelCfMetaLlama3_1_8bInstructFast InstanceUpdateResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceUpdateResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceUpdateResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateResponseSummarizationModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateResponseSummarizationModelCfQwenQwen3_30bA3bFp8 InstanceUpdateResponseSummarizationModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceUpdateResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateResponseSummarizationModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceUpdateResponseSummarizationModelCfMoonshotaiKimiK2Instruct InstanceUpdateResponseSummarizationModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceUpdateResponseSummarizationModelAnthropicClaude3_7Sonnet InstanceUpdateResponseSummarizationModel = "anthropic/claude-3-7-sonnet"
+ InstanceUpdateResponseSummarizationModelAnthropicClaudeSonnet4 InstanceUpdateResponseSummarizationModel = "anthropic/claude-sonnet-4"
+ InstanceUpdateResponseSummarizationModelAnthropicClaudeOpus4 InstanceUpdateResponseSummarizationModel = "anthropic/claude-opus-4"
+ InstanceUpdateResponseSummarizationModelAnthropicClaude3_5Haiku InstanceUpdateResponseSummarizationModel = "anthropic/claude-3-5-haiku"
+ InstanceUpdateResponseSummarizationModelCerebrasQwen3_235bA22bInstruct InstanceUpdateResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceUpdateResponseSummarizationModelCerebrasQwen3_235bA22bThinking InstanceUpdateResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceUpdateResponseSummarizationModelCerebrasLlama3_3_70b InstanceUpdateResponseSummarizationModel = "cerebras/llama-3.3-70b"
+ InstanceUpdateResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateResponseSummarizationModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceUpdateResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateResponseSummarizationModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateResponseSummarizationModelCerebrasGptOSs120b InstanceUpdateResponseSummarizationModel = "cerebras/gpt-oss-120b"
+ InstanceUpdateResponseSummarizationModelGoogleAIStudioGemini2_5Flash InstanceUpdateResponseSummarizationModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceUpdateResponseSummarizationModelGoogleAIStudioGemini2_5Pro InstanceUpdateResponseSummarizationModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceUpdateResponseSummarizationModelGrokGrok4 InstanceUpdateResponseSummarizationModel = "grok/grok-4"
+ InstanceUpdateResponseSummarizationModelGroqLlama3_3_70bVersatile InstanceUpdateResponseSummarizationModel = "groq/llama-3.3-70b-versatile"
+ InstanceUpdateResponseSummarizationModelGroqLlama3_1_8bInstant InstanceUpdateResponseSummarizationModel = "groq/llama-3.1-8b-instant"
+ InstanceUpdateResponseSummarizationModelOpenAIGpt5 InstanceUpdateResponseSummarizationModel = "openai/gpt-5"
+ InstanceUpdateResponseSummarizationModelOpenAIGpt5Mini InstanceUpdateResponseSummarizationModel = "openai/gpt-5-mini"
+ InstanceUpdateResponseSummarizationModelOpenAIGpt5Nano InstanceUpdateResponseSummarizationModel = "openai/gpt-5-nano"
+ InstanceUpdateResponseSummarizationModelEmpty InstanceUpdateResponseSummarizationModel = ""
+)
+
+func (r InstanceUpdateResponseSummarizationModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceUpdateResponseSummarizationModelCfMetaLlama3_1_8bInstructFast, InstanceUpdateResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8, InstanceUpdateResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct, InstanceUpdateResponseSummarizationModelCfQwenQwen3_30bA3bFp8, InstanceUpdateResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceUpdateResponseSummarizationModelCfMoonshotaiKimiK2Instruct, InstanceUpdateResponseSummarizationModelAnthropicClaude3_7Sonnet, InstanceUpdateResponseSummarizationModelAnthropicClaudeSonnet4, InstanceUpdateResponseSummarizationModelAnthropicClaudeOpus4, InstanceUpdateResponseSummarizationModelAnthropicClaude3_5Haiku, InstanceUpdateResponseSummarizationModelCerebrasQwen3_235bA22bInstruct, InstanceUpdateResponseSummarizationModelCerebrasQwen3_235bA22bThinking, InstanceUpdateResponseSummarizationModelCerebrasLlama3_3_70b, InstanceUpdateResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct, InstanceUpdateResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct, InstanceUpdateResponseSummarizationModelCerebrasGptOSs120b, InstanceUpdateResponseSummarizationModelGoogleAIStudioGemini2_5Flash, InstanceUpdateResponseSummarizationModelGoogleAIStudioGemini2_5Pro, InstanceUpdateResponseSummarizationModelGrokGrok4, InstanceUpdateResponseSummarizationModelGroqLlama3_3_70bVersatile, InstanceUpdateResponseSummarizationModelGroqLlama3_1_8bInstant, InstanceUpdateResponseSummarizationModelOpenAIGpt5, InstanceUpdateResponseSummarizationModelOpenAIGpt5Mini, InstanceUpdateResponseSummarizationModelOpenAIGpt5Nano, InstanceUpdateResponseSummarizationModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceListResponse struct {
+ // Use your AI Search ID.
+ ID string `json:"id,required"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ InternalID string `json:"internal_id,required" format:"uuid"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Source string `json:"source,required"`
+ TokenID string `json:"token_id,required" format:"uuid"`
+ Type InstanceListResponseType `json:"type,required"`
+ VectorizeName string `json:"vectorize_name,required"`
+ AIGatewayID string `json:"ai_gateway_id"`
+ AISearchModel InstanceListResponseAISearchModel `json:"ai_search_model"`
+ Cache bool `json:"cache"`
+ CacheThreshold InstanceListResponseCacheThreshold `json:"cache_threshold"`
+ Chunk bool `json:"chunk"`
+ ChunkOverlap int64 `json:"chunk_overlap"`
+ ChunkSize int64 `json:"chunk_size"`
+ CreatedBy string `json:"created_by"`
+ EmbeddingModel InstanceListResponseEmbeddingModel `json:"embedding_model"`
+ Enable bool `json:"enable"`
+ EngineVersion float64 `json:"engine_version"`
+ LastActivity time.Time `json:"last_activity" format:"date-time"`
+ MaxNumResults int64 `json:"max_num_results"`
+ Metadata InstanceListResponseMetadata `json:"metadata"`
+ ModifiedBy string `json:"modified_by"`
+ Paused bool `json:"paused"`
+ Reranking bool `json:"reranking"`
+ RerankingModel InstanceListResponseRerankingModel `json:"reranking_model"`
+ RewriteModel InstanceListResponseRewriteModel `json:"rewrite_model"`
+ RewriteQuery bool `json:"rewrite_query"`
+ ScoreThreshold float64 `json:"score_threshold"`
+ SourceParams InstanceListResponseSourceParams `json:"source_params"`
+ Status string `json:"status"`
+ Summarization bool `json:"summarization"`
+ SummarizationModel InstanceListResponseSummarizationModel `json:"summarization_model"`
+ SystemPromptAISearch string `json:"system_prompt_ai_search"`
+ SystemPromptIndexSummarization string `json:"system_prompt_index_summarization"`
+ SystemPromptRewriteQuery string `json:"system_prompt_rewrite_query"`
+ VectorizeActiveNamespace string `json:"vectorize_active_namespace"`
+ JSON instanceListResponseJSON `json:"-"`
+}
+
+// instanceListResponseJSON contains the JSON metadata for the struct
+// [InstanceListResponse]
+type instanceListResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CreatedAt apijson.Field
+ InternalID apijson.Field
+ ModifiedAt apijson.Field
+ Source apijson.Field
+ TokenID apijson.Field
+ Type apijson.Field
+ VectorizeName apijson.Field
+ AIGatewayID apijson.Field
+ AISearchModel apijson.Field
+ Cache apijson.Field
+ CacheThreshold apijson.Field
+ Chunk apijson.Field
+ ChunkOverlap apijson.Field
+ ChunkSize apijson.Field
+ CreatedBy apijson.Field
+ EmbeddingModel apijson.Field
+ Enable apijson.Field
+ EngineVersion apijson.Field
+ LastActivity apijson.Field
+ MaxNumResults apijson.Field
+ Metadata apijson.Field
+ ModifiedBy apijson.Field
+ Paused apijson.Field
+ Reranking apijson.Field
+ RerankingModel apijson.Field
+ RewriteModel apijson.Field
+ RewriteQuery apijson.Field
+ ScoreThreshold apijson.Field
+ SourceParams apijson.Field
+ Status apijson.Field
+ Summarization apijson.Field
+ SummarizationModel apijson.Field
+ SystemPromptAISearch apijson.Field
+ SystemPromptIndexSummarization apijson.Field
+ SystemPromptRewriteQuery apijson.Field
+ VectorizeActiveNamespace apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceListResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceListResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceListResponseType string
+
+const (
+ InstanceListResponseTypeR2 InstanceListResponseType = "r2"
+ InstanceListResponseTypeWebCrawler InstanceListResponseType = "web-crawler"
+)
+
+func (r InstanceListResponseType) IsKnown() bool {
+ switch r {
+ case InstanceListResponseTypeR2, InstanceListResponseTypeWebCrawler:
+ return true
+ }
+ return false
+}
+
+type InstanceListResponseAISearchModel string
+
+const (
+ InstanceListResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceListResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceListResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceListResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceListResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceListResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceListResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceListResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceListResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceListResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceListResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceListResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceListResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceListResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceListResponseAISearchModelAnthropicClaude3_7Sonnet InstanceListResponseAISearchModel = "anthropic/claude-3-7-sonnet"
+ InstanceListResponseAISearchModelAnthropicClaudeSonnet4 InstanceListResponseAISearchModel = "anthropic/claude-sonnet-4"
+ InstanceListResponseAISearchModelAnthropicClaudeOpus4 InstanceListResponseAISearchModel = "anthropic/claude-opus-4"
+ InstanceListResponseAISearchModelAnthropicClaude3_5Haiku InstanceListResponseAISearchModel = "anthropic/claude-3-5-haiku"
+ InstanceListResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceListResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceListResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceListResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceListResponseAISearchModelCerebrasLlama3_3_70b InstanceListResponseAISearchModel = "cerebras/llama-3.3-70b"
+ InstanceListResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceListResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceListResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceListResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceListResponseAISearchModelCerebrasGptOSs120b InstanceListResponseAISearchModel = "cerebras/gpt-oss-120b"
+ InstanceListResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceListResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceListResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceListResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceListResponseAISearchModelGrokGrok4 InstanceListResponseAISearchModel = "grok/grok-4"
+ InstanceListResponseAISearchModelGroqLlama3_3_70bVersatile InstanceListResponseAISearchModel = "groq/llama-3.3-70b-versatile"
+ InstanceListResponseAISearchModelGroqLlama3_1_8bInstant InstanceListResponseAISearchModel = "groq/llama-3.1-8b-instant"
+ InstanceListResponseAISearchModelOpenAIGpt5 InstanceListResponseAISearchModel = "openai/gpt-5"
+ InstanceListResponseAISearchModelOpenAIGpt5Mini InstanceListResponseAISearchModel = "openai/gpt-5-mini"
+ InstanceListResponseAISearchModelOpenAIGpt5Nano InstanceListResponseAISearchModel = "openai/gpt-5-nano"
+ InstanceListResponseAISearchModelEmpty InstanceListResponseAISearchModel = ""
+)
+
+func (r InstanceListResponseAISearchModel) IsKnown() bool {
+ switch r {
+ case InstanceListResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceListResponseAISearchModelCfMetaLlama3_1_8bInstructFast, InstanceListResponseAISearchModelCfMetaLlama3_1_8bInstructFp8, InstanceListResponseAISearchModelCfMetaLlama4Scout17b16eInstruct, InstanceListResponseAISearchModelCfQwenQwen3_30bA3bFp8, InstanceListResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceListResponseAISearchModelCfMoonshotaiKimiK2Instruct, InstanceListResponseAISearchModelAnthropicClaude3_7Sonnet, InstanceListResponseAISearchModelAnthropicClaudeSonnet4, InstanceListResponseAISearchModelAnthropicClaudeOpus4, InstanceListResponseAISearchModelAnthropicClaude3_5Haiku, InstanceListResponseAISearchModelCerebrasQwen3_235bA22bInstruct, InstanceListResponseAISearchModelCerebrasQwen3_235bA22bThinking, InstanceListResponseAISearchModelCerebrasLlama3_3_70b, InstanceListResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct, InstanceListResponseAISearchModelCerebrasLlama4Scout17b16eInstruct, InstanceListResponseAISearchModelCerebrasGptOSs120b, InstanceListResponseAISearchModelGoogleAIStudioGemini2_5Flash, InstanceListResponseAISearchModelGoogleAIStudioGemini2_5Pro, InstanceListResponseAISearchModelGrokGrok4, InstanceListResponseAISearchModelGroqLlama3_3_70bVersatile, InstanceListResponseAISearchModelGroqLlama3_1_8bInstant, InstanceListResponseAISearchModelOpenAIGpt5, InstanceListResponseAISearchModelOpenAIGpt5Mini, InstanceListResponseAISearchModelOpenAIGpt5Nano, InstanceListResponseAISearchModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceListResponseCacheThreshold string
+
+const (
+ InstanceListResponseCacheThresholdSuperStrictMatch InstanceListResponseCacheThreshold = "super_strict_match"
+ InstanceListResponseCacheThresholdCloseEnough InstanceListResponseCacheThreshold = "close_enough"
+ InstanceListResponseCacheThresholdFlexibleFriend InstanceListResponseCacheThreshold = "flexible_friend"
+ InstanceListResponseCacheThresholdAnythingGoes InstanceListResponseCacheThreshold = "anything_goes"
+)
+
+func (r InstanceListResponseCacheThreshold) IsKnown() bool {
+ switch r {
+ case InstanceListResponseCacheThresholdSuperStrictMatch, InstanceListResponseCacheThresholdCloseEnough, InstanceListResponseCacheThresholdFlexibleFriend, InstanceListResponseCacheThresholdAnythingGoes:
+ return true
+ }
+ return false
+}
+
+type InstanceListResponseEmbeddingModel string
+
+const (
+ InstanceListResponseEmbeddingModelCfBaaiBgeM3 InstanceListResponseEmbeddingModel = "@cf/baai/bge-m3"
+ InstanceListResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceListResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
+ InstanceListResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceListResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
+ InstanceListResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceListResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
+ InstanceListResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceListResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
+ InstanceListResponseEmbeddingModelOpenAITextEmbedding3Small InstanceListResponseEmbeddingModel = "openai/text-embedding-3-small"
+ InstanceListResponseEmbeddingModelOpenAITextEmbedding3Large InstanceListResponseEmbeddingModel = "openai/text-embedding-3-large"
+ InstanceListResponseEmbeddingModelEmpty InstanceListResponseEmbeddingModel = ""
+)
+
+func (r InstanceListResponseEmbeddingModel) IsKnown() bool {
+ switch r {
+ case InstanceListResponseEmbeddingModelCfBaaiBgeM3, InstanceListResponseEmbeddingModelCfBaaiBgeLargeEnV1_5, InstanceListResponseEmbeddingModelCfGoogleEmbeddinggemma300m, InstanceListResponseEmbeddingModelCfQwenQwen3Embedding0_6b, InstanceListResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001, InstanceListResponseEmbeddingModelOpenAITextEmbedding3Small, InstanceListResponseEmbeddingModelOpenAITextEmbedding3Large, InstanceListResponseEmbeddingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceListResponseMetadata struct {
+ CreatedFromAISearchWizard bool `json:"created_from_aisearch_wizard"`
+ WorkerDomain string `json:"worker_domain"`
+ JSON instanceListResponseMetadataJSON `json:"-"`
+}
+
+// instanceListResponseMetadataJSON contains the JSON metadata for the struct
+// [InstanceListResponseMetadata]
+type instanceListResponseMetadataJSON struct {
+ CreatedFromAISearchWizard apijson.Field
+ WorkerDomain apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceListResponseMetadata) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceListResponseMetadataJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceListResponseRerankingModel string
+
+const (
+ InstanceListResponseRerankingModelCfBaaiBgeRerankerBase InstanceListResponseRerankingModel = "@cf/baai/bge-reranker-base"
+ InstanceListResponseRerankingModelEmpty InstanceListResponseRerankingModel = ""
+)
+
+func (r InstanceListResponseRerankingModel) IsKnown() bool {
+ switch r {
+ case InstanceListResponseRerankingModelCfBaaiBgeRerankerBase, InstanceListResponseRerankingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceListResponseRewriteModel string
+
+const (
+ InstanceListResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceListResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceListResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceListResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceListResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceListResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceListResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceListResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceListResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceListResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceListResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceListResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceListResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceListResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceListResponseRewriteModelAnthropicClaude3_7Sonnet InstanceListResponseRewriteModel = "anthropic/claude-3-7-sonnet"
+ InstanceListResponseRewriteModelAnthropicClaudeSonnet4 InstanceListResponseRewriteModel = "anthropic/claude-sonnet-4"
+ InstanceListResponseRewriteModelAnthropicClaudeOpus4 InstanceListResponseRewriteModel = "anthropic/claude-opus-4"
+ InstanceListResponseRewriteModelAnthropicClaude3_5Haiku InstanceListResponseRewriteModel = "anthropic/claude-3-5-haiku"
+ InstanceListResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceListResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceListResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceListResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceListResponseRewriteModelCerebrasLlama3_3_70b InstanceListResponseRewriteModel = "cerebras/llama-3.3-70b"
+ InstanceListResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceListResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceListResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceListResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceListResponseRewriteModelCerebrasGptOSs120b InstanceListResponseRewriteModel = "cerebras/gpt-oss-120b"
+ InstanceListResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceListResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceListResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceListResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceListResponseRewriteModelGrokGrok4 InstanceListResponseRewriteModel = "grok/grok-4"
+ InstanceListResponseRewriteModelGroqLlama3_3_70bVersatile InstanceListResponseRewriteModel = "groq/llama-3.3-70b-versatile"
+ InstanceListResponseRewriteModelGroqLlama3_1_8bInstant InstanceListResponseRewriteModel = "groq/llama-3.1-8b-instant"
+ InstanceListResponseRewriteModelOpenAIGpt5 InstanceListResponseRewriteModel = "openai/gpt-5"
+ InstanceListResponseRewriteModelOpenAIGpt5Mini InstanceListResponseRewriteModel = "openai/gpt-5-mini"
+ InstanceListResponseRewriteModelOpenAIGpt5Nano InstanceListResponseRewriteModel = "openai/gpt-5-nano"
+ InstanceListResponseRewriteModelEmpty InstanceListResponseRewriteModel = ""
+)
+
+func (r InstanceListResponseRewriteModel) IsKnown() bool {
+ switch r {
+ case InstanceListResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceListResponseRewriteModelCfMetaLlama3_1_8bInstructFast, InstanceListResponseRewriteModelCfMetaLlama3_1_8bInstructFp8, InstanceListResponseRewriteModelCfMetaLlama4Scout17b16eInstruct, InstanceListResponseRewriteModelCfQwenQwen3_30bA3bFp8, InstanceListResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceListResponseRewriteModelCfMoonshotaiKimiK2Instruct, InstanceListResponseRewriteModelAnthropicClaude3_7Sonnet, InstanceListResponseRewriteModelAnthropicClaudeSonnet4, InstanceListResponseRewriteModelAnthropicClaudeOpus4, InstanceListResponseRewriteModelAnthropicClaude3_5Haiku, InstanceListResponseRewriteModelCerebrasQwen3_235bA22bInstruct, InstanceListResponseRewriteModelCerebrasQwen3_235bA22bThinking, InstanceListResponseRewriteModelCerebrasLlama3_3_70b, InstanceListResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct, InstanceListResponseRewriteModelCerebrasLlama4Scout17b16eInstruct, InstanceListResponseRewriteModelCerebrasGptOSs120b, InstanceListResponseRewriteModelGoogleAIStudioGemini2_5Flash, InstanceListResponseRewriteModelGoogleAIStudioGemini2_5Pro, InstanceListResponseRewriteModelGrokGrok4, InstanceListResponseRewriteModelGroqLlama3_3_70bVersatile, InstanceListResponseRewriteModelGroqLlama3_1_8bInstant, InstanceListResponseRewriteModelOpenAIGpt5, InstanceListResponseRewriteModelOpenAIGpt5Mini, InstanceListResponseRewriteModelOpenAIGpt5Nano, InstanceListResponseRewriteModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceListResponseSourceParams struct {
+ // List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ // /private/\*_, _\private\*)
+ ExcludeItems []string `json:"exclude_items"`
+ // List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ // /docs/\*_, _\blog\*.html)
+ IncludeItems []string `json:"include_items"`
+ Prefix string `json:"prefix"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ WebCrawler InstanceListResponseSourceParamsWebCrawler `json:"web_crawler"`
+ JSON instanceListResponseSourceParamsJSON `json:"-"`
+}
+
+// instanceListResponseSourceParamsJSON contains the JSON metadata for the struct
+// [InstanceListResponseSourceParams]
+type instanceListResponseSourceParamsJSON struct {
+ ExcludeItems apijson.Field
+ IncludeItems apijson.Field
+ Prefix apijson.Field
+ R2Jurisdiction apijson.Field
+ WebCrawler apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceListResponseSourceParams) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceListResponseSourceParamsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceListResponseSourceParamsWebCrawler struct {
+ ParseOptions InstanceListResponseSourceParamsWebCrawlerParseOptions `json:"parse_options"`
+ ParseType InstanceListResponseSourceParamsWebCrawlerParseType `json:"parse_type"`
+ StoreOptions InstanceListResponseSourceParamsWebCrawlerStoreOptions `json:"store_options"`
+ JSON instanceListResponseSourceParamsWebCrawlerJSON `json:"-"`
+}
+
+// instanceListResponseSourceParamsWebCrawlerJSON contains the JSON metadata for
+// the struct [InstanceListResponseSourceParamsWebCrawler]
+type instanceListResponseSourceParamsWebCrawlerJSON struct {
+ ParseOptions apijson.Field
+ ParseType apijson.Field
+ StoreOptions apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceListResponseSourceParamsWebCrawler) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceListResponseSourceParamsWebCrawlerJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceListResponseSourceParamsWebCrawlerParseOptions struct {
+ IncludeHeaders map[string]string `json:"include_headers"`
+ IncludeImages bool `json:"include_images"`
+ UseBrowserRendering bool `json:"use_browser_rendering"`
+ JSON instanceListResponseSourceParamsWebCrawlerParseOptionsJSON `json:"-"`
+}
+
+// instanceListResponseSourceParamsWebCrawlerParseOptionsJSON contains the JSON
+// metadata for the struct [InstanceListResponseSourceParamsWebCrawlerParseOptions]
+type instanceListResponseSourceParamsWebCrawlerParseOptionsJSON struct {
+ IncludeHeaders apijson.Field
+ IncludeImages apijson.Field
+ UseBrowserRendering apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceListResponseSourceParamsWebCrawlerParseOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceListResponseSourceParamsWebCrawlerParseOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceListResponseSourceParamsWebCrawlerParseType string
+
+const (
+ InstanceListResponseSourceParamsWebCrawlerParseTypeSitemap InstanceListResponseSourceParamsWebCrawlerParseType = "sitemap"
+ InstanceListResponseSourceParamsWebCrawlerParseTypeFeedRss InstanceListResponseSourceParamsWebCrawlerParseType = "feed-rss"
+)
+
+func (r InstanceListResponseSourceParamsWebCrawlerParseType) IsKnown() bool {
+ switch r {
+ case InstanceListResponseSourceParamsWebCrawlerParseTypeSitemap, InstanceListResponseSourceParamsWebCrawlerParseTypeFeedRss:
+ return true
+ }
+ return false
+}
+
+type InstanceListResponseSourceParamsWebCrawlerStoreOptions struct {
+ StorageID string `json:"storage_id,required"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ StorageType r2.Provider `json:"storage_type"`
+ JSON instanceListResponseSourceParamsWebCrawlerStoreOptionsJSON `json:"-"`
+}
+
+// instanceListResponseSourceParamsWebCrawlerStoreOptionsJSON contains the JSON
+// metadata for the struct [InstanceListResponseSourceParamsWebCrawlerStoreOptions]
+type instanceListResponseSourceParamsWebCrawlerStoreOptionsJSON struct {
+ StorageID apijson.Field
+ R2Jurisdiction apijson.Field
+ StorageType apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceListResponseSourceParamsWebCrawlerStoreOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceListResponseSourceParamsWebCrawlerStoreOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceListResponseSummarizationModel string
+
+const (
+ InstanceListResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast InstanceListResponseSummarizationModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceListResponseSummarizationModelCfMetaLlama3_1_8bInstructFast InstanceListResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceListResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8 InstanceListResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceListResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct InstanceListResponseSummarizationModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceListResponseSummarizationModelCfQwenQwen3_30bA3bFp8 InstanceListResponseSummarizationModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceListResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceListResponseSummarizationModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceListResponseSummarizationModelCfMoonshotaiKimiK2Instruct InstanceListResponseSummarizationModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceListResponseSummarizationModelAnthropicClaude3_7Sonnet InstanceListResponseSummarizationModel = "anthropic/claude-3-7-sonnet"
+ InstanceListResponseSummarizationModelAnthropicClaudeSonnet4 InstanceListResponseSummarizationModel = "anthropic/claude-sonnet-4"
+ InstanceListResponseSummarizationModelAnthropicClaudeOpus4 InstanceListResponseSummarizationModel = "anthropic/claude-opus-4"
+ InstanceListResponseSummarizationModelAnthropicClaude3_5Haiku InstanceListResponseSummarizationModel = "anthropic/claude-3-5-haiku"
+ InstanceListResponseSummarizationModelCerebrasQwen3_235bA22bInstruct InstanceListResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceListResponseSummarizationModelCerebrasQwen3_235bA22bThinking InstanceListResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceListResponseSummarizationModelCerebrasLlama3_3_70b InstanceListResponseSummarizationModel = "cerebras/llama-3.3-70b"
+ InstanceListResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct InstanceListResponseSummarizationModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceListResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct InstanceListResponseSummarizationModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceListResponseSummarizationModelCerebrasGptOSs120b InstanceListResponseSummarizationModel = "cerebras/gpt-oss-120b"
+ InstanceListResponseSummarizationModelGoogleAIStudioGemini2_5Flash InstanceListResponseSummarizationModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceListResponseSummarizationModelGoogleAIStudioGemini2_5Pro InstanceListResponseSummarizationModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceListResponseSummarizationModelGrokGrok4 InstanceListResponseSummarizationModel = "grok/grok-4"
+ InstanceListResponseSummarizationModelGroqLlama3_3_70bVersatile InstanceListResponseSummarizationModel = "groq/llama-3.3-70b-versatile"
+ InstanceListResponseSummarizationModelGroqLlama3_1_8bInstant InstanceListResponseSummarizationModel = "groq/llama-3.1-8b-instant"
+ InstanceListResponseSummarizationModelOpenAIGpt5 InstanceListResponseSummarizationModel = "openai/gpt-5"
+ InstanceListResponseSummarizationModelOpenAIGpt5Mini InstanceListResponseSummarizationModel = "openai/gpt-5-mini"
+ InstanceListResponseSummarizationModelOpenAIGpt5Nano InstanceListResponseSummarizationModel = "openai/gpt-5-nano"
+ InstanceListResponseSummarizationModelEmpty InstanceListResponseSummarizationModel = ""
+)
+
+func (r InstanceListResponseSummarizationModel) IsKnown() bool {
+ switch r {
+ case InstanceListResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceListResponseSummarizationModelCfMetaLlama3_1_8bInstructFast, InstanceListResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8, InstanceListResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct, InstanceListResponseSummarizationModelCfQwenQwen3_30bA3bFp8, InstanceListResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceListResponseSummarizationModelCfMoonshotaiKimiK2Instruct, InstanceListResponseSummarizationModelAnthropicClaude3_7Sonnet, InstanceListResponseSummarizationModelAnthropicClaudeSonnet4, InstanceListResponseSummarizationModelAnthropicClaudeOpus4, InstanceListResponseSummarizationModelAnthropicClaude3_5Haiku, InstanceListResponseSummarizationModelCerebrasQwen3_235bA22bInstruct, InstanceListResponseSummarizationModelCerebrasQwen3_235bA22bThinking, InstanceListResponseSummarizationModelCerebrasLlama3_3_70b, InstanceListResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct, InstanceListResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct, InstanceListResponseSummarizationModelCerebrasGptOSs120b, InstanceListResponseSummarizationModelGoogleAIStudioGemini2_5Flash, InstanceListResponseSummarizationModelGoogleAIStudioGemini2_5Pro, InstanceListResponseSummarizationModelGrokGrok4, InstanceListResponseSummarizationModelGroqLlama3_3_70bVersatile, InstanceListResponseSummarizationModelGroqLlama3_1_8bInstant, InstanceListResponseSummarizationModelOpenAIGpt5, InstanceListResponseSummarizationModelOpenAIGpt5Mini, InstanceListResponseSummarizationModelOpenAIGpt5Nano, InstanceListResponseSummarizationModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceDeleteResponse struct {
+ // Use your AI Search ID.
+ ID string `json:"id,required"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ InternalID string `json:"internal_id,required" format:"uuid"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Source string `json:"source,required"`
+ TokenID string `json:"token_id,required" format:"uuid"`
+ Type InstanceDeleteResponseType `json:"type,required"`
+ VectorizeName string `json:"vectorize_name,required"`
+ AIGatewayID string `json:"ai_gateway_id"`
+ AISearchModel InstanceDeleteResponseAISearchModel `json:"ai_search_model"`
+ Cache bool `json:"cache"`
+ CacheThreshold InstanceDeleteResponseCacheThreshold `json:"cache_threshold"`
+ Chunk bool `json:"chunk"`
+ ChunkOverlap int64 `json:"chunk_overlap"`
+ ChunkSize int64 `json:"chunk_size"`
+ CreatedBy string `json:"created_by"`
+ EmbeddingModel InstanceDeleteResponseEmbeddingModel `json:"embedding_model"`
+ Enable bool `json:"enable"`
+ EngineVersion float64 `json:"engine_version"`
+ LastActivity time.Time `json:"last_activity" format:"date-time"`
+ MaxNumResults int64 `json:"max_num_results"`
+ Metadata InstanceDeleteResponseMetadata `json:"metadata"`
+ ModifiedBy string `json:"modified_by"`
+ Paused bool `json:"paused"`
+ Reranking bool `json:"reranking"`
+ RerankingModel InstanceDeleteResponseRerankingModel `json:"reranking_model"`
+ RewriteModel InstanceDeleteResponseRewriteModel `json:"rewrite_model"`
+ RewriteQuery bool `json:"rewrite_query"`
+ ScoreThreshold float64 `json:"score_threshold"`
+ SourceParams InstanceDeleteResponseSourceParams `json:"source_params"`
+ Status string `json:"status"`
+ Summarization bool `json:"summarization"`
+ SummarizationModel InstanceDeleteResponseSummarizationModel `json:"summarization_model"`
+ SystemPromptAISearch string `json:"system_prompt_ai_search"`
+ SystemPromptIndexSummarization string `json:"system_prompt_index_summarization"`
+ SystemPromptRewriteQuery string `json:"system_prompt_rewrite_query"`
+ VectorizeActiveNamespace string `json:"vectorize_active_namespace"`
+ JSON instanceDeleteResponseJSON `json:"-"`
+}
+
+// instanceDeleteResponseJSON contains the JSON metadata for the struct
+// [InstanceDeleteResponse]
+type instanceDeleteResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CreatedAt apijson.Field
+ InternalID apijson.Field
+ ModifiedAt apijson.Field
+ Source apijson.Field
+ TokenID apijson.Field
+ Type apijson.Field
+ VectorizeName apijson.Field
+ AIGatewayID apijson.Field
+ AISearchModel apijson.Field
+ Cache apijson.Field
+ CacheThreshold apijson.Field
+ Chunk apijson.Field
+ ChunkOverlap apijson.Field
+ ChunkSize apijson.Field
+ CreatedBy apijson.Field
+ EmbeddingModel apijson.Field
+ Enable apijson.Field
+ EngineVersion apijson.Field
+ LastActivity apijson.Field
+ MaxNumResults apijson.Field
+ Metadata apijson.Field
+ ModifiedBy apijson.Field
+ Paused apijson.Field
+ Reranking apijson.Field
+ RerankingModel apijson.Field
+ RewriteModel apijson.Field
+ RewriteQuery apijson.Field
+ ScoreThreshold apijson.Field
+ SourceParams apijson.Field
+ Status apijson.Field
+ Summarization apijson.Field
+ SummarizationModel apijson.Field
+ SystemPromptAISearch apijson.Field
+ SystemPromptIndexSummarization apijson.Field
+ SystemPromptRewriteQuery apijson.Field
+ VectorizeActiveNamespace apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceDeleteResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceDeleteResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceDeleteResponseType string
+
+const (
+ InstanceDeleteResponseTypeR2 InstanceDeleteResponseType = "r2"
+ InstanceDeleteResponseTypeWebCrawler InstanceDeleteResponseType = "web-crawler"
+)
+
+func (r InstanceDeleteResponseType) IsKnown() bool {
+ switch r {
+ case InstanceDeleteResponseTypeR2, InstanceDeleteResponseTypeWebCrawler:
+ return true
+ }
+ return false
+}
+
+type InstanceDeleteResponseAISearchModel string
+
+const (
+ InstanceDeleteResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceDeleteResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceDeleteResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceDeleteResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceDeleteResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceDeleteResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceDeleteResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceDeleteResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceDeleteResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceDeleteResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceDeleteResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceDeleteResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceDeleteResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceDeleteResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceDeleteResponseAISearchModelAnthropicClaude3_7Sonnet InstanceDeleteResponseAISearchModel = "anthropic/claude-3-7-sonnet"
+ InstanceDeleteResponseAISearchModelAnthropicClaudeSonnet4 InstanceDeleteResponseAISearchModel = "anthropic/claude-sonnet-4"
+ InstanceDeleteResponseAISearchModelAnthropicClaudeOpus4 InstanceDeleteResponseAISearchModel = "anthropic/claude-opus-4"
+ InstanceDeleteResponseAISearchModelAnthropicClaude3_5Haiku InstanceDeleteResponseAISearchModel = "anthropic/claude-3-5-haiku"
+ InstanceDeleteResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceDeleteResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceDeleteResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceDeleteResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceDeleteResponseAISearchModelCerebrasLlama3_3_70b InstanceDeleteResponseAISearchModel = "cerebras/llama-3.3-70b"
+ InstanceDeleteResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceDeleteResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceDeleteResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceDeleteResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceDeleteResponseAISearchModelCerebrasGptOSs120b InstanceDeleteResponseAISearchModel = "cerebras/gpt-oss-120b"
+ InstanceDeleteResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceDeleteResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceDeleteResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceDeleteResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceDeleteResponseAISearchModelGrokGrok4 InstanceDeleteResponseAISearchModel = "grok/grok-4"
+ InstanceDeleteResponseAISearchModelGroqLlama3_3_70bVersatile InstanceDeleteResponseAISearchModel = "groq/llama-3.3-70b-versatile"
+ InstanceDeleteResponseAISearchModelGroqLlama3_1_8bInstant InstanceDeleteResponseAISearchModel = "groq/llama-3.1-8b-instant"
+ InstanceDeleteResponseAISearchModelOpenAIGpt5 InstanceDeleteResponseAISearchModel = "openai/gpt-5"
+ InstanceDeleteResponseAISearchModelOpenAIGpt5Mini InstanceDeleteResponseAISearchModel = "openai/gpt-5-mini"
+ InstanceDeleteResponseAISearchModelOpenAIGpt5Nano InstanceDeleteResponseAISearchModel = "openai/gpt-5-nano"
+ InstanceDeleteResponseAISearchModelEmpty InstanceDeleteResponseAISearchModel = ""
+)
+
+func (r InstanceDeleteResponseAISearchModel) IsKnown() bool {
+ switch r {
+ case InstanceDeleteResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceDeleteResponseAISearchModelCfMetaLlama3_1_8bInstructFast, InstanceDeleteResponseAISearchModelCfMetaLlama3_1_8bInstructFp8, InstanceDeleteResponseAISearchModelCfMetaLlama4Scout17b16eInstruct, InstanceDeleteResponseAISearchModelCfQwenQwen3_30bA3bFp8, InstanceDeleteResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceDeleteResponseAISearchModelCfMoonshotaiKimiK2Instruct, InstanceDeleteResponseAISearchModelAnthropicClaude3_7Sonnet, InstanceDeleteResponseAISearchModelAnthropicClaudeSonnet4, InstanceDeleteResponseAISearchModelAnthropicClaudeOpus4, InstanceDeleteResponseAISearchModelAnthropicClaude3_5Haiku, InstanceDeleteResponseAISearchModelCerebrasQwen3_235bA22bInstruct, InstanceDeleteResponseAISearchModelCerebrasQwen3_235bA22bThinking, InstanceDeleteResponseAISearchModelCerebrasLlama3_3_70b, InstanceDeleteResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct, InstanceDeleteResponseAISearchModelCerebrasLlama4Scout17b16eInstruct, InstanceDeleteResponseAISearchModelCerebrasGptOSs120b, InstanceDeleteResponseAISearchModelGoogleAIStudioGemini2_5Flash, InstanceDeleteResponseAISearchModelGoogleAIStudioGemini2_5Pro, InstanceDeleteResponseAISearchModelGrokGrok4, InstanceDeleteResponseAISearchModelGroqLlama3_3_70bVersatile, InstanceDeleteResponseAISearchModelGroqLlama3_1_8bInstant, InstanceDeleteResponseAISearchModelOpenAIGpt5, InstanceDeleteResponseAISearchModelOpenAIGpt5Mini, InstanceDeleteResponseAISearchModelOpenAIGpt5Nano, InstanceDeleteResponseAISearchModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceDeleteResponseCacheThreshold string
+
+const (
+ InstanceDeleteResponseCacheThresholdSuperStrictMatch InstanceDeleteResponseCacheThreshold = "super_strict_match"
+ InstanceDeleteResponseCacheThresholdCloseEnough InstanceDeleteResponseCacheThreshold = "close_enough"
+ InstanceDeleteResponseCacheThresholdFlexibleFriend InstanceDeleteResponseCacheThreshold = "flexible_friend"
+ InstanceDeleteResponseCacheThresholdAnythingGoes InstanceDeleteResponseCacheThreshold = "anything_goes"
+)
+
+func (r InstanceDeleteResponseCacheThreshold) IsKnown() bool {
+ switch r {
+ case InstanceDeleteResponseCacheThresholdSuperStrictMatch, InstanceDeleteResponseCacheThresholdCloseEnough, InstanceDeleteResponseCacheThresholdFlexibleFriend, InstanceDeleteResponseCacheThresholdAnythingGoes:
+ return true
+ }
+ return false
+}
+
+type InstanceDeleteResponseEmbeddingModel string
+
+const (
+ InstanceDeleteResponseEmbeddingModelCfBaaiBgeM3 InstanceDeleteResponseEmbeddingModel = "@cf/baai/bge-m3"
+ InstanceDeleteResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceDeleteResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
+ InstanceDeleteResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceDeleteResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
+ InstanceDeleteResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceDeleteResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
+ InstanceDeleteResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceDeleteResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
+ InstanceDeleteResponseEmbeddingModelOpenAITextEmbedding3Small InstanceDeleteResponseEmbeddingModel = "openai/text-embedding-3-small"
+ InstanceDeleteResponseEmbeddingModelOpenAITextEmbedding3Large InstanceDeleteResponseEmbeddingModel = "openai/text-embedding-3-large"
+ InstanceDeleteResponseEmbeddingModelEmpty InstanceDeleteResponseEmbeddingModel = ""
+)
+
+func (r InstanceDeleteResponseEmbeddingModel) IsKnown() bool {
+ switch r {
+ case InstanceDeleteResponseEmbeddingModelCfBaaiBgeM3, InstanceDeleteResponseEmbeddingModelCfBaaiBgeLargeEnV1_5, InstanceDeleteResponseEmbeddingModelCfGoogleEmbeddinggemma300m, InstanceDeleteResponseEmbeddingModelCfQwenQwen3Embedding0_6b, InstanceDeleteResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001, InstanceDeleteResponseEmbeddingModelOpenAITextEmbedding3Small, InstanceDeleteResponseEmbeddingModelOpenAITextEmbedding3Large, InstanceDeleteResponseEmbeddingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceDeleteResponseMetadata struct {
+ CreatedFromAISearchWizard bool `json:"created_from_aisearch_wizard"`
+ WorkerDomain string `json:"worker_domain"`
+ JSON instanceDeleteResponseMetadataJSON `json:"-"`
+}
+
+// instanceDeleteResponseMetadataJSON contains the JSON metadata for the struct
+// [InstanceDeleteResponseMetadata]
+type instanceDeleteResponseMetadataJSON struct {
+ CreatedFromAISearchWizard apijson.Field
+ WorkerDomain apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceDeleteResponseMetadata) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceDeleteResponseMetadataJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceDeleteResponseRerankingModel string
+
+const (
+ InstanceDeleteResponseRerankingModelCfBaaiBgeRerankerBase InstanceDeleteResponseRerankingModel = "@cf/baai/bge-reranker-base"
+ InstanceDeleteResponseRerankingModelEmpty InstanceDeleteResponseRerankingModel = ""
+)
+
+func (r InstanceDeleteResponseRerankingModel) IsKnown() bool {
+ switch r {
+ case InstanceDeleteResponseRerankingModelCfBaaiBgeRerankerBase, InstanceDeleteResponseRerankingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceDeleteResponseRewriteModel string
+
+const (
+ InstanceDeleteResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceDeleteResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceDeleteResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceDeleteResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceDeleteResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceDeleteResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceDeleteResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceDeleteResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceDeleteResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceDeleteResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceDeleteResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceDeleteResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceDeleteResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceDeleteResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceDeleteResponseRewriteModelAnthropicClaude3_7Sonnet InstanceDeleteResponseRewriteModel = "anthropic/claude-3-7-sonnet"
+ InstanceDeleteResponseRewriteModelAnthropicClaudeSonnet4 InstanceDeleteResponseRewriteModel = "anthropic/claude-sonnet-4"
+ InstanceDeleteResponseRewriteModelAnthropicClaudeOpus4 InstanceDeleteResponseRewriteModel = "anthropic/claude-opus-4"
+ InstanceDeleteResponseRewriteModelAnthropicClaude3_5Haiku InstanceDeleteResponseRewriteModel = "anthropic/claude-3-5-haiku"
+ InstanceDeleteResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceDeleteResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceDeleteResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceDeleteResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceDeleteResponseRewriteModelCerebrasLlama3_3_70b InstanceDeleteResponseRewriteModel = "cerebras/llama-3.3-70b"
+ InstanceDeleteResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceDeleteResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceDeleteResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceDeleteResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceDeleteResponseRewriteModelCerebrasGptOSs120b InstanceDeleteResponseRewriteModel = "cerebras/gpt-oss-120b"
+ InstanceDeleteResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceDeleteResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceDeleteResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceDeleteResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceDeleteResponseRewriteModelGrokGrok4 InstanceDeleteResponseRewriteModel = "grok/grok-4"
+ InstanceDeleteResponseRewriteModelGroqLlama3_3_70bVersatile InstanceDeleteResponseRewriteModel = "groq/llama-3.3-70b-versatile"
+ InstanceDeleteResponseRewriteModelGroqLlama3_1_8bInstant InstanceDeleteResponseRewriteModel = "groq/llama-3.1-8b-instant"
+ InstanceDeleteResponseRewriteModelOpenAIGpt5 InstanceDeleteResponseRewriteModel = "openai/gpt-5"
+ InstanceDeleteResponseRewriteModelOpenAIGpt5Mini InstanceDeleteResponseRewriteModel = "openai/gpt-5-mini"
+ InstanceDeleteResponseRewriteModelOpenAIGpt5Nano InstanceDeleteResponseRewriteModel = "openai/gpt-5-nano"
+ InstanceDeleteResponseRewriteModelEmpty InstanceDeleteResponseRewriteModel = ""
+)
+
+func (r InstanceDeleteResponseRewriteModel) IsKnown() bool {
+ switch r {
+ case InstanceDeleteResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceDeleteResponseRewriteModelCfMetaLlama3_1_8bInstructFast, InstanceDeleteResponseRewriteModelCfMetaLlama3_1_8bInstructFp8, InstanceDeleteResponseRewriteModelCfMetaLlama4Scout17b16eInstruct, InstanceDeleteResponseRewriteModelCfQwenQwen3_30bA3bFp8, InstanceDeleteResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceDeleteResponseRewriteModelCfMoonshotaiKimiK2Instruct, InstanceDeleteResponseRewriteModelAnthropicClaude3_7Sonnet, InstanceDeleteResponseRewriteModelAnthropicClaudeSonnet4, InstanceDeleteResponseRewriteModelAnthropicClaudeOpus4, InstanceDeleteResponseRewriteModelAnthropicClaude3_5Haiku, InstanceDeleteResponseRewriteModelCerebrasQwen3_235bA22bInstruct, InstanceDeleteResponseRewriteModelCerebrasQwen3_235bA22bThinking, InstanceDeleteResponseRewriteModelCerebrasLlama3_3_70b, InstanceDeleteResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct, InstanceDeleteResponseRewriteModelCerebrasLlama4Scout17b16eInstruct, InstanceDeleteResponseRewriteModelCerebrasGptOSs120b, InstanceDeleteResponseRewriteModelGoogleAIStudioGemini2_5Flash, InstanceDeleteResponseRewriteModelGoogleAIStudioGemini2_5Pro, InstanceDeleteResponseRewriteModelGrokGrok4, InstanceDeleteResponseRewriteModelGroqLlama3_3_70bVersatile, InstanceDeleteResponseRewriteModelGroqLlama3_1_8bInstant, InstanceDeleteResponseRewriteModelOpenAIGpt5, InstanceDeleteResponseRewriteModelOpenAIGpt5Mini, InstanceDeleteResponseRewriteModelOpenAIGpt5Nano, InstanceDeleteResponseRewriteModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceDeleteResponseSourceParams struct {
+ // List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ // /private/\*_, _\private\*)
+ ExcludeItems []string `json:"exclude_items"`
+ // List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ // /docs/\*_, _\blog\*.html)
+ IncludeItems []string `json:"include_items"`
+ Prefix string `json:"prefix"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ WebCrawler InstanceDeleteResponseSourceParamsWebCrawler `json:"web_crawler"`
+ JSON instanceDeleteResponseSourceParamsJSON `json:"-"`
+}
+
+// instanceDeleteResponseSourceParamsJSON contains the JSON metadata for the struct
+// [InstanceDeleteResponseSourceParams]
+type instanceDeleteResponseSourceParamsJSON struct {
+ ExcludeItems apijson.Field
+ IncludeItems apijson.Field
+ Prefix apijson.Field
+ R2Jurisdiction apijson.Field
+ WebCrawler apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceDeleteResponseSourceParams) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceDeleteResponseSourceParamsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceDeleteResponseSourceParamsWebCrawler struct {
+ ParseOptions InstanceDeleteResponseSourceParamsWebCrawlerParseOptions `json:"parse_options"`
+ ParseType InstanceDeleteResponseSourceParamsWebCrawlerParseType `json:"parse_type"`
+ StoreOptions InstanceDeleteResponseSourceParamsWebCrawlerStoreOptions `json:"store_options"`
+ JSON instanceDeleteResponseSourceParamsWebCrawlerJSON `json:"-"`
+}
+
+// instanceDeleteResponseSourceParamsWebCrawlerJSON contains the JSON metadata for
+// the struct [InstanceDeleteResponseSourceParamsWebCrawler]
+type instanceDeleteResponseSourceParamsWebCrawlerJSON struct {
+ ParseOptions apijson.Field
+ ParseType apijson.Field
+ StoreOptions apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceDeleteResponseSourceParamsWebCrawler) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceDeleteResponseSourceParamsWebCrawlerJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceDeleteResponseSourceParamsWebCrawlerParseOptions struct {
+ IncludeHeaders map[string]string `json:"include_headers"`
+ IncludeImages bool `json:"include_images"`
+ UseBrowserRendering bool `json:"use_browser_rendering"`
+ JSON instanceDeleteResponseSourceParamsWebCrawlerParseOptionsJSON `json:"-"`
+}
+
+// instanceDeleteResponseSourceParamsWebCrawlerParseOptionsJSON contains the JSON
+// metadata for the struct
+// [InstanceDeleteResponseSourceParamsWebCrawlerParseOptions]
+type instanceDeleteResponseSourceParamsWebCrawlerParseOptionsJSON struct {
+ IncludeHeaders apijson.Field
+ IncludeImages apijson.Field
+ UseBrowserRendering apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceDeleteResponseSourceParamsWebCrawlerParseOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceDeleteResponseSourceParamsWebCrawlerParseOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceDeleteResponseSourceParamsWebCrawlerParseType string
+
+const (
+ InstanceDeleteResponseSourceParamsWebCrawlerParseTypeSitemap InstanceDeleteResponseSourceParamsWebCrawlerParseType = "sitemap"
+ InstanceDeleteResponseSourceParamsWebCrawlerParseTypeFeedRss InstanceDeleteResponseSourceParamsWebCrawlerParseType = "feed-rss"
+)
+
+func (r InstanceDeleteResponseSourceParamsWebCrawlerParseType) IsKnown() bool {
+ switch r {
+ case InstanceDeleteResponseSourceParamsWebCrawlerParseTypeSitemap, InstanceDeleteResponseSourceParamsWebCrawlerParseTypeFeedRss:
+ return true
+ }
+ return false
+}
+
+type InstanceDeleteResponseSourceParamsWebCrawlerStoreOptions struct {
+ StorageID string `json:"storage_id,required"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ StorageType r2.Provider `json:"storage_type"`
+ JSON instanceDeleteResponseSourceParamsWebCrawlerStoreOptionsJSON `json:"-"`
+}
+
+// instanceDeleteResponseSourceParamsWebCrawlerStoreOptionsJSON contains the JSON
+// metadata for the struct
+// [InstanceDeleteResponseSourceParamsWebCrawlerStoreOptions]
+type instanceDeleteResponseSourceParamsWebCrawlerStoreOptionsJSON struct {
+ StorageID apijson.Field
+ R2Jurisdiction apijson.Field
+ StorageType apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceDeleteResponseSourceParamsWebCrawlerStoreOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceDeleteResponseSourceParamsWebCrawlerStoreOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceDeleteResponseSummarizationModel string
+
+const (
+ InstanceDeleteResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast InstanceDeleteResponseSummarizationModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceDeleteResponseSummarizationModelCfMetaLlama3_1_8bInstructFast InstanceDeleteResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceDeleteResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8 InstanceDeleteResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceDeleteResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct InstanceDeleteResponseSummarizationModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceDeleteResponseSummarizationModelCfQwenQwen3_30bA3bFp8 InstanceDeleteResponseSummarizationModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceDeleteResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceDeleteResponseSummarizationModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceDeleteResponseSummarizationModelCfMoonshotaiKimiK2Instruct InstanceDeleteResponseSummarizationModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceDeleteResponseSummarizationModelAnthropicClaude3_7Sonnet InstanceDeleteResponseSummarizationModel = "anthropic/claude-3-7-sonnet"
+ InstanceDeleteResponseSummarizationModelAnthropicClaudeSonnet4 InstanceDeleteResponseSummarizationModel = "anthropic/claude-sonnet-4"
+ InstanceDeleteResponseSummarizationModelAnthropicClaudeOpus4 InstanceDeleteResponseSummarizationModel = "anthropic/claude-opus-4"
+ InstanceDeleteResponseSummarizationModelAnthropicClaude3_5Haiku InstanceDeleteResponseSummarizationModel = "anthropic/claude-3-5-haiku"
+ InstanceDeleteResponseSummarizationModelCerebrasQwen3_235bA22bInstruct InstanceDeleteResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceDeleteResponseSummarizationModelCerebrasQwen3_235bA22bThinking InstanceDeleteResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceDeleteResponseSummarizationModelCerebrasLlama3_3_70b InstanceDeleteResponseSummarizationModel = "cerebras/llama-3.3-70b"
+ InstanceDeleteResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct InstanceDeleteResponseSummarizationModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceDeleteResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct InstanceDeleteResponseSummarizationModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceDeleteResponseSummarizationModelCerebrasGptOSs120b InstanceDeleteResponseSummarizationModel = "cerebras/gpt-oss-120b"
+ InstanceDeleteResponseSummarizationModelGoogleAIStudioGemini2_5Flash InstanceDeleteResponseSummarizationModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceDeleteResponseSummarizationModelGoogleAIStudioGemini2_5Pro InstanceDeleteResponseSummarizationModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceDeleteResponseSummarizationModelGrokGrok4 InstanceDeleteResponseSummarizationModel = "grok/grok-4"
+ InstanceDeleteResponseSummarizationModelGroqLlama3_3_70bVersatile InstanceDeleteResponseSummarizationModel = "groq/llama-3.3-70b-versatile"
+ InstanceDeleteResponseSummarizationModelGroqLlama3_1_8bInstant InstanceDeleteResponseSummarizationModel = "groq/llama-3.1-8b-instant"
+ InstanceDeleteResponseSummarizationModelOpenAIGpt5 InstanceDeleteResponseSummarizationModel = "openai/gpt-5"
+ InstanceDeleteResponseSummarizationModelOpenAIGpt5Mini InstanceDeleteResponseSummarizationModel = "openai/gpt-5-mini"
+ InstanceDeleteResponseSummarizationModelOpenAIGpt5Nano InstanceDeleteResponseSummarizationModel = "openai/gpt-5-nano"
+ InstanceDeleteResponseSummarizationModelEmpty InstanceDeleteResponseSummarizationModel = ""
+)
+
+func (r InstanceDeleteResponseSummarizationModel) IsKnown() bool {
+ switch r {
+ case InstanceDeleteResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceDeleteResponseSummarizationModelCfMetaLlama3_1_8bInstructFast, InstanceDeleteResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8, InstanceDeleteResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct, InstanceDeleteResponseSummarizationModelCfQwenQwen3_30bA3bFp8, InstanceDeleteResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceDeleteResponseSummarizationModelCfMoonshotaiKimiK2Instruct, InstanceDeleteResponseSummarizationModelAnthropicClaude3_7Sonnet, InstanceDeleteResponseSummarizationModelAnthropicClaudeSonnet4, InstanceDeleteResponseSummarizationModelAnthropicClaudeOpus4, InstanceDeleteResponseSummarizationModelAnthropicClaude3_5Haiku, InstanceDeleteResponseSummarizationModelCerebrasQwen3_235bA22bInstruct, InstanceDeleteResponseSummarizationModelCerebrasQwen3_235bA22bThinking, InstanceDeleteResponseSummarizationModelCerebrasLlama3_3_70b, InstanceDeleteResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct, InstanceDeleteResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct, InstanceDeleteResponseSummarizationModelCerebrasGptOSs120b, InstanceDeleteResponseSummarizationModelGoogleAIStudioGemini2_5Flash, InstanceDeleteResponseSummarizationModelGoogleAIStudioGemini2_5Pro, InstanceDeleteResponseSummarizationModelGrokGrok4, InstanceDeleteResponseSummarizationModelGroqLlama3_3_70bVersatile, InstanceDeleteResponseSummarizationModelGroqLlama3_1_8bInstant, InstanceDeleteResponseSummarizationModelOpenAIGpt5, InstanceDeleteResponseSummarizationModelOpenAIGpt5Mini, InstanceDeleteResponseSummarizationModelOpenAIGpt5Nano, InstanceDeleteResponseSummarizationModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceReadResponse struct {
+ // Use your AI Search ID.
+ ID string `json:"id,required"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ InternalID string `json:"internal_id,required" format:"uuid"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Source string `json:"source,required"`
+ TokenID string `json:"token_id,required" format:"uuid"`
+ Type InstanceReadResponseType `json:"type,required"`
+ VectorizeName string `json:"vectorize_name,required"`
+ AIGatewayID string `json:"ai_gateway_id"`
+ AISearchModel InstanceReadResponseAISearchModel `json:"ai_search_model"`
+ Cache bool `json:"cache"`
+ CacheThreshold InstanceReadResponseCacheThreshold `json:"cache_threshold"`
+ Chunk bool `json:"chunk"`
+ ChunkOverlap int64 `json:"chunk_overlap"`
+ ChunkSize int64 `json:"chunk_size"`
+ CreatedBy string `json:"created_by"`
+ EmbeddingModel InstanceReadResponseEmbeddingModel `json:"embedding_model"`
+ Enable bool `json:"enable"`
+ EngineVersion float64 `json:"engine_version"`
+ LastActivity time.Time `json:"last_activity" format:"date-time"`
+ MaxNumResults int64 `json:"max_num_results"`
+ Metadata InstanceReadResponseMetadata `json:"metadata"`
+ ModifiedBy string `json:"modified_by"`
+ Paused bool `json:"paused"`
+ Reranking bool `json:"reranking"`
+ RerankingModel InstanceReadResponseRerankingModel `json:"reranking_model"`
+ RewriteModel InstanceReadResponseRewriteModel `json:"rewrite_model"`
+ RewriteQuery bool `json:"rewrite_query"`
+ ScoreThreshold float64 `json:"score_threshold"`
+ SourceParams InstanceReadResponseSourceParams `json:"source_params"`
+ Status string `json:"status"`
+ Summarization bool `json:"summarization"`
+ SummarizationModel InstanceReadResponseSummarizationModel `json:"summarization_model"`
+ SystemPromptAISearch string `json:"system_prompt_ai_search"`
+ SystemPromptIndexSummarization string `json:"system_prompt_index_summarization"`
+ SystemPromptRewriteQuery string `json:"system_prompt_rewrite_query"`
+ VectorizeActiveNamespace string `json:"vectorize_active_namespace"`
+ JSON instanceReadResponseJSON `json:"-"`
+}
+
+// instanceReadResponseJSON contains the JSON metadata for the struct
+// [InstanceReadResponse]
+type instanceReadResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CreatedAt apijson.Field
+ InternalID apijson.Field
+ ModifiedAt apijson.Field
+ Source apijson.Field
+ TokenID apijson.Field
+ Type apijson.Field
+ VectorizeName apijson.Field
+ AIGatewayID apijson.Field
+ AISearchModel apijson.Field
+ Cache apijson.Field
+ CacheThreshold apijson.Field
+ Chunk apijson.Field
+ ChunkOverlap apijson.Field
+ ChunkSize apijson.Field
+ CreatedBy apijson.Field
+ EmbeddingModel apijson.Field
+ Enable apijson.Field
+ EngineVersion apijson.Field
+ LastActivity apijson.Field
+ MaxNumResults apijson.Field
+ Metadata apijson.Field
+ ModifiedBy apijson.Field
+ Paused apijson.Field
+ Reranking apijson.Field
+ RerankingModel apijson.Field
+ RewriteModel apijson.Field
+ RewriteQuery apijson.Field
+ ScoreThreshold apijson.Field
+ SourceParams apijson.Field
+ Status apijson.Field
+ Summarization apijson.Field
+ SummarizationModel apijson.Field
+ SystemPromptAISearch apijson.Field
+ SystemPromptIndexSummarization apijson.Field
+ SystemPromptRewriteQuery apijson.Field
+ VectorizeActiveNamespace apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceReadResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceReadResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceReadResponseType string
+
+const (
+ InstanceReadResponseTypeR2 InstanceReadResponseType = "r2"
+ InstanceReadResponseTypeWebCrawler InstanceReadResponseType = "web-crawler"
+)
+
+func (r InstanceReadResponseType) IsKnown() bool {
+ switch r {
+ case InstanceReadResponseTypeR2, InstanceReadResponseTypeWebCrawler:
+ return true
+ }
+ return false
+}
+
+type InstanceReadResponseAISearchModel string
+
+const (
+ InstanceReadResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceReadResponseAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceReadResponseAISearchModelCfMetaLlama3_1_8bInstructFast InstanceReadResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceReadResponseAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceReadResponseAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceReadResponseAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceReadResponseAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceReadResponseAISearchModelCfQwenQwen3_30bA3bFp8 InstanceReadResponseAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceReadResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceReadResponseAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceReadResponseAISearchModelCfMoonshotaiKimiK2Instruct InstanceReadResponseAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceReadResponseAISearchModelAnthropicClaude3_7Sonnet InstanceReadResponseAISearchModel = "anthropic/claude-3-7-sonnet"
+ InstanceReadResponseAISearchModelAnthropicClaudeSonnet4 InstanceReadResponseAISearchModel = "anthropic/claude-sonnet-4"
+ InstanceReadResponseAISearchModelAnthropicClaudeOpus4 InstanceReadResponseAISearchModel = "anthropic/claude-opus-4"
+ InstanceReadResponseAISearchModelAnthropicClaude3_5Haiku InstanceReadResponseAISearchModel = "anthropic/claude-3-5-haiku"
+ InstanceReadResponseAISearchModelCerebrasQwen3_235bA22bInstruct InstanceReadResponseAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceReadResponseAISearchModelCerebrasQwen3_235bA22bThinking InstanceReadResponseAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceReadResponseAISearchModelCerebrasLlama3_3_70b InstanceReadResponseAISearchModel = "cerebras/llama-3.3-70b"
+ InstanceReadResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceReadResponseAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceReadResponseAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceReadResponseAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceReadResponseAISearchModelCerebrasGptOSs120b InstanceReadResponseAISearchModel = "cerebras/gpt-oss-120b"
+ InstanceReadResponseAISearchModelGoogleAIStudioGemini2_5Flash InstanceReadResponseAISearchModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceReadResponseAISearchModelGoogleAIStudioGemini2_5Pro InstanceReadResponseAISearchModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceReadResponseAISearchModelGrokGrok4 InstanceReadResponseAISearchModel = "grok/grok-4"
+ InstanceReadResponseAISearchModelGroqLlama3_3_70bVersatile InstanceReadResponseAISearchModel = "groq/llama-3.3-70b-versatile"
+ InstanceReadResponseAISearchModelGroqLlama3_1_8bInstant InstanceReadResponseAISearchModel = "groq/llama-3.1-8b-instant"
+ InstanceReadResponseAISearchModelOpenAIGpt5 InstanceReadResponseAISearchModel = "openai/gpt-5"
+ InstanceReadResponseAISearchModelOpenAIGpt5Mini InstanceReadResponseAISearchModel = "openai/gpt-5-mini"
+ InstanceReadResponseAISearchModelOpenAIGpt5Nano InstanceReadResponseAISearchModel = "openai/gpt-5-nano"
+ InstanceReadResponseAISearchModelEmpty InstanceReadResponseAISearchModel = ""
+)
+
+func (r InstanceReadResponseAISearchModel) IsKnown() bool {
+ switch r {
+ case InstanceReadResponseAISearchModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceReadResponseAISearchModelCfMetaLlama3_1_8bInstructFast, InstanceReadResponseAISearchModelCfMetaLlama3_1_8bInstructFp8, InstanceReadResponseAISearchModelCfMetaLlama4Scout17b16eInstruct, InstanceReadResponseAISearchModelCfQwenQwen3_30bA3bFp8, InstanceReadResponseAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceReadResponseAISearchModelCfMoonshotaiKimiK2Instruct, InstanceReadResponseAISearchModelAnthropicClaude3_7Sonnet, InstanceReadResponseAISearchModelAnthropicClaudeSonnet4, InstanceReadResponseAISearchModelAnthropicClaudeOpus4, InstanceReadResponseAISearchModelAnthropicClaude3_5Haiku, InstanceReadResponseAISearchModelCerebrasQwen3_235bA22bInstruct, InstanceReadResponseAISearchModelCerebrasQwen3_235bA22bThinking, InstanceReadResponseAISearchModelCerebrasLlama3_3_70b, InstanceReadResponseAISearchModelCerebrasLlama4Maverick17b128eInstruct, InstanceReadResponseAISearchModelCerebrasLlama4Scout17b16eInstruct, InstanceReadResponseAISearchModelCerebrasGptOSs120b, InstanceReadResponseAISearchModelGoogleAIStudioGemini2_5Flash, InstanceReadResponseAISearchModelGoogleAIStudioGemini2_5Pro, InstanceReadResponseAISearchModelGrokGrok4, InstanceReadResponseAISearchModelGroqLlama3_3_70bVersatile, InstanceReadResponseAISearchModelGroqLlama3_1_8bInstant, InstanceReadResponseAISearchModelOpenAIGpt5, InstanceReadResponseAISearchModelOpenAIGpt5Mini, InstanceReadResponseAISearchModelOpenAIGpt5Nano, InstanceReadResponseAISearchModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceReadResponseCacheThreshold string
+
+const (
+ InstanceReadResponseCacheThresholdSuperStrictMatch InstanceReadResponseCacheThreshold = "super_strict_match"
+ InstanceReadResponseCacheThresholdCloseEnough InstanceReadResponseCacheThreshold = "close_enough"
+ InstanceReadResponseCacheThresholdFlexibleFriend InstanceReadResponseCacheThreshold = "flexible_friend"
+ InstanceReadResponseCacheThresholdAnythingGoes InstanceReadResponseCacheThreshold = "anything_goes"
+)
+
+func (r InstanceReadResponseCacheThreshold) IsKnown() bool {
+ switch r {
+ case InstanceReadResponseCacheThresholdSuperStrictMatch, InstanceReadResponseCacheThresholdCloseEnough, InstanceReadResponseCacheThresholdFlexibleFriend, InstanceReadResponseCacheThresholdAnythingGoes:
+ return true
+ }
+ return false
+}
+
+type InstanceReadResponseEmbeddingModel string
+
+const (
+ InstanceReadResponseEmbeddingModelCfBaaiBgeM3 InstanceReadResponseEmbeddingModel = "@cf/baai/bge-m3"
+ InstanceReadResponseEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceReadResponseEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
+ InstanceReadResponseEmbeddingModelCfGoogleEmbeddinggemma300m InstanceReadResponseEmbeddingModel = "@cf/google/embeddinggemma-300m"
+ InstanceReadResponseEmbeddingModelCfQwenQwen3Embedding0_6b InstanceReadResponseEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
+ InstanceReadResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceReadResponseEmbeddingModel = "google-ai-studio/gemini-embedding-001"
+ InstanceReadResponseEmbeddingModelOpenAITextEmbedding3Small InstanceReadResponseEmbeddingModel = "openai/text-embedding-3-small"
+ InstanceReadResponseEmbeddingModelOpenAITextEmbedding3Large InstanceReadResponseEmbeddingModel = "openai/text-embedding-3-large"
+ InstanceReadResponseEmbeddingModelEmpty InstanceReadResponseEmbeddingModel = ""
+)
+
+func (r InstanceReadResponseEmbeddingModel) IsKnown() bool {
+ switch r {
+ case InstanceReadResponseEmbeddingModelCfBaaiBgeM3, InstanceReadResponseEmbeddingModelCfBaaiBgeLargeEnV1_5, InstanceReadResponseEmbeddingModelCfGoogleEmbeddinggemma300m, InstanceReadResponseEmbeddingModelCfQwenQwen3Embedding0_6b, InstanceReadResponseEmbeddingModelGoogleAIStudioGeminiEmbedding001, InstanceReadResponseEmbeddingModelOpenAITextEmbedding3Small, InstanceReadResponseEmbeddingModelOpenAITextEmbedding3Large, InstanceReadResponseEmbeddingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceReadResponseMetadata struct {
+ CreatedFromAISearchWizard bool `json:"created_from_aisearch_wizard"`
+ WorkerDomain string `json:"worker_domain"`
+ JSON instanceReadResponseMetadataJSON `json:"-"`
+}
+
+// instanceReadResponseMetadataJSON contains the JSON metadata for the struct
+// [InstanceReadResponseMetadata]
+type instanceReadResponseMetadataJSON struct {
+ CreatedFromAISearchWizard apijson.Field
+ WorkerDomain apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceReadResponseMetadata) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceReadResponseMetadataJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceReadResponseRerankingModel string
+
+const (
+ InstanceReadResponseRerankingModelCfBaaiBgeRerankerBase InstanceReadResponseRerankingModel = "@cf/baai/bge-reranker-base"
+ InstanceReadResponseRerankingModelEmpty InstanceReadResponseRerankingModel = ""
+)
+
+func (r InstanceReadResponseRerankingModel) IsKnown() bool {
+ switch r {
+ case InstanceReadResponseRerankingModelCfBaaiBgeRerankerBase, InstanceReadResponseRerankingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceReadResponseRewriteModel string
+
+const (
+ InstanceReadResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceReadResponseRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceReadResponseRewriteModelCfMetaLlama3_1_8bInstructFast InstanceReadResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceReadResponseRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceReadResponseRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceReadResponseRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceReadResponseRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceReadResponseRewriteModelCfQwenQwen3_30bA3bFp8 InstanceReadResponseRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceReadResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceReadResponseRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceReadResponseRewriteModelCfMoonshotaiKimiK2Instruct InstanceReadResponseRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceReadResponseRewriteModelAnthropicClaude3_7Sonnet InstanceReadResponseRewriteModel = "anthropic/claude-3-7-sonnet"
+ InstanceReadResponseRewriteModelAnthropicClaudeSonnet4 InstanceReadResponseRewriteModel = "anthropic/claude-sonnet-4"
+ InstanceReadResponseRewriteModelAnthropicClaudeOpus4 InstanceReadResponseRewriteModel = "anthropic/claude-opus-4"
+ InstanceReadResponseRewriteModelAnthropicClaude3_5Haiku InstanceReadResponseRewriteModel = "anthropic/claude-3-5-haiku"
+ InstanceReadResponseRewriteModelCerebrasQwen3_235bA22bInstruct InstanceReadResponseRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceReadResponseRewriteModelCerebrasQwen3_235bA22bThinking InstanceReadResponseRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceReadResponseRewriteModelCerebrasLlama3_3_70b InstanceReadResponseRewriteModel = "cerebras/llama-3.3-70b"
+ InstanceReadResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceReadResponseRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceReadResponseRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceReadResponseRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceReadResponseRewriteModelCerebrasGptOSs120b InstanceReadResponseRewriteModel = "cerebras/gpt-oss-120b"
+ InstanceReadResponseRewriteModelGoogleAIStudioGemini2_5Flash InstanceReadResponseRewriteModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceReadResponseRewriteModelGoogleAIStudioGemini2_5Pro InstanceReadResponseRewriteModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceReadResponseRewriteModelGrokGrok4 InstanceReadResponseRewriteModel = "grok/grok-4"
+ InstanceReadResponseRewriteModelGroqLlama3_3_70bVersatile InstanceReadResponseRewriteModel = "groq/llama-3.3-70b-versatile"
+ InstanceReadResponseRewriteModelGroqLlama3_1_8bInstant InstanceReadResponseRewriteModel = "groq/llama-3.1-8b-instant"
+ InstanceReadResponseRewriteModelOpenAIGpt5 InstanceReadResponseRewriteModel = "openai/gpt-5"
+ InstanceReadResponseRewriteModelOpenAIGpt5Mini InstanceReadResponseRewriteModel = "openai/gpt-5-mini"
+ InstanceReadResponseRewriteModelOpenAIGpt5Nano InstanceReadResponseRewriteModel = "openai/gpt-5-nano"
+ InstanceReadResponseRewriteModelEmpty InstanceReadResponseRewriteModel = ""
+)
+
+func (r InstanceReadResponseRewriteModel) IsKnown() bool {
+ switch r {
+ case InstanceReadResponseRewriteModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceReadResponseRewriteModelCfMetaLlama3_1_8bInstructFast, InstanceReadResponseRewriteModelCfMetaLlama3_1_8bInstructFp8, InstanceReadResponseRewriteModelCfMetaLlama4Scout17b16eInstruct, InstanceReadResponseRewriteModelCfQwenQwen3_30bA3bFp8, InstanceReadResponseRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceReadResponseRewriteModelCfMoonshotaiKimiK2Instruct, InstanceReadResponseRewriteModelAnthropicClaude3_7Sonnet, InstanceReadResponseRewriteModelAnthropicClaudeSonnet4, InstanceReadResponseRewriteModelAnthropicClaudeOpus4, InstanceReadResponseRewriteModelAnthropicClaude3_5Haiku, InstanceReadResponseRewriteModelCerebrasQwen3_235bA22bInstruct, InstanceReadResponseRewriteModelCerebrasQwen3_235bA22bThinking, InstanceReadResponseRewriteModelCerebrasLlama3_3_70b, InstanceReadResponseRewriteModelCerebrasLlama4Maverick17b128eInstruct, InstanceReadResponseRewriteModelCerebrasLlama4Scout17b16eInstruct, InstanceReadResponseRewriteModelCerebrasGptOSs120b, InstanceReadResponseRewriteModelGoogleAIStudioGemini2_5Flash, InstanceReadResponseRewriteModelGoogleAIStudioGemini2_5Pro, InstanceReadResponseRewriteModelGrokGrok4, InstanceReadResponseRewriteModelGroqLlama3_3_70bVersatile, InstanceReadResponseRewriteModelGroqLlama3_1_8bInstant, InstanceReadResponseRewriteModelOpenAIGpt5, InstanceReadResponseRewriteModelOpenAIGpt5Mini, InstanceReadResponseRewriteModelOpenAIGpt5Nano, InstanceReadResponseRewriteModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceReadResponseSourceParams struct {
+ // List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ // /private/\*_, _\private\*)
+ ExcludeItems []string `json:"exclude_items"`
+ // List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ // /docs/\*_, _\blog\*.html)
+ IncludeItems []string `json:"include_items"`
+ Prefix string `json:"prefix"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ WebCrawler InstanceReadResponseSourceParamsWebCrawler `json:"web_crawler"`
+ JSON instanceReadResponseSourceParamsJSON `json:"-"`
+}
+
+// instanceReadResponseSourceParamsJSON contains the JSON metadata for the struct
+// [InstanceReadResponseSourceParams]
+type instanceReadResponseSourceParamsJSON struct {
+ ExcludeItems apijson.Field
+ IncludeItems apijson.Field
+ Prefix apijson.Field
+ R2Jurisdiction apijson.Field
+ WebCrawler apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceReadResponseSourceParams) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceReadResponseSourceParamsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceReadResponseSourceParamsWebCrawler struct {
+ ParseOptions InstanceReadResponseSourceParamsWebCrawlerParseOptions `json:"parse_options"`
+ ParseType InstanceReadResponseSourceParamsWebCrawlerParseType `json:"parse_type"`
+ StoreOptions InstanceReadResponseSourceParamsWebCrawlerStoreOptions `json:"store_options"`
+ JSON instanceReadResponseSourceParamsWebCrawlerJSON `json:"-"`
+}
+
+// instanceReadResponseSourceParamsWebCrawlerJSON contains the JSON metadata for
+// the struct [InstanceReadResponseSourceParamsWebCrawler]
+type instanceReadResponseSourceParamsWebCrawlerJSON struct {
+ ParseOptions apijson.Field
+ ParseType apijson.Field
+ StoreOptions apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceReadResponseSourceParamsWebCrawler) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceReadResponseSourceParamsWebCrawlerJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceReadResponseSourceParamsWebCrawlerParseOptions struct {
+ IncludeHeaders map[string]string `json:"include_headers"`
+ IncludeImages bool `json:"include_images"`
+ UseBrowserRendering bool `json:"use_browser_rendering"`
+ JSON instanceReadResponseSourceParamsWebCrawlerParseOptionsJSON `json:"-"`
+}
+
+// instanceReadResponseSourceParamsWebCrawlerParseOptionsJSON contains the JSON
+// metadata for the struct [InstanceReadResponseSourceParamsWebCrawlerParseOptions]
+type instanceReadResponseSourceParamsWebCrawlerParseOptionsJSON struct {
+ IncludeHeaders apijson.Field
+ IncludeImages apijson.Field
+ UseBrowserRendering apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceReadResponseSourceParamsWebCrawlerParseOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceReadResponseSourceParamsWebCrawlerParseOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceReadResponseSourceParamsWebCrawlerParseType string
+
+const (
+ InstanceReadResponseSourceParamsWebCrawlerParseTypeSitemap InstanceReadResponseSourceParamsWebCrawlerParseType = "sitemap"
+ InstanceReadResponseSourceParamsWebCrawlerParseTypeFeedRss InstanceReadResponseSourceParamsWebCrawlerParseType = "feed-rss"
+)
+
+func (r InstanceReadResponseSourceParamsWebCrawlerParseType) IsKnown() bool {
+ switch r {
+ case InstanceReadResponseSourceParamsWebCrawlerParseTypeSitemap, InstanceReadResponseSourceParamsWebCrawlerParseTypeFeedRss:
+ return true
+ }
+ return false
+}
+
+type InstanceReadResponseSourceParamsWebCrawlerStoreOptions struct {
+ StorageID string `json:"storage_id,required"`
+ R2Jurisdiction string `json:"r2_jurisdiction"`
+ StorageType r2.Provider `json:"storage_type"`
+ JSON instanceReadResponseSourceParamsWebCrawlerStoreOptionsJSON `json:"-"`
+}
+
+// instanceReadResponseSourceParamsWebCrawlerStoreOptionsJSON contains the JSON
+// metadata for the struct [InstanceReadResponseSourceParamsWebCrawlerStoreOptions]
+type instanceReadResponseSourceParamsWebCrawlerStoreOptionsJSON struct {
+ StorageID apijson.Field
+ R2Jurisdiction apijson.Field
+ StorageType apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceReadResponseSourceParamsWebCrawlerStoreOptions) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceReadResponseSourceParamsWebCrawlerStoreOptionsJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceReadResponseSummarizationModel string
+
+const (
+ InstanceReadResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast InstanceReadResponseSummarizationModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceReadResponseSummarizationModelCfMetaLlama3_1_8bInstructFast InstanceReadResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceReadResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8 InstanceReadResponseSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceReadResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct InstanceReadResponseSummarizationModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceReadResponseSummarizationModelCfQwenQwen3_30bA3bFp8 InstanceReadResponseSummarizationModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceReadResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceReadResponseSummarizationModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceReadResponseSummarizationModelCfMoonshotaiKimiK2Instruct InstanceReadResponseSummarizationModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceReadResponseSummarizationModelAnthropicClaude3_7Sonnet InstanceReadResponseSummarizationModel = "anthropic/claude-3-7-sonnet"
+ InstanceReadResponseSummarizationModelAnthropicClaudeSonnet4 InstanceReadResponseSummarizationModel = "anthropic/claude-sonnet-4"
+ InstanceReadResponseSummarizationModelAnthropicClaudeOpus4 InstanceReadResponseSummarizationModel = "anthropic/claude-opus-4"
+ InstanceReadResponseSummarizationModelAnthropicClaude3_5Haiku InstanceReadResponseSummarizationModel = "anthropic/claude-3-5-haiku"
+ InstanceReadResponseSummarizationModelCerebrasQwen3_235bA22bInstruct InstanceReadResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceReadResponseSummarizationModelCerebrasQwen3_235bA22bThinking InstanceReadResponseSummarizationModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceReadResponseSummarizationModelCerebrasLlama3_3_70b InstanceReadResponseSummarizationModel = "cerebras/llama-3.3-70b"
+ InstanceReadResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct InstanceReadResponseSummarizationModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceReadResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct InstanceReadResponseSummarizationModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceReadResponseSummarizationModelCerebrasGptOSs120b InstanceReadResponseSummarizationModel = "cerebras/gpt-oss-120b"
+ InstanceReadResponseSummarizationModelGoogleAIStudioGemini2_5Flash InstanceReadResponseSummarizationModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceReadResponseSummarizationModelGoogleAIStudioGemini2_5Pro InstanceReadResponseSummarizationModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceReadResponseSummarizationModelGrokGrok4 InstanceReadResponseSummarizationModel = "grok/grok-4"
+ InstanceReadResponseSummarizationModelGroqLlama3_3_70bVersatile InstanceReadResponseSummarizationModel = "groq/llama-3.3-70b-versatile"
+ InstanceReadResponseSummarizationModelGroqLlama3_1_8bInstant InstanceReadResponseSummarizationModel = "groq/llama-3.1-8b-instant"
+ InstanceReadResponseSummarizationModelOpenAIGpt5 InstanceReadResponseSummarizationModel = "openai/gpt-5"
+ InstanceReadResponseSummarizationModelOpenAIGpt5Mini InstanceReadResponseSummarizationModel = "openai/gpt-5-mini"
+ InstanceReadResponseSummarizationModelOpenAIGpt5Nano InstanceReadResponseSummarizationModel = "openai/gpt-5-nano"
+ InstanceReadResponseSummarizationModelEmpty InstanceReadResponseSummarizationModel = ""
+)
+
+func (r InstanceReadResponseSummarizationModel) IsKnown() bool {
+ switch r {
+ case InstanceReadResponseSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceReadResponseSummarizationModelCfMetaLlama3_1_8bInstructFast, InstanceReadResponseSummarizationModelCfMetaLlama3_1_8bInstructFp8, InstanceReadResponseSummarizationModelCfMetaLlama4Scout17b16eInstruct, InstanceReadResponseSummarizationModelCfQwenQwen3_30bA3bFp8, InstanceReadResponseSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceReadResponseSummarizationModelCfMoonshotaiKimiK2Instruct, InstanceReadResponseSummarizationModelAnthropicClaude3_7Sonnet, InstanceReadResponseSummarizationModelAnthropicClaudeSonnet4, InstanceReadResponseSummarizationModelAnthropicClaudeOpus4, InstanceReadResponseSummarizationModelAnthropicClaude3_5Haiku, InstanceReadResponseSummarizationModelCerebrasQwen3_235bA22bInstruct, InstanceReadResponseSummarizationModelCerebrasQwen3_235bA22bThinking, InstanceReadResponseSummarizationModelCerebrasLlama3_3_70b, InstanceReadResponseSummarizationModelCerebrasLlama4Maverick17b128eInstruct, InstanceReadResponseSummarizationModelCerebrasLlama4Scout17b16eInstruct, InstanceReadResponseSummarizationModelCerebrasGptOSs120b, InstanceReadResponseSummarizationModelGoogleAIStudioGemini2_5Flash, InstanceReadResponseSummarizationModelGoogleAIStudioGemini2_5Pro, InstanceReadResponseSummarizationModelGrokGrok4, InstanceReadResponseSummarizationModelGroqLlama3_3_70bVersatile, InstanceReadResponseSummarizationModelGroqLlama3_1_8bInstant, InstanceReadResponseSummarizationModelOpenAIGpt5, InstanceReadResponseSummarizationModelOpenAIGpt5Mini, InstanceReadResponseSummarizationModelOpenAIGpt5Nano, InstanceReadResponseSummarizationModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceStatsResponse struct {
+ Completed int64 `json:"completed"`
+ Error int64 `json:"error"`
+ FileEmbedErrors map[string]interface{} `json:"file_embed_errors"`
+ IndexSourceErrors map[string]interface{} `json:"index_source_errors"`
+ LastActivity time.Time `json:"last_activity" format:"date-time"`
+ Queued int64 `json:"queued"`
+ Running int64 `json:"running"`
+ Skipped int64 `json:"skipped"`
+ JSON instanceStatsResponseJSON `json:"-"`
+}
+
+// instanceStatsResponseJSON contains the JSON metadata for the struct
+// [InstanceStatsResponse]
+type instanceStatsResponseJSON struct {
+ Completed apijson.Field
+ Error apijson.Field
+ FileEmbedErrors apijson.Field
+ IndexSourceErrors apijson.Field
+ LastActivity apijson.Field
+ Queued apijson.Field
+ Running apijson.Field
+ Skipped apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceStatsResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceStatsResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceNewParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ // Use your AI Search ID.
+ ID param.Field[string] `json:"id,required"`
+ Source param.Field[string] `json:"source,required"`
+ TokenID param.Field[string] `json:"token_id,required" format:"uuid"`
+ Type param.Field[InstanceNewParamsType] `json:"type,required"`
+ AIGatewayID param.Field[string] `json:"ai_gateway_id"`
+ AISearchModel param.Field[InstanceNewParamsAISearchModel] `json:"ai_search_model"`
+ Chunk param.Field[bool] `json:"chunk"`
+ ChunkOverlap param.Field[int64] `json:"chunk_overlap"`
+ ChunkSize param.Field[int64] `json:"chunk_size"`
+ EmbeddingModel param.Field[InstanceNewParamsEmbeddingModel] `json:"embedding_model"`
+ MaxNumResults param.Field[int64] `json:"max_num_results"`
+ Metadata param.Field[InstanceNewParamsMetadata] `json:"metadata"`
+ Reranking param.Field[bool] `json:"reranking"`
+ RerankingModel param.Field[InstanceNewParamsRerankingModel] `json:"reranking_model"`
+ RewriteModel param.Field[InstanceNewParamsRewriteModel] `json:"rewrite_model"`
+ RewriteQuery param.Field[bool] `json:"rewrite_query"`
+ ScoreThreshold param.Field[float64] `json:"score_threshold"`
+ SourceParams param.Field[InstanceNewParamsSourceParams] `json:"source_params"`
+}
+
+func (r InstanceNewParams) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceNewParamsType string
+
+const (
+ InstanceNewParamsTypeR2 InstanceNewParamsType = "r2"
+ InstanceNewParamsTypeWebCrawler InstanceNewParamsType = "web-crawler"
+)
+
+func (r InstanceNewParamsType) IsKnown() bool {
+ switch r {
+ case InstanceNewParamsTypeR2, InstanceNewParamsTypeWebCrawler:
+ return true
+ }
+ return false
+}
+
+type InstanceNewParamsAISearchModel string
+
+const (
+ InstanceNewParamsAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceNewParamsAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceNewParamsAISearchModelCfMetaLlama3_1_8bInstructFast InstanceNewParamsAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceNewParamsAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceNewParamsAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceNewParamsAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceNewParamsAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceNewParamsAISearchModelCfQwenQwen3_30bA3bFp8 InstanceNewParamsAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceNewParamsAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceNewParamsAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceNewParamsAISearchModelCfMoonshotaiKimiK2Instruct InstanceNewParamsAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceNewParamsAISearchModelAnthropicClaude3_7Sonnet InstanceNewParamsAISearchModel = "anthropic/claude-3-7-sonnet"
+ InstanceNewParamsAISearchModelAnthropicClaudeSonnet4 InstanceNewParamsAISearchModel = "anthropic/claude-sonnet-4"
+ InstanceNewParamsAISearchModelAnthropicClaudeOpus4 InstanceNewParamsAISearchModel = "anthropic/claude-opus-4"
+ InstanceNewParamsAISearchModelAnthropicClaude3_5Haiku InstanceNewParamsAISearchModel = "anthropic/claude-3-5-haiku"
+ InstanceNewParamsAISearchModelCerebrasQwen3_235bA22bInstruct InstanceNewParamsAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceNewParamsAISearchModelCerebrasQwen3_235bA22bThinking InstanceNewParamsAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceNewParamsAISearchModelCerebrasLlama3_3_70b InstanceNewParamsAISearchModel = "cerebras/llama-3.3-70b"
+ InstanceNewParamsAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceNewParamsAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceNewParamsAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceNewParamsAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceNewParamsAISearchModelCerebrasGptOSs120b InstanceNewParamsAISearchModel = "cerebras/gpt-oss-120b"
+ InstanceNewParamsAISearchModelGoogleAIStudioGemini2_5Flash InstanceNewParamsAISearchModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceNewParamsAISearchModelGoogleAIStudioGemini2_5Pro InstanceNewParamsAISearchModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceNewParamsAISearchModelGrokGrok4 InstanceNewParamsAISearchModel = "grok/grok-4"
+ InstanceNewParamsAISearchModelGroqLlama3_3_70bVersatile InstanceNewParamsAISearchModel = "groq/llama-3.3-70b-versatile"
+ InstanceNewParamsAISearchModelGroqLlama3_1_8bInstant InstanceNewParamsAISearchModel = "groq/llama-3.1-8b-instant"
+ InstanceNewParamsAISearchModelOpenAIGpt5 InstanceNewParamsAISearchModel = "openai/gpt-5"
+ InstanceNewParamsAISearchModelOpenAIGpt5Mini InstanceNewParamsAISearchModel = "openai/gpt-5-mini"
+ InstanceNewParamsAISearchModelOpenAIGpt5Nano InstanceNewParamsAISearchModel = "openai/gpt-5-nano"
+ InstanceNewParamsAISearchModelEmpty InstanceNewParamsAISearchModel = ""
+)
+
+func (r InstanceNewParamsAISearchModel) IsKnown() bool {
+ switch r {
+ case InstanceNewParamsAISearchModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceNewParamsAISearchModelCfMetaLlama3_1_8bInstructFast, InstanceNewParamsAISearchModelCfMetaLlama3_1_8bInstructFp8, InstanceNewParamsAISearchModelCfMetaLlama4Scout17b16eInstruct, InstanceNewParamsAISearchModelCfQwenQwen3_30bA3bFp8, InstanceNewParamsAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceNewParamsAISearchModelCfMoonshotaiKimiK2Instruct, InstanceNewParamsAISearchModelAnthropicClaude3_7Sonnet, InstanceNewParamsAISearchModelAnthropicClaudeSonnet4, InstanceNewParamsAISearchModelAnthropicClaudeOpus4, InstanceNewParamsAISearchModelAnthropicClaude3_5Haiku, InstanceNewParamsAISearchModelCerebrasQwen3_235bA22bInstruct, InstanceNewParamsAISearchModelCerebrasQwen3_235bA22bThinking, InstanceNewParamsAISearchModelCerebrasLlama3_3_70b, InstanceNewParamsAISearchModelCerebrasLlama4Maverick17b128eInstruct, InstanceNewParamsAISearchModelCerebrasLlama4Scout17b16eInstruct, InstanceNewParamsAISearchModelCerebrasGptOSs120b, InstanceNewParamsAISearchModelGoogleAIStudioGemini2_5Flash, InstanceNewParamsAISearchModelGoogleAIStudioGemini2_5Pro, InstanceNewParamsAISearchModelGrokGrok4, InstanceNewParamsAISearchModelGroqLlama3_3_70bVersatile, InstanceNewParamsAISearchModelGroqLlama3_1_8bInstant, InstanceNewParamsAISearchModelOpenAIGpt5, InstanceNewParamsAISearchModelOpenAIGpt5Mini, InstanceNewParamsAISearchModelOpenAIGpt5Nano, InstanceNewParamsAISearchModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceNewParamsEmbeddingModel string
+
+const (
+ InstanceNewParamsEmbeddingModelCfBaaiBgeM3 InstanceNewParamsEmbeddingModel = "@cf/baai/bge-m3"
+ InstanceNewParamsEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceNewParamsEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
+ InstanceNewParamsEmbeddingModelCfGoogleEmbeddinggemma300m InstanceNewParamsEmbeddingModel = "@cf/google/embeddinggemma-300m"
+ InstanceNewParamsEmbeddingModelCfQwenQwen3Embedding0_6b InstanceNewParamsEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
+ InstanceNewParamsEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceNewParamsEmbeddingModel = "google-ai-studio/gemini-embedding-001"
+ InstanceNewParamsEmbeddingModelOpenAITextEmbedding3Small InstanceNewParamsEmbeddingModel = "openai/text-embedding-3-small"
+ InstanceNewParamsEmbeddingModelOpenAITextEmbedding3Large InstanceNewParamsEmbeddingModel = "openai/text-embedding-3-large"
+ InstanceNewParamsEmbeddingModelEmpty InstanceNewParamsEmbeddingModel = ""
+)
+
+func (r InstanceNewParamsEmbeddingModel) IsKnown() bool {
+ switch r {
+ case InstanceNewParamsEmbeddingModelCfBaaiBgeM3, InstanceNewParamsEmbeddingModelCfBaaiBgeLargeEnV1_5, InstanceNewParamsEmbeddingModelCfGoogleEmbeddinggemma300m, InstanceNewParamsEmbeddingModelCfQwenQwen3Embedding0_6b, InstanceNewParamsEmbeddingModelGoogleAIStudioGeminiEmbedding001, InstanceNewParamsEmbeddingModelOpenAITextEmbedding3Small, InstanceNewParamsEmbeddingModelOpenAITextEmbedding3Large, InstanceNewParamsEmbeddingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceNewParamsMetadata struct {
+ CreatedFromAISearchWizard param.Field[bool] `json:"created_from_aisearch_wizard"`
+ WorkerDomain param.Field[string] `json:"worker_domain"`
+}
+
+func (r InstanceNewParamsMetadata) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceNewParamsRerankingModel string
+
+const (
+ InstanceNewParamsRerankingModelCfBaaiBgeRerankerBase InstanceNewParamsRerankingModel = "@cf/baai/bge-reranker-base"
+ InstanceNewParamsRerankingModelEmpty InstanceNewParamsRerankingModel = ""
+)
+
+func (r InstanceNewParamsRerankingModel) IsKnown() bool {
+ switch r {
+ case InstanceNewParamsRerankingModelCfBaaiBgeRerankerBase, InstanceNewParamsRerankingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceNewParamsRewriteModel string
+
+const (
+ InstanceNewParamsRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceNewParamsRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceNewParamsRewriteModelCfMetaLlama3_1_8bInstructFast InstanceNewParamsRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceNewParamsRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceNewParamsRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceNewParamsRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceNewParamsRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceNewParamsRewriteModelCfQwenQwen3_30bA3bFp8 InstanceNewParamsRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceNewParamsRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceNewParamsRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceNewParamsRewriteModelCfMoonshotaiKimiK2Instruct InstanceNewParamsRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceNewParamsRewriteModelAnthropicClaude3_7Sonnet InstanceNewParamsRewriteModel = "anthropic/claude-3-7-sonnet"
+ InstanceNewParamsRewriteModelAnthropicClaudeSonnet4 InstanceNewParamsRewriteModel = "anthropic/claude-sonnet-4"
+ InstanceNewParamsRewriteModelAnthropicClaudeOpus4 InstanceNewParamsRewriteModel = "anthropic/claude-opus-4"
+ InstanceNewParamsRewriteModelAnthropicClaude3_5Haiku InstanceNewParamsRewriteModel = "anthropic/claude-3-5-haiku"
+ InstanceNewParamsRewriteModelCerebrasQwen3_235bA22bInstruct InstanceNewParamsRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceNewParamsRewriteModelCerebrasQwen3_235bA22bThinking InstanceNewParamsRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceNewParamsRewriteModelCerebrasLlama3_3_70b InstanceNewParamsRewriteModel = "cerebras/llama-3.3-70b"
+ InstanceNewParamsRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceNewParamsRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceNewParamsRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceNewParamsRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceNewParamsRewriteModelCerebrasGptOSs120b InstanceNewParamsRewriteModel = "cerebras/gpt-oss-120b"
+ InstanceNewParamsRewriteModelGoogleAIStudioGemini2_5Flash InstanceNewParamsRewriteModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceNewParamsRewriteModelGoogleAIStudioGemini2_5Pro InstanceNewParamsRewriteModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceNewParamsRewriteModelGrokGrok4 InstanceNewParamsRewriteModel = "grok/grok-4"
+ InstanceNewParamsRewriteModelGroqLlama3_3_70bVersatile InstanceNewParamsRewriteModel = "groq/llama-3.3-70b-versatile"
+ InstanceNewParamsRewriteModelGroqLlama3_1_8bInstant InstanceNewParamsRewriteModel = "groq/llama-3.1-8b-instant"
+ InstanceNewParamsRewriteModelOpenAIGpt5 InstanceNewParamsRewriteModel = "openai/gpt-5"
+ InstanceNewParamsRewriteModelOpenAIGpt5Mini InstanceNewParamsRewriteModel = "openai/gpt-5-mini"
+ InstanceNewParamsRewriteModelOpenAIGpt5Nano InstanceNewParamsRewriteModel = "openai/gpt-5-nano"
+ InstanceNewParamsRewriteModelEmpty InstanceNewParamsRewriteModel = ""
+)
+
+func (r InstanceNewParamsRewriteModel) IsKnown() bool {
+ switch r {
+ case InstanceNewParamsRewriteModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceNewParamsRewriteModelCfMetaLlama3_1_8bInstructFast, InstanceNewParamsRewriteModelCfMetaLlama3_1_8bInstructFp8, InstanceNewParamsRewriteModelCfMetaLlama4Scout17b16eInstruct, InstanceNewParamsRewriteModelCfQwenQwen3_30bA3bFp8, InstanceNewParamsRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceNewParamsRewriteModelCfMoonshotaiKimiK2Instruct, InstanceNewParamsRewriteModelAnthropicClaude3_7Sonnet, InstanceNewParamsRewriteModelAnthropicClaudeSonnet4, InstanceNewParamsRewriteModelAnthropicClaudeOpus4, InstanceNewParamsRewriteModelAnthropicClaude3_5Haiku, InstanceNewParamsRewriteModelCerebrasQwen3_235bA22bInstruct, InstanceNewParamsRewriteModelCerebrasQwen3_235bA22bThinking, InstanceNewParamsRewriteModelCerebrasLlama3_3_70b, InstanceNewParamsRewriteModelCerebrasLlama4Maverick17b128eInstruct, InstanceNewParamsRewriteModelCerebrasLlama4Scout17b16eInstruct, InstanceNewParamsRewriteModelCerebrasGptOSs120b, InstanceNewParamsRewriteModelGoogleAIStudioGemini2_5Flash, InstanceNewParamsRewriteModelGoogleAIStudioGemini2_5Pro, InstanceNewParamsRewriteModelGrokGrok4, InstanceNewParamsRewriteModelGroqLlama3_3_70bVersatile, InstanceNewParamsRewriteModelGroqLlama3_1_8bInstant, InstanceNewParamsRewriteModelOpenAIGpt5, InstanceNewParamsRewriteModelOpenAIGpt5Mini, InstanceNewParamsRewriteModelOpenAIGpt5Nano, InstanceNewParamsRewriteModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceNewParamsSourceParams struct {
+ // List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ // /private/\*_, _\private\*)
+ ExcludeItems param.Field[[]string] `json:"exclude_items"`
+ // List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ // /docs/\*_, _\blog\*.html)
+ IncludeItems param.Field[[]string] `json:"include_items"`
+ Prefix param.Field[string] `json:"prefix"`
+ R2Jurisdiction param.Field[string] `json:"r2_jurisdiction"`
+ WebCrawler param.Field[InstanceNewParamsSourceParamsWebCrawler] `json:"web_crawler"`
+}
+
+func (r InstanceNewParamsSourceParams) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceNewParamsSourceParamsWebCrawler struct {
+ ParseOptions param.Field[InstanceNewParamsSourceParamsWebCrawlerParseOptions] `json:"parse_options"`
+ ParseType param.Field[InstanceNewParamsSourceParamsWebCrawlerParseType] `json:"parse_type"`
+ StoreOptions param.Field[InstanceNewParamsSourceParamsWebCrawlerStoreOptions] `json:"store_options"`
+}
+
+func (r InstanceNewParamsSourceParamsWebCrawler) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceNewParamsSourceParamsWebCrawlerParseOptions struct {
+ IncludeHeaders param.Field[map[string]string] `json:"include_headers"`
+ IncludeImages param.Field[bool] `json:"include_images"`
+ UseBrowserRendering param.Field[bool] `json:"use_browser_rendering"`
+}
+
+func (r InstanceNewParamsSourceParamsWebCrawlerParseOptions) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceNewParamsSourceParamsWebCrawlerParseType string
+
+const (
+ InstanceNewParamsSourceParamsWebCrawlerParseTypeSitemap InstanceNewParamsSourceParamsWebCrawlerParseType = "sitemap"
+ InstanceNewParamsSourceParamsWebCrawlerParseTypeFeedRss InstanceNewParamsSourceParamsWebCrawlerParseType = "feed-rss"
+)
+
+func (r InstanceNewParamsSourceParamsWebCrawlerParseType) IsKnown() bool {
+ switch r {
+ case InstanceNewParamsSourceParamsWebCrawlerParseTypeSitemap, InstanceNewParamsSourceParamsWebCrawlerParseTypeFeedRss:
+ return true
+ }
+ return false
+}
+
+type InstanceNewParamsSourceParamsWebCrawlerStoreOptions struct {
+ StorageID param.Field[string] `json:"storage_id,required"`
+ R2Jurisdiction param.Field[string] `json:"r2_jurisdiction"`
+ StorageType param.Field[r2.Provider] `json:"storage_type"`
+}
+
+func (r InstanceNewParamsSourceParamsWebCrawlerStoreOptions) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceNewResponseEnvelope struct {
+ Result InstanceNewResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON instanceNewResponseEnvelopeJSON `json:"-"`
+}
+
+// instanceNewResponseEnvelopeJSON contains the JSON metadata for the struct
+// [InstanceNewResponseEnvelope]
+type instanceNewResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceNewResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceUpdateParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ AIGatewayID param.Field[string] `json:"ai_gateway_id"`
+ AISearchModel param.Field[InstanceUpdateParamsAISearchModel] `json:"ai_search_model"`
+ Cache param.Field[bool] `json:"cache"`
+ CacheThreshold param.Field[InstanceUpdateParamsCacheThreshold] `json:"cache_threshold"`
+ Chunk param.Field[bool] `json:"chunk"`
+ ChunkOverlap param.Field[int64] `json:"chunk_overlap"`
+ ChunkSize param.Field[int64] `json:"chunk_size"`
+ EmbeddingModel param.Field[InstanceUpdateParamsEmbeddingModel] `json:"embedding_model"`
+ MaxNumResults param.Field[int64] `json:"max_num_results"`
+ Metadata param.Field[InstanceUpdateParamsMetadata] `json:"metadata"`
+ Paused param.Field[bool] `json:"paused"`
+ Reranking param.Field[bool] `json:"reranking"`
+ RerankingModel param.Field[InstanceUpdateParamsRerankingModel] `json:"reranking_model"`
+ RewriteModel param.Field[InstanceUpdateParamsRewriteModel] `json:"rewrite_model"`
+ RewriteQuery param.Field[bool] `json:"rewrite_query"`
+ ScoreThreshold param.Field[float64] `json:"score_threshold"`
+ SourceParams param.Field[InstanceUpdateParamsSourceParams] `json:"source_params"`
+ Summarization param.Field[bool] `json:"summarization"`
+ SummarizationModel param.Field[InstanceUpdateParamsSummarizationModel] `json:"summarization_model"`
+ SystemPromptAISearch param.Field[string] `json:"system_prompt_ai_search"`
+ SystemPromptIndexSummarization param.Field[string] `json:"system_prompt_index_summarization"`
+ SystemPromptRewriteQuery param.Field[string] `json:"system_prompt_rewrite_query"`
+ TokenID param.Field[string] `json:"token_id" format:"uuid"`
+}
+
+func (r InstanceUpdateParams) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceUpdateParamsAISearchModel string
+
+const (
+ InstanceUpdateParamsAISearchModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateParamsAISearchModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceUpdateParamsAISearchModelCfMetaLlama3_1_8bInstructFast InstanceUpdateParamsAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceUpdateParamsAISearchModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateParamsAISearchModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceUpdateParamsAISearchModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateParamsAISearchModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateParamsAISearchModelCfQwenQwen3_30bA3bFp8 InstanceUpdateParamsAISearchModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceUpdateParamsAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateParamsAISearchModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceUpdateParamsAISearchModelCfMoonshotaiKimiK2Instruct InstanceUpdateParamsAISearchModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceUpdateParamsAISearchModelAnthropicClaude3_7Sonnet InstanceUpdateParamsAISearchModel = "anthropic/claude-3-7-sonnet"
+ InstanceUpdateParamsAISearchModelAnthropicClaudeSonnet4 InstanceUpdateParamsAISearchModel = "anthropic/claude-sonnet-4"
+ InstanceUpdateParamsAISearchModelAnthropicClaudeOpus4 InstanceUpdateParamsAISearchModel = "anthropic/claude-opus-4"
+ InstanceUpdateParamsAISearchModelAnthropicClaude3_5Haiku InstanceUpdateParamsAISearchModel = "anthropic/claude-3-5-haiku"
+ InstanceUpdateParamsAISearchModelCerebrasQwen3_235bA22bInstruct InstanceUpdateParamsAISearchModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceUpdateParamsAISearchModelCerebrasQwen3_235bA22bThinking InstanceUpdateParamsAISearchModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceUpdateParamsAISearchModelCerebrasLlama3_3_70b InstanceUpdateParamsAISearchModel = "cerebras/llama-3.3-70b"
+ InstanceUpdateParamsAISearchModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateParamsAISearchModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceUpdateParamsAISearchModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateParamsAISearchModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateParamsAISearchModelCerebrasGptOSs120b InstanceUpdateParamsAISearchModel = "cerebras/gpt-oss-120b"
+ InstanceUpdateParamsAISearchModelGoogleAIStudioGemini2_5Flash InstanceUpdateParamsAISearchModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceUpdateParamsAISearchModelGoogleAIStudioGemini2_5Pro InstanceUpdateParamsAISearchModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceUpdateParamsAISearchModelGrokGrok4 InstanceUpdateParamsAISearchModel = "grok/grok-4"
+ InstanceUpdateParamsAISearchModelGroqLlama3_3_70bVersatile InstanceUpdateParamsAISearchModel = "groq/llama-3.3-70b-versatile"
+ InstanceUpdateParamsAISearchModelGroqLlama3_1_8bInstant InstanceUpdateParamsAISearchModel = "groq/llama-3.1-8b-instant"
+ InstanceUpdateParamsAISearchModelOpenAIGpt5 InstanceUpdateParamsAISearchModel = "openai/gpt-5"
+ InstanceUpdateParamsAISearchModelOpenAIGpt5Mini InstanceUpdateParamsAISearchModel = "openai/gpt-5-mini"
+ InstanceUpdateParamsAISearchModelOpenAIGpt5Nano InstanceUpdateParamsAISearchModel = "openai/gpt-5-nano"
+ InstanceUpdateParamsAISearchModelEmpty InstanceUpdateParamsAISearchModel = ""
+)
+
+func (r InstanceUpdateParamsAISearchModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateParamsAISearchModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceUpdateParamsAISearchModelCfMetaLlama3_1_8bInstructFast, InstanceUpdateParamsAISearchModelCfMetaLlama3_1_8bInstructFp8, InstanceUpdateParamsAISearchModelCfMetaLlama4Scout17b16eInstruct, InstanceUpdateParamsAISearchModelCfQwenQwen3_30bA3bFp8, InstanceUpdateParamsAISearchModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceUpdateParamsAISearchModelCfMoonshotaiKimiK2Instruct, InstanceUpdateParamsAISearchModelAnthropicClaude3_7Sonnet, InstanceUpdateParamsAISearchModelAnthropicClaudeSonnet4, InstanceUpdateParamsAISearchModelAnthropicClaudeOpus4, InstanceUpdateParamsAISearchModelAnthropicClaude3_5Haiku, InstanceUpdateParamsAISearchModelCerebrasQwen3_235bA22bInstruct, InstanceUpdateParamsAISearchModelCerebrasQwen3_235bA22bThinking, InstanceUpdateParamsAISearchModelCerebrasLlama3_3_70b, InstanceUpdateParamsAISearchModelCerebrasLlama4Maverick17b128eInstruct, InstanceUpdateParamsAISearchModelCerebrasLlama4Scout17b16eInstruct, InstanceUpdateParamsAISearchModelCerebrasGptOSs120b, InstanceUpdateParamsAISearchModelGoogleAIStudioGemini2_5Flash, InstanceUpdateParamsAISearchModelGoogleAIStudioGemini2_5Pro, InstanceUpdateParamsAISearchModelGrokGrok4, InstanceUpdateParamsAISearchModelGroqLlama3_3_70bVersatile, InstanceUpdateParamsAISearchModelGroqLlama3_1_8bInstant, InstanceUpdateParamsAISearchModelOpenAIGpt5, InstanceUpdateParamsAISearchModelOpenAIGpt5Mini, InstanceUpdateParamsAISearchModelOpenAIGpt5Nano, InstanceUpdateParamsAISearchModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateParamsCacheThreshold string
+
+const (
+ InstanceUpdateParamsCacheThresholdSuperStrictMatch InstanceUpdateParamsCacheThreshold = "super_strict_match"
+ InstanceUpdateParamsCacheThresholdCloseEnough InstanceUpdateParamsCacheThreshold = "close_enough"
+ InstanceUpdateParamsCacheThresholdFlexibleFriend InstanceUpdateParamsCacheThreshold = "flexible_friend"
+ InstanceUpdateParamsCacheThresholdAnythingGoes InstanceUpdateParamsCacheThreshold = "anything_goes"
+)
+
+func (r InstanceUpdateParamsCacheThreshold) IsKnown() bool {
+ switch r {
+ case InstanceUpdateParamsCacheThresholdSuperStrictMatch, InstanceUpdateParamsCacheThresholdCloseEnough, InstanceUpdateParamsCacheThresholdFlexibleFriend, InstanceUpdateParamsCacheThresholdAnythingGoes:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateParamsEmbeddingModel string
+
+const (
+ InstanceUpdateParamsEmbeddingModelCfBaaiBgeM3 InstanceUpdateParamsEmbeddingModel = "@cf/baai/bge-m3"
+ InstanceUpdateParamsEmbeddingModelCfBaaiBgeLargeEnV1_5 InstanceUpdateParamsEmbeddingModel = "@cf/baai/bge-large-en-v1.5"
+ InstanceUpdateParamsEmbeddingModelCfGoogleEmbeddinggemma300m InstanceUpdateParamsEmbeddingModel = "@cf/google/embeddinggemma-300m"
+ InstanceUpdateParamsEmbeddingModelCfQwenQwen3Embedding0_6b InstanceUpdateParamsEmbeddingModel = "@cf/qwen/qwen3-embedding-0.6b"
+ InstanceUpdateParamsEmbeddingModelGoogleAIStudioGeminiEmbedding001 InstanceUpdateParamsEmbeddingModel = "google-ai-studio/gemini-embedding-001"
+ InstanceUpdateParamsEmbeddingModelOpenAITextEmbedding3Small InstanceUpdateParamsEmbeddingModel = "openai/text-embedding-3-small"
+ InstanceUpdateParamsEmbeddingModelOpenAITextEmbedding3Large InstanceUpdateParamsEmbeddingModel = "openai/text-embedding-3-large"
+ InstanceUpdateParamsEmbeddingModelEmpty InstanceUpdateParamsEmbeddingModel = ""
+)
+
+func (r InstanceUpdateParamsEmbeddingModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateParamsEmbeddingModelCfBaaiBgeM3, InstanceUpdateParamsEmbeddingModelCfBaaiBgeLargeEnV1_5, InstanceUpdateParamsEmbeddingModelCfGoogleEmbeddinggemma300m, InstanceUpdateParamsEmbeddingModelCfQwenQwen3Embedding0_6b, InstanceUpdateParamsEmbeddingModelGoogleAIStudioGeminiEmbedding001, InstanceUpdateParamsEmbeddingModelOpenAITextEmbedding3Small, InstanceUpdateParamsEmbeddingModelOpenAITextEmbedding3Large, InstanceUpdateParamsEmbeddingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateParamsMetadata struct {
+ CreatedFromAISearchWizard param.Field[bool] `json:"created_from_aisearch_wizard"`
+ WorkerDomain param.Field[string] `json:"worker_domain"`
+}
+
+func (r InstanceUpdateParamsMetadata) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceUpdateParamsRerankingModel string
+
+const (
+ InstanceUpdateParamsRerankingModelCfBaaiBgeRerankerBase InstanceUpdateParamsRerankingModel = "@cf/baai/bge-reranker-base"
+ InstanceUpdateParamsRerankingModelEmpty InstanceUpdateParamsRerankingModel = ""
+)
+
+func (r InstanceUpdateParamsRerankingModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateParamsRerankingModelCfBaaiBgeRerankerBase, InstanceUpdateParamsRerankingModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateParamsRewriteModel string
+
+const (
+ InstanceUpdateParamsRewriteModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateParamsRewriteModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceUpdateParamsRewriteModelCfMetaLlama3_1_8bInstructFast InstanceUpdateParamsRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceUpdateParamsRewriteModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateParamsRewriteModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceUpdateParamsRewriteModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateParamsRewriteModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateParamsRewriteModelCfQwenQwen3_30bA3bFp8 InstanceUpdateParamsRewriteModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceUpdateParamsRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateParamsRewriteModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceUpdateParamsRewriteModelCfMoonshotaiKimiK2Instruct InstanceUpdateParamsRewriteModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceUpdateParamsRewriteModelAnthropicClaude3_7Sonnet InstanceUpdateParamsRewriteModel = "anthropic/claude-3-7-sonnet"
+ InstanceUpdateParamsRewriteModelAnthropicClaudeSonnet4 InstanceUpdateParamsRewriteModel = "anthropic/claude-sonnet-4"
+ InstanceUpdateParamsRewriteModelAnthropicClaudeOpus4 InstanceUpdateParamsRewriteModel = "anthropic/claude-opus-4"
+ InstanceUpdateParamsRewriteModelAnthropicClaude3_5Haiku InstanceUpdateParamsRewriteModel = "anthropic/claude-3-5-haiku"
+ InstanceUpdateParamsRewriteModelCerebrasQwen3_235bA22bInstruct InstanceUpdateParamsRewriteModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceUpdateParamsRewriteModelCerebrasQwen3_235bA22bThinking InstanceUpdateParamsRewriteModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceUpdateParamsRewriteModelCerebrasLlama3_3_70b InstanceUpdateParamsRewriteModel = "cerebras/llama-3.3-70b"
+ InstanceUpdateParamsRewriteModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateParamsRewriteModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceUpdateParamsRewriteModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateParamsRewriteModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateParamsRewriteModelCerebrasGptOSs120b InstanceUpdateParamsRewriteModel = "cerebras/gpt-oss-120b"
+ InstanceUpdateParamsRewriteModelGoogleAIStudioGemini2_5Flash InstanceUpdateParamsRewriteModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceUpdateParamsRewriteModelGoogleAIStudioGemini2_5Pro InstanceUpdateParamsRewriteModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceUpdateParamsRewriteModelGrokGrok4 InstanceUpdateParamsRewriteModel = "grok/grok-4"
+ InstanceUpdateParamsRewriteModelGroqLlama3_3_70bVersatile InstanceUpdateParamsRewriteModel = "groq/llama-3.3-70b-versatile"
+ InstanceUpdateParamsRewriteModelGroqLlama3_1_8bInstant InstanceUpdateParamsRewriteModel = "groq/llama-3.1-8b-instant"
+ InstanceUpdateParamsRewriteModelOpenAIGpt5 InstanceUpdateParamsRewriteModel = "openai/gpt-5"
+ InstanceUpdateParamsRewriteModelOpenAIGpt5Mini InstanceUpdateParamsRewriteModel = "openai/gpt-5-mini"
+ InstanceUpdateParamsRewriteModelOpenAIGpt5Nano InstanceUpdateParamsRewriteModel = "openai/gpt-5-nano"
+ InstanceUpdateParamsRewriteModelEmpty InstanceUpdateParamsRewriteModel = ""
+)
+
+func (r InstanceUpdateParamsRewriteModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateParamsRewriteModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceUpdateParamsRewriteModelCfMetaLlama3_1_8bInstructFast, InstanceUpdateParamsRewriteModelCfMetaLlama3_1_8bInstructFp8, InstanceUpdateParamsRewriteModelCfMetaLlama4Scout17b16eInstruct, InstanceUpdateParamsRewriteModelCfQwenQwen3_30bA3bFp8, InstanceUpdateParamsRewriteModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceUpdateParamsRewriteModelCfMoonshotaiKimiK2Instruct, InstanceUpdateParamsRewriteModelAnthropicClaude3_7Sonnet, InstanceUpdateParamsRewriteModelAnthropicClaudeSonnet4, InstanceUpdateParamsRewriteModelAnthropicClaudeOpus4, InstanceUpdateParamsRewriteModelAnthropicClaude3_5Haiku, InstanceUpdateParamsRewriteModelCerebrasQwen3_235bA22bInstruct, InstanceUpdateParamsRewriteModelCerebrasQwen3_235bA22bThinking, InstanceUpdateParamsRewriteModelCerebrasLlama3_3_70b, InstanceUpdateParamsRewriteModelCerebrasLlama4Maverick17b128eInstruct, InstanceUpdateParamsRewriteModelCerebrasLlama4Scout17b16eInstruct, InstanceUpdateParamsRewriteModelCerebrasGptOSs120b, InstanceUpdateParamsRewriteModelGoogleAIStudioGemini2_5Flash, InstanceUpdateParamsRewriteModelGoogleAIStudioGemini2_5Pro, InstanceUpdateParamsRewriteModelGrokGrok4, InstanceUpdateParamsRewriteModelGroqLlama3_3_70bVersatile, InstanceUpdateParamsRewriteModelGroqLlama3_1_8bInstant, InstanceUpdateParamsRewriteModelOpenAIGpt5, InstanceUpdateParamsRewriteModelOpenAIGpt5Mini, InstanceUpdateParamsRewriteModelOpenAIGpt5Nano, InstanceUpdateParamsRewriteModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateParamsSourceParams struct {
+ // List of path patterns to exclude. Supports wildcards (e.g., _/admin/_,
+ // /private/\*_, _\private\*)
+ ExcludeItems param.Field[[]string] `json:"exclude_items"`
+ // List of path patterns to include. Supports wildcards (e.g., _/blog/_.html,
+ // /docs/\*_, _\blog\*.html)
+ IncludeItems param.Field[[]string] `json:"include_items"`
+ Prefix param.Field[string] `json:"prefix"`
+ R2Jurisdiction param.Field[string] `json:"r2_jurisdiction"`
+ WebCrawler param.Field[InstanceUpdateParamsSourceParamsWebCrawler] `json:"web_crawler"`
+}
+
+func (r InstanceUpdateParamsSourceParams) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceUpdateParamsSourceParamsWebCrawler struct {
+ ParseOptions param.Field[InstanceUpdateParamsSourceParamsWebCrawlerParseOptions] `json:"parse_options"`
+ ParseType param.Field[InstanceUpdateParamsSourceParamsWebCrawlerParseType] `json:"parse_type"`
+ StoreOptions param.Field[InstanceUpdateParamsSourceParamsWebCrawlerStoreOptions] `json:"store_options"`
+}
+
+func (r InstanceUpdateParamsSourceParamsWebCrawler) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceUpdateParamsSourceParamsWebCrawlerParseOptions struct {
+ IncludeHeaders param.Field[map[string]string] `json:"include_headers"`
+ IncludeImages param.Field[bool] `json:"include_images"`
+ UseBrowserRendering param.Field[bool] `json:"use_browser_rendering"`
+}
+
+func (r InstanceUpdateParamsSourceParamsWebCrawlerParseOptions) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceUpdateParamsSourceParamsWebCrawlerParseType string
+
+const (
+ InstanceUpdateParamsSourceParamsWebCrawlerParseTypeSitemap InstanceUpdateParamsSourceParamsWebCrawlerParseType = "sitemap"
+ InstanceUpdateParamsSourceParamsWebCrawlerParseTypeFeedRss InstanceUpdateParamsSourceParamsWebCrawlerParseType = "feed-rss"
+)
+
+func (r InstanceUpdateParamsSourceParamsWebCrawlerParseType) IsKnown() bool {
+ switch r {
+ case InstanceUpdateParamsSourceParamsWebCrawlerParseTypeSitemap, InstanceUpdateParamsSourceParamsWebCrawlerParseTypeFeedRss:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateParamsSourceParamsWebCrawlerStoreOptions struct {
+ StorageID param.Field[string] `json:"storage_id,required"`
+ R2Jurisdiction param.Field[string] `json:"r2_jurisdiction"`
+ StorageType param.Field[r2.Provider] `json:"storage_type"`
+}
+
+func (r InstanceUpdateParamsSourceParamsWebCrawlerStoreOptions) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type InstanceUpdateParamsSummarizationModel string
+
+const (
+ InstanceUpdateParamsSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast InstanceUpdateParamsSummarizationModel = "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
+ InstanceUpdateParamsSummarizationModelCfMetaLlama3_1_8bInstructFast InstanceUpdateParamsSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fast"
+ InstanceUpdateParamsSummarizationModelCfMetaLlama3_1_8bInstructFp8 InstanceUpdateParamsSummarizationModel = "@cf/meta/llama-3.1-8b-instruct-fp8"
+ InstanceUpdateParamsSummarizationModelCfMetaLlama4Scout17b16eInstruct InstanceUpdateParamsSummarizationModel = "@cf/meta/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateParamsSummarizationModelCfQwenQwen3_30bA3bFp8 InstanceUpdateParamsSummarizationModel = "@cf/qwen/qwen3-30b-a3b-fp8"
+ InstanceUpdateParamsSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b InstanceUpdateParamsSummarizationModel = "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b"
+ InstanceUpdateParamsSummarizationModelCfMoonshotaiKimiK2Instruct InstanceUpdateParamsSummarizationModel = "@cf/moonshotai/kimi-k2-instruct"
+ InstanceUpdateParamsSummarizationModelAnthropicClaude3_7Sonnet InstanceUpdateParamsSummarizationModel = "anthropic/claude-3-7-sonnet"
+ InstanceUpdateParamsSummarizationModelAnthropicClaudeSonnet4 InstanceUpdateParamsSummarizationModel = "anthropic/claude-sonnet-4"
+ InstanceUpdateParamsSummarizationModelAnthropicClaudeOpus4 InstanceUpdateParamsSummarizationModel = "anthropic/claude-opus-4"
+ InstanceUpdateParamsSummarizationModelAnthropicClaude3_5Haiku InstanceUpdateParamsSummarizationModel = "anthropic/claude-3-5-haiku"
+ InstanceUpdateParamsSummarizationModelCerebrasQwen3_235bA22bInstruct InstanceUpdateParamsSummarizationModel = "cerebras/qwen-3-235b-a22b-instruct"
+ InstanceUpdateParamsSummarizationModelCerebrasQwen3_235bA22bThinking InstanceUpdateParamsSummarizationModel = "cerebras/qwen-3-235b-a22b-thinking"
+ InstanceUpdateParamsSummarizationModelCerebrasLlama3_3_70b InstanceUpdateParamsSummarizationModel = "cerebras/llama-3.3-70b"
+ InstanceUpdateParamsSummarizationModelCerebrasLlama4Maverick17b128eInstruct InstanceUpdateParamsSummarizationModel = "cerebras/llama-4-maverick-17b-128e-instruct"
+ InstanceUpdateParamsSummarizationModelCerebrasLlama4Scout17b16eInstruct InstanceUpdateParamsSummarizationModel = "cerebras/llama-4-scout-17b-16e-instruct"
+ InstanceUpdateParamsSummarizationModelCerebrasGptOSs120b InstanceUpdateParamsSummarizationModel = "cerebras/gpt-oss-120b"
+ InstanceUpdateParamsSummarizationModelGoogleAIStudioGemini2_5Flash InstanceUpdateParamsSummarizationModel = "google-ai-studio/gemini-2.5-flash"
+ InstanceUpdateParamsSummarizationModelGoogleAIStudioGemini2_5Pro InstanceUpdateParamsSummarizationModel = "google-ai-studio/gemini-2.5-pro"
+ InstanceUpdateParamsSummarizationModelGrokGrok4 InstanceUpdateParamsSummarizationModel = "grok/grok-4"
+ InstanceUpdateParamsSummarizationModelGroqLlama3_3_70bVersatile InstanceUpdateParamsSummarizationModel = "groq/llama-3.3-70b-versatile"
+ InstanceUpdateParamsSummarizationModelGroqLlama3_1_8bInstant InstanceUpdateParamsSummarizationModel = "groq/llama-3.1-8b-instant"
+ InstanceUpdateParamsSummarizationModelOpenAIGpt5 InstanceUpdateParamsSummarizationModel = "openai/gpt-5"
+ InstanceUpdateParamsSummarizationModelOpenAIGpt5Mini InstanceUpdateParamsSummarizationModel = "openai/gpt-5-mini"
+ InstanceUpdateParamsSummarizationModelOpenAIGpt5Nano InstanceUpdateParamsSummarizationModel = "openai/gpt-5-nano"
+ InstanceUpdateParamsSummarizationModelEmpty InstanceUpdateParamsSummarizationModel = ""
+)
+
+func (r InstanceUpdateParamsSummarizationModel) IsKnown() bool {
+ switch r {
+ case InstanceUpdateParamsSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast, InstanceUpdateParamsSummarizationModelCfMetaLlama3_1_8bInstructFast, InstanceUpdateParamsSummarizationModelCfMetaLlama3_1_8bInstructFp8, InstanceUpdateParamsSummarizationModelCfMetaLlama4Scout17b16eInstruct, InstanceUpdateParamsSummarizationModelCfQwenQwen3_30bA3bFp8, InstanceUpdateParamsSummarizationModelCfDeepseekAIDeepseekR1DistillQwen32b, InstanceUpdateParamsSummarizationModelCfMoonshotaiKimiK2Instruct, InstanceUpdateParamsSummarizationModelAnthropicClaude3_7Sonnet, InstanceUpdateParamsSummarizationModelAnthropicClaudeSonnet4, InstanceUpdateParamsSummarizationModelAnthropicClaudeOpus4, InstanceUpdateParamsSummarizationModelAnthropicClaude3_5Haiku, InstanceUpdateParamsSummarizationModelCerebrasQwen3_235bA22bInstruct, InstanceUpdateParamsSummarizationModelCerebrasQwen3_235bA22bThinking, InstanceUpdateParamsSummarizationModelCerebrasLlama3_3_70b, InstanceUpdateParamsSummarizationModelCerebrasLlama4Maverick17b128eInstruct, InstanceUpdateParamsSummarizationModelCerebrasLlama4Scout17b16eInstruct, InstanceUpdateParamsSummarizationModelCerebrasGptOSs120b, InstanceUpdateParamsSummarizationModelGoogleAIStudioGemini2_5Flash, InstanceUpdateParamsSummarizationModelGoogleAIStudioGemini2_5Pro, InstanceUpdateParamsSummarizationModelGrokGrok4, InstanceUpdateParamsSummarizationModelGroqLlama3_3_70bVersatile, InstanceUpdateParamsSummarizationModelGroqLlama3_1_8bInstant, InstanceUpdateParamsSummarizationModelOpenAIGpt5, InstanceUpdateParamsSummarizationModelOpenAIGpt5Mini, InstanceUpdateParamsSummarizationModelOpenAIGpt5Nano, InstanceUpdateParamsSummarizationModelEmpty:
+ return true
+ }
+ return false
+}
+
+type InstanceUpdateResponseEnvelope struct {
+ Result InstanceUpdateResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON instanceUpdateResponseEnvelopeJSON `json:"-"`
+}
+
+// instanceUpdateResponseEnvelopeJSON contains the JSON metadata for the struct
+// [InstanceUpdateResponseEnvelope]
+type instanceUpdateResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceUpdateResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceListParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ Page param.Field[int64] `query:"page"`
+ PerPage param.Field[int64] `query:"per_page"`
+ // Search by id
+ Search param.Field[string] `query:"search"`
+}
+
+// URLQuery serializes [InstanceListParams]'s query parameters as `url.Values`.
+func (r InstanceListParams) URLQuery() (v url.Values) {
+ return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
+ ArrayFormat: apiquery.ArrayQueryFormatRepeat,
+ NestedFormat: apiquery.NestedQueryFormatDots,
+ })
+}
+
+type InstanceDeleteParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+}
+
+type InstanceDeleteResponseEnvelope struct {
+ Result InstanceDeleteResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON instanceDeleteResponseEnvelopeJSON `json:"-"`
+}
+
+// instanceDeleteResponseEnvelopeJSON contains the JSON metadata for the struct
+// [InstanceDeleteResponseEnvelope]
+type instanceDeleteResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceDeleteResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceReadParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+}
+
+type InstanceReadResponseEnvelope struct {
+ Result InstanceReadResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON instanceReadResponseEnvelopeJSON `json:"-"`
+}
+
+// instanceReadResponseEnvelopeJSON contains the JSON metadata for the struct
+// [InstanceReadResponseEnvelope]
+type instanceReadResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceReadResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceReadResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceStatsParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+}
+
+type InstanceStatsResponseEnvelope struct {
+ Result InstanceStatsResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON instanceStatsResponseEnvelopeJSON `json:"-"`
+}
+
+// instanceStatsResponseEnvelopeJSON contains the JSON metadata for the struct
+// [InstanceStatsResponseEnvelope]
+type instanceStatsResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceStatsResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceStatsResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
diff --git a/ai_search/instance_test.go b/ai_search/instance_test.go
new file mode 100644
index 00000000000..9ac6253f16e
--- /dev/null
+++ b/ai_search/instance_test.go
@@ -0,0 +1,272 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search_test
+
+import (
+ "context"
+ "errors"
+ "os"
+ "testing"
+
+ "github.com/cloudflare/cloudflare-go/v6"
+ "github.com/cloudflare/cloudflare-go/v6/ai_search"
+ "github.com/cloudflare/cloudflare-go/v6/internal/testutil"
+ "github.com/cloudflare/cloudflare-go/v6/option"
+ "github.com/cloudflare/cloudflare-go/v6/r2"
+)
+
+func TestInstanceNewWithOptionalParams(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.AISearch.Instances.New(context.TODO(), ai_search.InstanceNewParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ ID: cloudflare.F("my-ai-search"),
+ Source: cloudflare.F("source"),
+ TokenID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ Type: cloudflare.F(ai_search.InstanceNewParamsTypeR2),
+ AIGatewayID: cloudflare.F("ai_gateway_id"),
+ AISearchModel: cloudflare.F(ai_search.InstanceNewParamsAISearchModelCfMetaLlama3_3_70bInstructFp8Fast),
+ Chunk: cloudflare.F(true),
+ ChunkOverlap: cloudflare.F(int64(0)),
+ ChunkSize: cloudflare.F(int64(64)),
+ EmbeddingModel: cloudflare.F(ai_search.InstanceNewParamsEmbeddingModelCfBaaiBgeM3),
+ MaxNumResults: cloudflare.F(int64(1)),
+ Metadata: cloudflare.F(ai_search.InstanceNewParamsMetadata{
+ CreatedFromAISearchWizard: cloudflare.F(true),
+ WorkerDomain: cloudflare.F("worker_domain"),
+ }),
+ Reranking: cloudflare.F(true),
+ RerankingModel: cloudflare.F(ai_search.InstanceNewParamsRerankingModelCfBaaiBgeRerankerBase),
+ RewriteModel: cloudflare.F(ai_search.InstanceNewParamsRewriteModelCfMetaLlama3_3_70bInstructFp8Fast),
+ RewriteQuery: cloudflare.F(true),
+ ScoreThreshold: cloudflare.F(0.000000),
+ SourceParams: cloudflare.F(ai_search.InstanceNewParamsSourceParams{
+ ExcludeItems: cloudflare.F([]string{"/admin/*", "/private/**", "*\\temp\\*"}),
+ IncludeItems: cloudflare.F([]string{"/blog/*", "/docs/**/*.html", "*\\blog\\*.html"}),
+ Prefix: cloudflare.F("prefix"),
+ R2Jurisdiction: cloudflare.F("r2_jurisdiction"),
+ WebCrawler: cloudflare.F(ai_search.InstanceNewParamsSourceParamsWebCrawler{
+ ParseOptions: cloudflare.F(ai_search.InstanceNewParamsSourceParamsWebCrawlerParseOptions{
+ IncludeHeaders: cloudflare.F(map[string]string{
+ "foo": "string",
+ }),
+ IncludeImages: cloudflare.F(true),
+ UseBrowserRendering: cloudflare.F(true),
+ }),
+ ParseType: cloudflare.F(ai_search.InstanceNewParamsSourceParamsWebCrawlerParseTypeSitemap),
+ StoreOptions: cloudflare.F(ai_search.InstanceNewParamsSourceParamsWebCrawlerStoreOptions{
+ StorageID: cloudflare.F("storage_id"),
+ R2Jurisdiction: cloudflare.F("r2_jurisdiction"),
+ StorageType: cloudflare.F(r2.ProviderR2),
+ }),
+ }),
+ }),
+ })
+ 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 TestInstanceUpdateWithOptionalParams(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.AISearch.Instances.Update(
+ context.TODO(),
+ "my-ai-search",
+ ai_search.InstanceUpdateParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ AIGatewayID: cloudflare.F("ai_gateway_id"),
+ AISearchModel: cloudflare.F(ai_search.InstanceUpdateParamsAISearchModelCfMetaLlama3_3_70bInstructFp8Fast),
+ Cache: cloudflare.F(true),
+ CacheThreshold: cloudflare.F(ai_search.InstanceUpdateParamsCacheThresholdSuperStrictMatch),
+ Chunk: cloudflare.F(true),
+ ChunkOverlap: cloudflare.F(int64(0)),
+ ChunkSize: cloudflare.F(int64(64)),
+ EmbeddingModel: cloudflare.F(ai_search.InstanceUpdateParamsEmbeddingModelCfBaaiBgeM3),
+ MaxNumResults: cloudflare.F(int64(1)),
+ Metadata: cloudflare.F(ai_search.InstanceUpdateParamsMetadata{
+ CreatedFromAISearchWizard: cloudflare.F(true),
+ WorkerDomain: cloudflare.F("worker_domain"),
+ }),
+ Paused: cloudflare.F(true),
+ Reranking: cloudflare.F(true),
+ RerankingModel: cloudflare.F(ai_search.InstanceUpdateParamsRerankingModelCfBaaiBgeRerankerBase),
+ RewriteModel: cloudflare.F(ai_search.InstanceUpdateParamsRewriteModelCfMetaLlama3_3_70bInstructFp8Fast),
+ RewriteQuery: cloudflare.F(true),
+ ScoreThreshold: cloudflare.F(0.000000),
+ SourceParams: cloudflare.F(ai_search.InstanceUpdateParamsSourceParams{
+ ExcludeItems: cloudflare.F([]string{"/admin/*", "/private/**", "*\\temp\\*"}),
+ IncludeItems: cloudflare.F([]string{"/blog/*", "/docs/**/*.html", "*\\blog\\*.html"}),
+ Prefix: cloudflare.F("prefix"),
+ R2Jurisdiction: cloudflare.F("r2_jurisdiction"),
+ WebCrawler: cloudflare.F(ai_search.InstanceUpdateParamsSourceParamsWebCrawler{
+ ParseOptions: cloudflare.F(ai_search.InstanceUpdateParamsSourceParamsWebCrawlerParseOptions{
+ IncludeHeaders: cloudflare.F(map[string]string{
+ "foo": "string",
+ }),
+ IncludeImages: cloudflare.F(true),
+ UseBrowserRendering: cloudflare.F(true),
+ }),
+ ParseType: cloudflare.F(ai_search.InstanceUpdateParamsSourceParamsWebCrawlerParseTypeSitemap),
+ StoreOptions: cloudflare.F(ai_search.InstanceUpdateParamsSourceParamsWebCrawlerStoreOptions{
+ StorageID: cloudflare.F("storage_id"),
+ R2Jurisdiction: cloudflare.F("r2_jurisdiction"),
+ StorageType: cloudflare.F(r2.ProviderR2),
+ }),
+ }),
+ }),
+ Summarization: cloudflare.F(true),
+ SummarizationModel: cloudflare.F(ai_search.InstanceUpdateParamsSummarizationModelCfMetaLlama3_3_70bInstructFp8Fast),
+ SystemPromptAISearch: cloudflare.F("system_prompt_ai_search"),
+ SystemPromptIndexSummarization: cloudflare.F("system_prompt_index_summarization"),
+ SystemPromptRewriteQuery: cloudflare.F("system_prompt_rewrite_query"),
+ TokenID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
+ },
+ )
+ 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 TestInstanceListWithOptionalParams(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.AISearch.Instances.List(context.TODO(), ai_search.InstanceListParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ 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 TestInstanceDelete(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.AISearch.Instances.Delete(
+ context.TODO(),
+ "my-ai-search",
+ ai_search.InstanceDeleteParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ },
+ )
+ 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 TestInstanceRead(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.AISearch.Instances.Read(
+ context.TODO(),
+ "my-ai-search",
+ ai_search.InstanceReadParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ },
+ )
+ 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 TestInstanceStats(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.AISearch.Instances.Stats(
+ context.TODO(),
+ "my-ai-search",
+ ai_search.InstanceStatsParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ },
+ )
+ 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/ai_search/instanceitem.go b/ai_search/instanceitem.go
new file mode 100644
index 00000000000..adf3babc0b9
--- /dev/null
+++ b/ai_search/instanceitem.go
@@ -0,0 +1,254 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search
+
+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"
+)
+
+// InstanceItemService 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 [NewInstanceItemService] method instead.
+type InstanceItemService struct {
+ Options []option.RequestOption
+}
+
+// NewInstanceItemService 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 NewInstanceItemService(opts ...option.RequestOption) (r *InstanceItemService) {
+ r = &InstanceItemService{}
+ r.Options = opts
+ return
+}
+
+// Items List.
+func (r *InstanceItemService) List(ctx context.Context, id string, params InstanceItemListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[InstanceItemListResponse], 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 id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s/items", params.AccountID, id)
+ 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
+}
+
+// Items List.
+func (r *InstanceItemService) ListAutoPaging(ctx context.Context, id string, params InstanceItemListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[InstanceItemListResponse] {
+ return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, id, params, opts...))
+}
+
+// Get Items.
+func (r *InstanceItemService) Get(ctx context.Context, id string, itemID string, query InstanceItemGetParams, opts ...option.RequestOption) (res *InstanceItemGetResponse, err error) {
+ var env InstanceItemGetResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if query.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ if itemID == "" {
+ err = errors.New("missing required item_id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s/items/%s", query.AccountID, id, itemID)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+type InstanceItemListResponse struct {
+ ID string `json:"id,required"`
+ Key string `json:"key,required"`
+ Status InstanceItemListResponseStatus `json:"status,required"`
+ Error string `json:"error"`
+ LastSeenAt time.Time `json:"last_seen_at" format:"date-time"`
+ NextAction string `json:"next_action"`
+ JSON instanceItemListResponseJSON `json:"-"`
+}
+
+// instanceItemListResponseJSON contains the JSON metadata for the struct
+// [InstanceItemListResponse]
+type instanceItemListResponseJSON struct {
+ ID apijson.Field
+ Key apijson.Field
+ Status apijson.Field
+ Error apijson.Field
+ LastSeenAt apijson.Field
+ NextAction apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceItemListResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceItemListResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceItemListResponseStatus string
+
+const (
+ InstanceItemListResponseStatusQueued InstanceItemListResponseStatus = "queued"
+ InstanceItemListResponseStatusRunning InstanceItemListResponseStatus = "running"
+ InstanceItemListResponseStatusCompleted InstanceItemListResponseStatus = "completed"
+ InstanceItemListResponseStatusError InstanceItemListResponseStatus = "error"
+ InstanceItemListResponseStatusSkipped InstanceItemListResponseStatus = "skipped"
+)
+
+func (r InstanceItemListResponseStatus) IsKnown() bool {
+ switch r {
+ case InstanceItemListResponseStatusQueued, InstanceItemListResponseStatusRunning, InstanceItemListResponseStatusCompleted, InstanceItemListResponseStatusError, InstanceItemListResponseStatusSkipped:
+ return true
+ }
+ return false
+}
+
+type InstanceItemGetResponse struct {
+ ID string `json:"id,required"`
+ Key string `json:"key,required"`
+ Status InstanceItemGetResponseStatus `json:"status,required"`
+ Error string `json:"error"`
+ LastSeenAt time.Time `json:"last_seen_at" format:"date-time"`
+ NextAction string `json:"next_action"`
+ JSON instanceItemGetResponseJSON `json:"-"`
+}
+
+// instanceItemGetResponseJSON contains the JSON metadata for the struct
+// [InstanceItemGetResponse]
+type instanceItemGetResponseJSON struct {
+ ID apijson.Field
+ Key apijson.Field
+ Status apijson.Field
+ Error apijson.Field
+ LastSeenAt apijson.Field
+ NextAction apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceItemGetResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceItemGetResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceItemGetResponseStatus string
+
+const (
+ InstanceItemGetResponseStatusQueued InstanceItemGetResponseStatus = "queued"
+ InstanceItemGetResponseStatusRunning InstanceItemGetResponseStatus = "running"
+ InstanceItemGetResponseStatusCompleted InstanceItemGetResponseStatus = "completed"
+ InstanceItemGetResponseStatusError InstanceItemGetResponseStatus = "error"
+ InstanceItemGetResponseStatusSkipped InstanceItemGetResponseStatus = "skipped"
+)
+
+func (r InstanceItemGetResponseStatus) IsKnown() bool {
+ switch r {
+ case InstanceItemGetResponseStatusQueued, InstanceItemGetResponseStatusRunning, InstanceItemGetResponseStatusCompleted, InstanceItemGetResponseStatusError, InstanceItemGetResponseStatusSkipped:
+ return true
+ }
+ return false
+}
+
+type InstanceItemListParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ Page param.Field[int64] `query:"page"`
+ PerPage param.Field[int64] `query:"per_page"`
+ Search param.Field[string] `query:"search"`
+ Status param.Field[InstanceItemListParamsStatus] `query:"status"`
+}
+
+// URLQuery serializes [InstanceItemListParams]'s query parameters as `url.Values`.
+func (r InstanceItemListParams) URLQuery() (v url.Values) {
+ return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
+ ArrayFormat: apiquery.ArrayQueryFormatRepeat,
+ NestedFormat: apiquery.NestedQueryFormatDots,
+ })
+}
+
+type InstanceItemListParamsStatus string
+
+const (
+ InstanceItemListParamsStatusQueued InstanceItemListParamsStatus = "queued"
+ InstanceItemListParamsStatusRunning InstanceItemListParamsStatus = "running"
+ InstanceItemListParamsStatusCompleted InstanceItemListParamsStatus = "completed"
+ InstanceItemListParamsStatusError InstanceItemListParamsStatus = "error"
+ InstanceItemListParamsStatusSkipped InstanceItemListParamsStatus = "skipped"
+)
+
+func (r InstanceItemListParamsStatus) IsKnown() bool {
+ switch r {
+ case InstanceItemListParamsStatusQueued, InstanceItemListParamsStatusRunning, InstanceItemListParamsStatusCompleted, InstanceItemListParamsStatusError, InstanceItemListParamsStatusSkipped:
+ return true
+ }
+ return false
+}
+
+type InstanceItemGetParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+}
+
+type InstanceItemGetResponseEnvelope struct {
+ Result InstanceItemGetResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON instanceItemGetResponseEnvelopeJSON `json:"-"`
+}
+
+// instanceItemGetResponseEnvelopeJSON contains the JSON metadata for the struct
+// [InstanceItemGetResponseEnvelope]
+type instanceItemGetResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceItemGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceItemGetResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
diff --git a/ai_search/instanceitem_test.go b/ai_search/instanceitem_test.go
new file mode 100644
index 00000000000..e6f0d1d30ae
--- /dev/null
+++ b/ai_search/instanceitem_test.go
@@ -0,0 +1,78 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search_test
+
+import (
+ "context"
+ "errors"
+ "os"
+ "testing"
+
+ "github.com/cloudflare/cloudflare-go/v6"
+ "github.com/cloudflare/cloudflare-go/v6/ai_search"
+ "github.com/cloudflare/cloudflare-go/v6/internal/testutil"
+ "github.com/cloudflare/cloudflare-go/v6/option"
+)
+
+func TestInstanceItemListWithOptionalParams(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.AISearch.Instances.Items.List(
+ context.TODO(),
+ "my-ai-search",
+ ai_search.InstanceItemListParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ Page: cloudflare.F(int64(1)),
+ PerPage: cloudflare.F(int64(0)),
+ Search: cloudflare.F("search"),
+ Status: cloudflare.F(ai_search.InstanceItemListParamsStatusQueued),
+ },
+ )
+ 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 TestInstanceItemGet(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.AISearch.Instances.Items.Get(
+ context.TODO(),
+ "my-ai-search",
+ "item_id",
+ ai_search.InstanceItemGetParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ },
+ )
+ 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/ai_search/instancejob.go b/ai_search/instancejob.go
new file mode 100644
index 00000000000..361518008c3
--- /dev/null
+++ b/ai_search/instancejob.go
@@ -0,0 +1,439 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+ "net/url"
+ "slices"
+
+ "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"
+)
+
+// InstanceJobService 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 [NewInstanceJobService] method instead.
+type InstanceJobService struct {
+ Options []option.RequestOption
+}
+
+// NewInstanceJobService 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 NewInstanceJobService(opts ...option.RequestOption) (r *InstanceJobService) {
+ r = &InstanceJobService{}
+ r.Options = opts
+ return
+}
+
+// Create new job
+func (r *InstanceJobService) New(ctx context.Context, id string, body InstanceJobNewParams, opts ...option.RequestOption) (res *InstanceJobNewResponse, err error) {
+ var env InstanceJobNewResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if body.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s/jobs", body.AccountID, id)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// List Jobs
+func (r *InstanceJobService) List(ctx context.Context, id string, params InstanceJobListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[InstanceJobListResponse], 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 id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s/jobs", params.AccountID, id)
+ 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 Jobs
+func (r *InstanceJobService) ListAutoPaging(ctx context.Context, id string, params InstanceJobListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[InstanceJobListResponse] {
+ return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, id, params, opts...))
+}
+
+// Get a Job Details
+func (r *InstanceJobService) Get(ctx context.Context, id string, jobID string, query InstanceJobGetParams, opts ...option.RequestOption) (res *InstanceJobGetResponse, err error) {
+ var env InstanceJobGetResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if query.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ if jobID == "" {
+ err = errors.New("missing required job_id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s/jobs/%s", query.AccountID, id, jobID)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// List Job Logs
+func (r *InstanceJobService) Logs(ctx context.Context, id string, jobID string, params InstanceJobLogsParams, opts ...option.RequestOption) (res *[]InstanceJobLogsResponse, err error) {
+ var env InstanceJobLogsResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if params.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ if jobID == "" {
+ err = errors.New("missing required job_id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/instances/%s/jobs/%s/logs", params.AccountID, id, jobID)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, params, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+type InstanceJobNewResponse struct {
+ ID string `json:"id,required"`
+ Source InstanceJobNewResponseSource `json:"source,required"`
+ EndReason string `json:"end_reason"`
+ EndedAt string `json:"ended_at"`
+ LastSeenAt string `json:"last_seen_at"`
+ StartedAt string `json:"started_at"`
+ JSON instanceJobNewResponseJSON `json:"-"`
+}
+
+// instanceJobNewResponseJSON contains the JSON metadata for the struct
+// [InstanceJobNewResponse]
+type instanceJobNewResponseJSON struct {
+ ID apijson.Field
+ Source apijson.Field
+ EndReason apijson.Field
+ EndedAt apijson.Field
+ LastSeenAt apijson.Field
+ StartedAt apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceJobNewResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceJobNewResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceJobNewResponseSource string
+
+const (
+ InstanceJobNewResponseSourceUser InstanceJobNewResponseSource = "user"
+ InstanceJobNewResponseSourceSchedule InstanceJobNewResponseSource = "schedule"
+)
+
+func (r InstanceJobNewResponseSource) IsKnown() bool {
+ switch r {
+ case InstanceJobNewResponseSourceUser, InstanceJobNewResponseSourceSchedule:
+ return true
+ }
+ return false
+}
+
+type InstanceJobListResponse struct {
+ ID string `json:"id,required"`
+ Source InstanceJobListResponseSource `json:"source,required"`
+ EndReason string `json:"end_reason"`
+ EndedAt string `json:"ended_at"`
+ LastSeenAt string `json:"last_seen_at"`
+ StartedAt string `json:"started_at"`
+ JSON instanceJobListResponseJSON `json:"-"`
+}
+
+// instanceJobListResponseJSON contains the JSON metadata for the struct
+// [InstanceJobListResponse]
+type instanceJobListResponseJSON struct {
+ ID apijson.Field
+ Source apijson.Field
+ EndReason apijson.Field
+ EndedAt apijson.Field
+ LastSeenAt apijson.Field
+ StartedAt apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceJobListResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceJobListResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceJobListResponseSource string
+
+const (
+ InstanceJobListResponseSourceUser InstanceJobListResponseSource = "user"
+ InstanceJobListResponseSourceSchedule InstanceJobListResponseSource = "schedule"
+)
+
+func (r InstanceJobListResponseSource) IsKnown() bool {
+ switch r {
+ case InstanceJobListResponseSourceUser, InstanceJobListResponseSourceSchedule:
+ return true
+ }
+ return false
+}
+
+type InstanceJobGetResponse struct {
+ ID string `json:"id,required"`
+ Source InstanceJobGetResponseSource `json:"source,required"`
+ EndReason string `json:"end_reason"`
+ EndedAt string `json:"ended_at"`
+ LastSeenAt string `json:"last_seen_at"`
+ StartedAt string `json:"started_at"`
+ JSON instanceJobGetResponseJSON `json:"-"`
+}
+
+// instanceJobGetResponseJSON contains the JSON metadata for the struct
+// [InstanceJobGetResponse]
+type instanceJobGetResponseJSON struct {
+ ID apijson.Field
+ Source apijson.Field
+ EndReason apijson.Field
+ EndedAt apijson.Field
+ LastSeenAt apijson.Field
+ StartedAt apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceJobGetResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceJobGetResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceJobGetResponseSource string
+
+const (
+ InstanceJobGetResponseSourceUser InstanceJobGetResponseSource = "user"
+ InstanceJobGetResponseSourceSchedule InstanceJobGetResponseSource = "schedule"
+)
+
+func (r InstanceJobGetResponseSource) IsKnown() bool {
+ switch r {
+ case InstanceJobGetResponseSourceUser, InstanceJobGetResponseSourceSchedule:
+ return true
+ }
+ return false
+}
+
+type InstanceJobLogsResponse struct {
+ ID int64 `json:"id,required"`
+ CreatedAt float64 `json:"created_at,required"`
+ Message string `json:"message,required"`
+ MessageType int64 `json:"message_type,required"`
+ JSON instanceJobLogsResponseJSON `json:"-"`
+}
+
+// instanceJobLogsResponseJSON contains the JSON metadata for the struct
+// [InstanceJobLogsResponse]
+type instanceJobLogsResponseJSON struct {
+ ID apijson.Field
+ CreatedAt apijson.Field
+ Message apijson.Field
+ MessageType apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceJobLogsResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceJobLogsResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceJobNewParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+}
+
+type InstanceJobNewResponseEnvelope struct {
+ Result InstanceJobNewResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON instanceJobNewResponseEnvelopeJSON `json:"-"`
+}
+
+// instanceJobNewResponseEnvelopeJSON contains the JSON metadata for the struct
+// [InstanceJobNewResponseEnvelope]
+type instanceJobNewResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceJobNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceJobNewResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceJobListParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ Page param.Field[int64] `query:"page"`
+ PerPage param.Field[int64] `query:"per_page"`
+}
+
+// URLQuery serializes [InstanceJobListParams]'s query parameters as `url.Values`.
+func (r InstanceJobListParams) URLQuery() (v url.Values) {
+ return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
+ ArrayFormat: apiquery.ArrayQueryFormatRepeat,
+ NestedFormat: apiquery.NestedQueryFormatDots,
+ })
+}
+
+type InstanceJobGetParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+}
+
+type InstanceJobGetResponseEnvelope struct {
+ Result InstanceJobGetResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON instanceJobGetResponseEnvelopeJSON `json:"-"`
+}
+
+// instanceJobGetResponseEnvelopeJSON contains the JSON metadata for the struct
+// [InstanceJobGetResponseEnvelope]
+type instanceJobGetResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceJobGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceJobGetResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceJobLogsParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ Page param.Field[int64] `query:"page"`
+ PerPage param.Field[int64] `query:"per_page"`
+}
+
+// URLQuery serializes [InstanceJobLogsParams]'s query parameters as `url.Values`.
+func (r InstanceJobLogsParams) URLQuery() (v url.Values) {
+ return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
+ ArrayFormat: apiquery.ArrayQueryFormatRepeat,
+ NestedFormat: apiquery.NestedQueryFormatDots,
+ })
+}
+
+type InstanceJobLogsResponseEnvelope struct {
+ Result []InstanceJobLogsResponse `json:"result,required"`
+ ResultInfo InstanceJobLogsResponseEnvelopeResultInfo `json:"result_info,required"`
+ Success bool `json:"success,required"`
+ JSON instanceJobLogsResponseEnvelopeJSON `json:"-"`
+}
+
+// instanceJobLogsResponseEnvelopeJSON contains the JSON metadata for the struct
+// [InstanceJobLogsResponseEnvelope]
+type instanceJobLogsResponseEnvelopeJSON struct {
+ Result apijson.Field
+ ResultInfo apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceJobLogsResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceJobLogsResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type InstanceJobLogsResponseEnvelopeResultInfo struct {
+ Count int64 `json:"count,required"`
+ Page int64 `json:"page,required"`
+ PerPage int64 `json:"per_page,required"`
+ TotalCount int64 `json:"total_count,required"`
+ JSON instanceJobLogsResponseEnvelopeResultInfoJSON `json:"-"`
+}
+
+// instanceJobLogsResponseEnvelopeResultInfoJSON contains the JSON metadata for the
+// struct [InstanceJobLogsResponseEnvelopeResultInfo]
+type instanceJobLogsResponseEnvelopeResultInfoJSON struct {
+ Count apijson.Field
+ Page apijson.Field
+ PerPage apijson.Field
+ TotalCount apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *InstanceJobLogsResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r instanceJobLogsResponseEnvelopeResultInfoJSON) RawJSON() string {
+ return r.raw
+}
diff --git a/ai_search/instancejob_test.go b/ai_search/instancejob_test.go
new file mode 100644
index 00000000000..ff7d59dd2c3
--- /dev/null
+++ b/ai_search/instancejob_test.go
@@ -0,0 +1,137 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search_test
+
+import (
+ "context"
+ "errors"
+ "os"
+ "testing"
+
+ "github.com/cloudflare/cloudflare-go/v6"
+ "github.com/cloudflare/cloudflare-go/v6/ai_search"
+ "github.com/cloudflare/cloudflare-go/v6/internal/testutil"
+ "github.com/cloudflare/cloudflare-go/v6/option"
+)
+
+func TestInstanceJobNew(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.AISearch.Instances.Jobs.New(
+ context.TODO(),
+ "my-ai-search",
+ ai_search.InstanceJobNewParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ },
+ )
+ 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 TestInstanceJobListWithOptionalParams(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.AISearch.Instances.Jobs.List(
+ context.TODO(),
+ "my-ai-search",
+ ai_search.InstanceJobListParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ Page: cloudflare.F(int64(1)),
+ PerPage: cloudflare.F(int64(0)),
+ },
+ )
+ 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 TestInstanceJobGet(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.AISearch.Instances.Jobs.Get(
+ context.TODO(),
+ "my-ai-search",
+ "job_id",
+ ai_search.InstanceJobGetParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ },
+ )
+ 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 TestInstanceJobLogsWithOptionalParams(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.AISearch.Instances.Jobs.Logs(
+ context.TODO(),
+ "my-ai-search",
+ "job_id",
+ ai_search.InstanceJobLogsParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ Page: cloudflare.F(int64(1)),
+ PerPage: cloudflare.F(int64(0)),
+ },
+ )
+ 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/ai_search/token.go b/ai_search/token.go
new file mode 100644
index 00000000000..794d0edb2b1
--- /dev/null
+++ b/ai_search/token.go
@@ -0,0 +1,501 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search
+
+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"
+)
+
+// TokenService 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 [NewTokenService] method instead.
+type TokenService struct {
+ Options []option.RequestOption
+}
+
+// NewTokenService 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 NewTokenService(opts ...option.RequestOption) (r *TokenService) {
+ r = &TokenService{}
+ r.Options = opts
+ return
+}
+
+// Create new tokens.
+func (r *TokenService) New(ctx context.Context, params TokenNewParams, opts ...option.RequestOption) (res *TokenNewResponse, err error) {
+ var env TokenNewResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if params.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/tokens", params.AccountID)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, params, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// Delete tokens.
+func (r *TokenService) Update(ctx context.Context, id string, body TokenUpdateParams, opts ...option.RequestOption) (res *TokenUpdateResponse, err error) {
+ var env TokenUpdateResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if body.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/tokens/%s", body.AccountID, id)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// List tokens.
+func (r *TokenService) List(ctx context.Context, params TokenListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[TokenListResponse], 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/ai-search/tokens", 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 tokens.
+func (r *TokenService) ListAutoPaging(ctx context.Context, params TokenListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[TokenListResponse] {
+ return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...))
+}
+
+// Delete tokens.
+func (r *TokenService) Delete(ctx context.Context, id string, body TokenDeleteParams, opts ...option.RequestOption) (res *TokenDeleteResponse, err error) {
+ var env TokenDeleteResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if body.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/tokens/%s", body.AccountID, id)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+// Delete tokens.
+func (r *TokenService) Read(ctx context.Context, id string, body TokenReadParams, opts ...option.RequestOption) (res *TokenReadResponse, err error) {
+ var env TokenReadResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if body.AccountID.Value == "" {
+ err = errors.New("missing required account_id parameter")
+ return
+ }
+ if id == "" {
+ err = errors.New("missing required id parameter")
+ return
+ }
+ path := fmt.Sprintf("accounts/%s/ai-search/tokens/%s", body.AccountID, id)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodDelete, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
+type TokenNewResponse struct {
+ ID string `json:"id,required" format:"uuid"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CfAPIID string `json:"cf_api_id,required"`
+ CfAPIKey string `json:"cf_api_key,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Name string `json:"name,required"`
+ CreatedBy string `json:"created_by"`
+ Enabled bool `json:"enabled"`
+ Legacy bool `json:"legacy"`
+ ModifiedBy string `json:"modified_by"`
+ SyncedAt time.Time `json:"synced_at" format:"date-time"`
+ JSON tokenNewResponseJSON `json:"-"`
+}
+
+// tokenNewResponseJSON contains the JSON metadata for the struct
+// [TokenNewResponse]
+type tokenNewResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CfAPIID apijson.Field
+ CfAPIKey apijson.Field
+ CreatedAt apijson.Field
+ ModifiedAt apijson.Field
+ Name apijson.Field
+ CreatedBy apijson.Field
+ Enabled apijson.Field
+ Legacy apijson.Field
+ ModifiedBy apijson.Field
+ SyncedAt apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TokenNewResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r tokenNewResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type TokenUpdateResponse struct {
+ ID string `json:"id,required" format:"uuid"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CfAPIID string `json:"cf_api_id,required"`
+ CfAPIKey string `json:"cf_api_key,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Name string `json:"name,required"`
+ CreatedBy string `json:"created_by"`
+ Enabled bool `json:"enabled"`
+ Legacy bool `json:"legacy"`
+ ModifiedBy string `json:"modified_by"`
+ SyncedAt time.Time `json:"synced_at" format:"date-time"`
+ JSON tokenUpdateResponseJSON `json:"-"`
+}
+
+// tokenUpdateResponseJSON contains the JSON metadata for the struct
+// [TokenUpdateResponse]
+type tokenUpdateResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CfAPIID apijson.Field
+ CfAPIKey apijson.Field
+ CreatedAt apijson.Field
+ ModifiedAt apijson.Field
+ Name apijson.Field
+ CreatedBy apijson.Field
+ Enabled apijson.Field
+ Legacy apijson.Field
+ ModifiedBy apijson.Field
+ SyncedAt apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TokenUpdateResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r tokenUpdateResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type TokenListResponse struct {
+ ID string `json:"id,required" format:"uuid"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CfAPIID string `json:"cf_api_id,required"`
+ CfAPIKey string `json:"cf_api_key,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Name string `json:"name,required"`
+ CreatedBy string `json:"created_by"`
+ Enabled bool `json:"enabled"`
+ Legacy bool `json:"legacy"`
+ ModifiedBy string `json:"modified_by"`
+ SyncedAt time.Time `json:"synced_at" format:"date-time"`
+ JSON tokenListResponseJSON `json:"-"`
+}
+
+// tokenListResponseJSON contains the JSON metadata for the struct
+// [TokenListResponse]
+type tokenListResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CfAPIID apijson.Field
+ CfAPIKey apijson.Field
+ CreatedAt apijson.Field
+ ModifiedAt apijson.Field
+ Name apijson.Field
+ CreatedBy apijson.Field
+ Enabled apijson.Field
+ Legacy apijson.Field
+ ModifiedBy apijson.Field
+ SyncedAt apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TokenListResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r tokenListResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type TokenDeleteResponse struct {
+ ID string `json:"id,required" format:"uuid"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CfAPIID string `json:"cf_api_id,required"`
+ CfAPIKey string `json:"cf_api_key,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Name string `json:"name,required"`
+ CreatedBy string `json:"created_by"`
+ Enabled bool `json:"enabled"`
+ Legacy bool `json:"legacy"`
+ ModifiedBy string `json:"modified_by"`
+ SyncedAt time.Time `json:"synced_at" format:"date-time"`
+ JSON tokenDeleteResponseJSON `json:"-"`
+}
+
+// tokenDeleteResponseJSON contains the JSON metadata for the struct
+// [TokenDeleteResponse]
+type tokenDeleteResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CfAPIID apijson.Field
+ CfAPIKey apijson.Field
+ CreatedAt apijson.Field
+ ModifiedAt apijson.Field
+ Name apijson.Field
+ CreatedBy apijson.Field
+ Enabled apijson.Field
+ Legacy apijson.Field
+ ModifiedBy apijson.Field
+ SyncedAt apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TokenDeleteResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r tokenDeleteResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type TokenReadResponse struct {
+ ID string `json:"id,required" format:"uuid"`
+ AccountID string `json:"account_id,required"`
+ AccountTag string `json:"account_tag,required"`
+ CfAPIID string `json:"cf_api_id,required"`
+ CfAPIKey string `json:"cf_api_key,required"`
+ CreatedAt time.Time `json:"created_at,required" format:"date-time"`
+ ModifiedAt time.Time `json:"modified_at,required" format:"date-time"`
+ Name string `json:"name,required"`
+ CreatedBy string `json:"created_by"`
+ Enabled bool `json:"enabled"`
+ Legacy bool `json:"legacy"`
+ ModifiedBy string `json:"modified_by"`
+ SyncedAt time.Time `json:"synced_at" format:"date-time"`
+ JSON tokenReadResponseJSON `json:"-"`
+}
+
+// tokenReadResponseJSON contains the JSON metadata for the struct
+// [TokenReadResponse]
+type tokenReadResponseJSON struct {
+ ID apijson.Field
+ AccountID apijson.Field
+ AccountTag apijson.Field
+ CfAPIID apijson.Field
+ CfAPIKey apijson.Field
+ CreatedAt apijson.Field
+ ModifiedAt apijson.Field
+ Name apijson.Field
+ CreatedBy apijson.Field
+ Enabled apijson.Field
+ Legacy apijson.Field
+ ModifiedBy apijson.Field
+ SyncedAt apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TokenReadResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r tokenReadResponseJSON) RawJSON() string {
+ return r.raw
+}
+
+type TokenNewParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ CfAPIID param.Field[string] `json:"cf_api_id,required"`
+ CfAPIKey param.Field[string] `json:"cf_api_key,required"`
+ Name param.Field[string] `json:"name,required"`
+ Legacy param.Field[bool] `json:"legacy"`
+}
+
+func (r TokenNewParams) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type TokenNewResponseEnvelope struct {
+ Result TokenNewResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON tokenNewResponseEnvelopeJSON `json:"-"`
+}
+
+// tokenNewResponseEnvelopeJSON contains the JSON metadata for the struct
+// [TokenNewResponseEnvelope]
+type tokenNewResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TokenNewResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r tokenNewResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type TokenUpdateParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+}
+
+type TokenUpdateResponseEnvelope struct {
+ Result TokenUpdateResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON tokenUpdateResponseEnvelopeJSON `json:"-"`
+}
+
+// tokenUpdateResponseEnvelopeJSON contains the JSON metadata for the struct
+// [TokenUpdateResponseEnvelope]
+type tokenUpdateResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TokenUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r tokenUpdateResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type TokenListParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+ Page param.Field[int64] `query:"page"`
+ PerPage param.Field[int64] `query:"per_page"`
+}
+
+// URLQuery serializes [TokenListParams]'s query parameters as `url.Values`.
+func (r TokenListParams) URLQuery() (v url.Values) {
+ return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
+ ArrayFormat: apiquery.ArrayQueryFormatRepeat,
+ NestedFormat: apiquery.NestedQueryFormatDots,
+ })
+}
+
+type TokenDeleteParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+}
+
+type TokenDeleteResponseEnvelope struct {
+ Result TokenDeleteResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON tokenDeleteResponseEnvelopeJSON `json:"-"`
+}
+
+// tokenDeleteResponseEnvelopeJSON contains the JSON metadata for the struct
+// [TokenDeleteResponseEnvelope]
+type tokenDeleteResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TokenDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r tokenDeleteResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+type TokenReadParams struct {
+ AccountID param.Field[string] `path:"account_id,required"`
+}
+
+type TokenReadResponseEnvelope struct {
+ Result TokenReadResponse `json:"result,required"`
+ Success bool `json:"success,required"`
+ JSON tokenReadResponseEnvelopeJSON `json:"-"`
+}
+
+// tokenReadResponseEnvelopeJSON contains the JSON metadata for the struct
+// [TokenReadResponseEnvelope]
+type tokenReadResponseEnvelopeJSON struct {
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TokenReadResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r tokenReadResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
diff --git a/ai_search/token_test.go b/ai_search/token_test.go
new file mode 100644
index 00000000000..3f49e17fd66
--- /dev/null
+++ b/ai_search/token_test.go
@@ -0,0 +1,158 @@
+// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+package ai_search_test
+
+import (
+ "context"
+ "errors"
+ "os"
+ "testing"
+
+ "github.com/cloudflare/cloudflare-go/v6"
+ "github.com/cloudflare/cloudflare-go/v6/ai_search"
+ "github.com/cloudflare/cloudflare-go/v6/internal/testutil"
+ "github.com/cloudflare/cloudflare-go/v6/option"
+)
+
+func TestTokenNewWithOptionalParams(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.AISearch.Tokens.New(context.TODO(), ai_search.TokenNewParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ CfAPIID: cloudflare.F("cf_api_id"),
+ CfAPIKey: cloudflare.F("cf_api_key"),
+ Name: cloudflare.F("name"),
+ Legacy: 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 TestTokenUpdate(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.AISearch.Tokens.Update(
+ context.TODO(),
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ai_search.TokenUpdateParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ },
+ )
+ 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 TestTokenListWithOptionalParams(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.AISearch.Tokens.List(context.TODO(), ai_search.TokenListParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ Page: cloudflare.F(int64(1)),
+ PerPage: cloudflare.F(int64(1)),
+ })
+ 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 TestTokenDelete(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.AISearch.Tokens.Delete(
+ context.TODO(),
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ai_search.TokenDeleteParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ },
+ )
+ 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 TestTokenRead(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.AISearch.Tokens.Read(
+ context.TODO(),
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ai_search.TokenReadParams{
+ AccountID: cloudflare.F("c3dc5f0b34a14ff8e1b3ec04895e1b22"),
+ },
+ )
+ 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 d4605bf59e6..289ee33a1ce 100644
--- a/api.md
+++ b/api.md
@@ -2758,16 +2758,20 @@ Methods:
### SchemaValidation
+Params Types:
+
+- api_gateway.SettingsMultipleRequestParam
+
Response Types:
+- api_gateway.SettingsMultipleRequest
- api_gateway.OperationSchemaValidationUpdateResponse
-- api_gateway.OperationSchemaValidationEditResponse
- api_gateway.OperationSchemaValidationGetResponse
Methods:
- client.APIGateway.Operations.SchemaValidation.Update(ctx context.Context, operationID string, params api_gateway.OperationSchemaValidationUpdateParams) (api_gateway.OperationSchemaValidationUpdateResponse, error)
-- client.APIGateway.Operations.SchemaValidation.Edit(ctx context.Context, params api_gateway.OperationSchemaValidationEditParams) (api_gateway.OperationSchemaValidationEditResponse, error)
+- client.APIGateway.Operations.SchemaValidation.Edit(ctx context.Context, params api_gateway.OperationSchemaValidationEditParams) (api_gateway.SettingsMultipleRequest, error)
- client.APIGateway.Operations.SchemaValidation.Get(ctx context.Context, operationID string, query api_gateway.OperationSchemaValidationGetParams) (api_gateway.OperationSchemaValidationGetResponse, error)
## Schemas
@@ -2782,19 +2786,17 @@ Methods:
## Settings
-### SchemaValidation
-
Response Types:
-- api_gateway.SettingSchemaValidationUpdateResponse
-- api_gateway.SettingSchemaValidationEditResponse
-- api_gateway.SettingSchemaValidationGetResponse
+- api_gateway.Settings
+
+### SchemaValidation
Methods:
-- client.APIGateway.Settings.SchemaValidation.Update(ctx context.Context, params api_gateway.SettingSchemaValidationUpdateParams) (api_gateway.SettingSchemaValidationUpdateResponse, error)
-- client.APIGateway.Settings.SchemaValidation.Edit(ctx context.Context, params api_gateway.SettingSchemaValidationEditParams) (api_gateway.SettingSchemaValidationEditResponse, error)
-- client.APIGateway.Settings.SchemaValidation.Get(ctx context.Context, query api_gateway.SettingSchemaValidationGetParams) (api_gateway.SettingSchemaValidationGetResponse, error)
+- client.APIGateway.Settings.SchemaValidation.Update(ctx context.Context, params api_gateway.SettingSchemaValidationUpdateParams) (api_gateway.Settings, error)
+- client.APIGateway.Settings.SchemaValidation.Edit(ctx context.Context, params api_gateway.SettingSchemaValidationEditParams) (api_gateway.Settings, error)
+- client.APIGateway.Settings.SchemaValidation.Get(ctx context.Context, query api_gateway.SettingSchemaValidationGetParams) (api_gateway.Settings, error)
## UserSchemas
@@ -6241,7 +6243,7 @@ Response Types:
Methods:
- 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)
+- client.ZeroTrust.DLP.Datasets.Upload.Edit(ctx context.Context, datasetID string, version int64, dataset io.Reader, params zero_trust.DLPDatasetUploadEditParams) (zero_trust.DLPDatasetUploadEditResponse, error)
#### Versions
@@ -6261,7 +6263,7 @@ Response Types:
Methods:
-- client.ZeroTrust.DLP.Datasets.Versions.Entries.New(ctx context.Context, datasetID string, version int64, entryID string, datasetVersionEntry io.Reader, body zero_trust.DLPDatasetVersionEntryNewParams) (zero_trust.DLPDatasetVersionEntryNewResponse, error)
+- client.ZeroTrust.DLP.Datasets.Versions.Entries.New(ctx context.Context, datasetID string, version int64, entryID string, datasetVersionEntry io.Reader, params zero_trust.DLPDatasetVersionEntryNewParams) (zero_trust.DLPDatasetVersionEntryNewResponse, error)
### Patterns
@@ -7019,7 +7021,7 @@ Response Types:
Methods:
-- client.Radar.AI.ToMarkdown.New(ctx context.Context, body io.Reader, body radar.AIToMarkdownNewParams) (pagination.SinglePage[radar.AIToMarkdownNewResponse], error)
+- client.Radar.AI.ToMarkdown.New(ctx context.Context, body io.Reader, params radar.AIToMarkdownNewParams) (pagination.SinglePage[radar.AIToMarkdownNewResponse], error)
### Inference
@@ -9216,6 +9218,7 @@ Response Types:
- leaked_credential_checks.DetectionUpdateResponse
- leaked_credential_checks.DetectionListResponse
- leaked_credential_checks.DetectionDeleteResponse
+- leaked_credential_checks.DetectionGetResponse
Methods:
@@ -9223,6 +9226,7 @@ Methods:
- client.LeakedCredentialChecks.Detections.Update(ctx context.Context, detectionID string, params leaked_credential_checks.DetectionUpdateParams) (leaked_credential_checks.DetectionUpdateResponse, error)
- client.LeakedCredentialChecks.Detections.List(ctx context.Context, query leaked_credential_checks.DetectionListParams) (pagination.SinglePage[leaked_credential_checks.DetectionListResponse], error)
- client.LeakedCredentialChecks.Detections.Delete(ctx context.Context, detectionID string, body leaked_credential_checks.DetectionDeleteParams) (leaked_credential_checks.DetectionDeleteResponse, error)
+- client.LeakedCredentialChecks.Detections.Get(ctx context.Context, detectionID string, query leaked_credential_checks.DetectionGetParams) (leaked_credential_checks.DetectionGetResponse, error)
# ContentScanning
@@ -9383,7 +9387,75 @@ Response Types:
Methods:
- client.AI.ToMarkdown.Supported(ctx context.Context, query ai.ToMarkdownSupportedParams) (pagination.SinglePage[ai.ToMarkdownSupportedResponse], error)
-- client.AI.ToMarkdown.Transform(ctx context.Context, file io.Reader, body ai.ToMarkdownTransformParams) (pagination.SinglePage[ai.ToMarkdownTransformResponse], error)
+- client.AI.ToMarkdown.Transform(ctx context.Context, file io.Reader, params ai.ToMarkdownTransformParams) (pagination.SinglePage[ai.ToMarkdownTransformResponse], error)
+
+# AISearch
+
+## Instances
+
+Response Types:
+
+- ai_search.InstanceNewResponse
+- ai_search.InstanceUpdateResponse
+- ai_search.InstanceListResponse
+- ai_search.InstanceDeleteResponse
+- ai_search.InstanceReadResponse
+- ai_search.InstanceStatsResponse
+
+Methods:
+
+- client.AISearch.Instances.New(ctx context.Context, params ai_search.InstanceNewParams) (ai_search.InstanceNewResponse, error)
+- client.AISearch.Instances.Update(ctx context.Context, id string, params ai_search.InstanceUpdateParams) (ai_search.InstanceUpdateResponse, error)
+- client.AISearch.Instances.List(ctx context.Context, params ai_search.InstanceListParams) (pagination.V4PagePaginationArray[ai_search.InstanceListResponse], error)
+- client.AISearch.Instances.Delete(ctx context.Context, id string, body ai_search.InstanceDeleteParams) (ai_search.InstanceDeleteResponse, error)
+- client.AISearch.Instances.Read(ctx context.Context, id string, query ai_search.InstanceReadParams) (ai_search.InstanceReadResponse, error)
+- client.AISearch.Instances.Stats(ctx context.Context, id string, query ai_search.InstanceStatsParams) (ai_search.InstanceStatsResponse, error)
+
+### Items
+
+Response Types:
+
+- ai_search.InstanceItemListResponse
+- ai_search.InstanceItemGetResponse
+
+Methods:
+
+- client.AISearch.Instances.Items.List(ctx context.Context, id string, params ai_search.InstanceItemListParams) (pagination.V4PagePaginationArray[ai_search.InstanceItemListResponse], error)
+- client.AISearch.Instances.Items.Get(ctx context.Context, id string, itemID string, query ai_search.InstanceItemGetParams) (ai_search.InstanceItemGetResponse, error)
+
+### Jobs
+
+Response Types:
+
+- ai_search.InstanceJobNewResponse
+- ai_search.InstanceJobListResponse
+- ai_search.InstanceJobGetResponse
+- ai_search.InstanceJobLogsResponse
+
+Methods:
+
+- client.AISearch.Instances.Jobs.New(ctx context.Context, id string, body ai_search.InstanceJobNewParams) (ai_search.InstanceJobNewResponse, error)
+- client.AISearch.Instances.Jobs.List(ctx context.Context, id string, params ai_search.InstanceJobListParams) (pagination.V4PagePaginationArray[ai_search.InstanceJobListResponse], error)
+- client.AISearch.Instances.Jobs.Get(ctx context.Context, id string, jobID string, query ai_search.InstanceJobGetParams) (ai_search.InstanceJobGetResponse, error)
+- client.AISearch.Instances.Jobs.Logs(ctx context.Context, id string, jobID string, params ai_search.InstanceJobLogsParams) ([]ai_search.InstanceJobLogsResponse, error)
+
+## Tokens
+
+Response Types:
+
+- ai_search.TokenNewResponse
+- ai_search.TokenUpdateResponse
+- ai_search.TokenListResponse
+- ai_search.TokenDeleteResponse
+- ai_search.TokenReadResponse
+
+Methods:
+
+- client.AISearch.Tokens.New(ctx context.Context, params ai_search.TokenNewParams) (ai_search.TokenNewResponse, error)
+- client.AISearch.Tokens.Update(ctx context.Context, id string, body ai_search.TokenUpdateParams) (ai_search.TokenUpdateResponse, error)
+- client.AISearch.Tokens.List(ctx context.Context, params ai_search.TokenListParams) (pagination.V4PagePaginationArray[ai_search.TokenListResponse], error)
+- client.AISearch.Tokens.Delete(ctx context.Context, id string, body ai_search.TokenDeleteParams) (ai_search.TokenDeleteResponse, error)
+- client.AISearch.Tokens.Read(ctx context.Context, id string, body ai_search.TokenReadParams) (ai_search.TokenReadResponse, error)
# SecurityCenter
diff --git a/api_gateway/apigateway.go b/api_gateway/apigateway.go
index bd9e09cd25a..c4af2227ff8 100644
--- a/api_gateway/apigateway.go
+++ b/api_gateway/apigateway.go
@@ -13,12 +13,18 @@ import (
// automatically. You should not instantiate this service directly, and instead use
// the [NewAPIGatewayService] method instead.
type APIGatewayService struct {
- Options []option.RequestOption
- Configurations *ConfigurationService
- Discovery *DiscoveryService
- Operations *OperationService
- Schemas *SchemaService
- Settings *SettingService
+ Options []option.RequestOption
+ Configurations *ConfigurationService
+ Discovery *DiscoveryService
+ Operations *OperationService
+ Schemas *SchemaService
+ // Deprecated: Use the
+ // [github.com/cloudflare/cloudflare-go/v6/schema_validation.SettingService]
+ // service instead
+ Settings *SettingService
+ // Deprecated: Use the
+ // [github.com/cloudflare/cloudflare-go/v6/schema_validation.SchemaService] service
+ // instead
UserSchemas *UserSchemaService
ExpressionTemplate *ExpressionTemplateService
}
diff --git a/api_gateway/operation.go b/api_gateway/operation.go
index 273ea842666..7a45a41c7bf 100644
--- a/api_gateway/operation.go
+++ b/api_gateway/operation.go
@@ -28,7 +28,10 @@ import (
// automatically. You should not instantiate this service directly, and instead use
// the [NewOperationService] method instead.
type OperationService struct {
- Options []option.RequestOption
+ Options []option.RequestOption
+ // Deprecated: Use the
+ // [github.com/cloudflare/cloudflare-go/v6/schema_validation.SettingOperationService]
+ // service instead
SchemaValidation *OperationSchemaValidationService
}
diff --git a/api_gateway/operationschemavalidation.go b/api_gateway/operationschemavalidation.go
index 06f018cdc6d..e3d0d20bceb 100644
--- a/api_gateway/operationschemavalidation.go
+++ b/api_gateway/operationschemavalidation.go
@@ -21,6 +21,10 @@ import (
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewOperationSchemaValidationService] method instead.
+//
+// Deprecated: Use the
+// [github.com/cloudflare/cloudflare-go/v6/schema_validation.SettingOperationService]
+// service instead
type OperationSchemaValidationService struct {
Options []option.RequestOption
}
@@ -59,7 +63,7 @@ func (r *OperationSchemaValidationService) Update(ctx context.Context, operation
// Deprecated: Use
// [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/)
// instead.
-func (r *OperationSchemaValidationService) Edit(ctx context.Context, params OperationSchemaValidationEditParams, opts ...option.RequestOption) (res *OperationSchemaValidationEditResponse, err error) {
+func (r *OperationSchemaValidationService) Edit(ctx context.Context, params OperationSchemaValidationEditParams, opts ...option.RequestOption) (res *SettingsMultipleRequest, err error) {
var env OperationSchemaValidationEditResponseEnvelope
opts = slices.Concat(r.Options, opts)
if params.ZoneID.Value == "" {
@@ -95,7 +99,10 @@ func (r *OperationSchemaValidationService) Get(ctx context.Context, operationID
return
}
-type OperationSchemaValidationUpdateResponse struct {
+type SettingsMultipleRequest map[string]SettingsMultipleRequestItem
+
+// Operation ID to mitigation action mappings
+type SettingsMultipleRequestItem struct {
// When set, this applies a mitigation action to this operation
//
// - `log` log request when request does not conform to schema for this operation
@@ -104,26 +111,23 @@ type OperationSchemaValidationUpdateResponse struct {
// - `none` will skip mitigation for this operation
// - `null` indicates that no operation level mitigation is in place, see Zone
// Level Schema Validation Settings for mitigation action that will be applied
- MitigationAction OperationSchemaValidationUpdateResponseMitigationAction `json:"mitigation_action,nullable"`
- // UUID.
- OperationID string `json:"operation_id"`
- JSON operationSchemaValidationUpdateResponseJSON `json:"-"`
+ MitigationAction SettingsMultipleRequestItemMitigationAction `json:"mitigation_action,nullable"`
+ JSON settingsMultipleRequestItemJSON `json:"-"`
}
-// operationSchemaValidationUpdateResponseJSON contains the JSON metadata for the
-// struct [OperationSchemaValidationUpdateResponse]
-type operationSchemaValidationUpdateResponseJSON struct {
+// settingsMultipleRequestItemJSON contains the JSON metadata for the struct
+// [SettingsMultipleRequestItem]
+type settingsMultipleRequestItemJSON struct {
MitigationAction apijson.Field
- OperationID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *OperationSchemaValidationUpdateResponse) UnmarshalJSON(data []byte) (err error) {
+func (r *SettingsMultipleRequestItem) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r operationSchemaValidationUpdateResponseJSON) RawJSON() string {
+func (r settingsMultipleRequestItemJSON) RawJSON() string {
return r.raw
}
@@ -135,26 +139,26 @@ func (r operationSchemaValidationUpdateResponseJSON) RawJSON() string {
// - `none` will skip mitigation for this operation
// - `null` indicates that no operation level mitigation is in place, see Zone
// Level Schema Validation Settings for mitigation action that will be applied
-type OperationSchemaValidationUpdateResponseMitigationAction string
+type SettingsMultipleRequestItemMitigationAction string
const (
- OperationSchemaValidationUpdateResponseMitigationActionLog OperationSchemaValidationUpdateResponseMitigationAction = "log"
- OperationSchemaValidationUpdateResponseMitigationActionBlock OperationSchemaValidationUpdateResponseMitigationAction = "block"
- OperationSchemaValidationUpdateResponseMitigationActionNone OperationSchemaValidationUpdateResponseMitigationAction = "none"
+ SettingsMultipleRequestItemMitigationActionLog SettingsMultipleRequestItemMitigationAction = "log"
+ SettingsMultipleRequestItemMitigationActionBlock SettingsMultipleRequestItemMitigationAction = "block"
+ SettingsMultipleRequestItemMitigationActionNone SettingsMultipleRequestItemMitigationAction = "none"
)
-func (r OperationSchemaValidationUpdateResponseMitigationAction) IsKnown() bool {
+func (r SettingsMultipleRequestItemMitigationAction) IsKnown() bool {
switch r {
- case OperationSchemaValidationUpdateResponseMitigationActionLog, OperationSchemaValidationUpdateResponseMitigationActionBlock, OperationSchemaValidationUpdateResponseMitigationActionNone:
+ case SettingsMultipleRequestItemMitigationActionLog, SettingsMultipleRequestItemMitigationActionBlock, SettingsMultipleRequestItemMitigationActionNone:
return true
}
return false
}
-type OperationSchemaValidationEditResponse map[string]OperationSchemaValidationEditResponseItem
+type SettingsMultipleRequestParam map[string]SettingsMultipleRequestItemParam
// Operation ID to mitigation action mappings
-type OperationSchemaValidationEditResponseItem struct {
+type SettingsMultipleRequestItemParam struct {
// When set, this applies a mitigation action to this operation
//
// - `log` log request when request does not conform to schema for this operation
@@ -163,23 +167,42 @@ type OperationSchemaValidationEditResponseItem struct {
// - `none` will skip mitigation for this operation
// - `null` indicates that no operation level mitigation is in place, see Zone
// Level Schema Validation Settings for mitigation action that will be applied
- MitigationAction OperationSchemaValidationEditResponseItemMitigationAction `json:"mitigation_action,nullable"`
- JSON operationSchemaValidationEditResponseItemJSON `json:"-"`
+ MitigationAction param.Field[SettingsMultipleRequestItemMitigationAction] `json:"mitigation_action"`
}
-// operationSchemaValidationEditResponseItemJSON contains the JSON metadata for the
-// struct [OperationSchemaValidationEditResponseItem]
-type operationSchemaValidationEditResponseItemJSON struct {
+func (r SettingsMultipleRequestItemParam) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type OperationSchemaValidationUpdateResponse struct {
+ // When set, this applies a mitigation action to this operation
+ //
+ // - `log` log request when request does not conform to schema for this operation
+ // - `block` deny access to the site when request does not conform to schema for
+ // this operation
+ // - `none` will skip mitigation for this operation
+ // - `null` indicates that no operation level mitigation is in place, see Zone
+ // Level Schema Validation Settings for mitigation action that will be applied
+ MitigationAction OperationSchemaValidationUpdateResponseMitigationAction `json:"mitigation_action,nullable"`
+ // UUID.
+ OperationID string `json:"operation_id"`
+ JSON operationSchemaValidationUpdateResponseJSON `json:"-"`
+}
+
+// operationSchemaValidationUpdateResponseJSON contains the JSON metadata for the
+// struct [OperationSchemaValidationUpdateResponse]
+type operationSchemaValidationUpdateResponseJSON struct {
MitigationAction apijson.Field
+ OperationID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *OperationSchemaValidationEditResponseItem) UnmarshalJSON(data []byte) (err error) {
+func (r *OperationSchemaValidationUpdateResponse) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r operationSchemaValidationEditResponseItemJSON) RawJSON() string {
+func (r operationSchemaValidationUpdateResponseJSON) RawJSON() string {
return r.raw
}
@@ -191,17 +214,17 @@ func (r operationSchemaValidationEditResponseItemJSON) RawJSON() string {
// - `none` will skip mitigation for this operation
// - `null` indicates that no operation level mitigation is in place, see Zone
// Level Schema Validation Settings for mitigation action that will be applied
-type OperationSchemaValidationEditResponseItemMitigationAction string
+type OperationSchemaValidationUpdateResponseMitigationAction string
const (
- OperationSchemaValidationEditResponseItemMitigationActionLog OperationSchemaValidationEditResponseItemMitigationAction = "log"
- OperationSchemaValidationEditResponseItemMitigationActionBlock OperationSchemaValidationEditResponseItemMitigationAction = "block"
- OperationSchemaValidationEditResponseItemMitigationActionNone OperationSchemaValidationEditResponseItemMitigationAction = "none"
+ OperationSchemaValidationUpdateResponseMitigationActionLog OperationSchemaValidationUpdateResponseMitigationAction = "log"
+ OperationSchemaValidationUpdateResponseMitigationActionBlock OperationSchemaValidationUpdateResponseMitigationAction = "block"
+ OperationSchemaValidationUpdateResponseMitigationActionNone OperationSchemaValidationUpdateResponseMitigationAction = "none"
)
-func (r OperationSchemaValidationEditResponseItemMitigationAction) IsKnown() bool {
+func (r OperationSchemaValidationUpdateResponseMitigationAction) IsKnown() bool {
switch r {
- case OperationSchemaValidationEditResponseItemMitigationActionLog, OperationSchemaValidationEditResponseItemMitigationActionBlock, OperationSchemaValidationEditResponseItemMitigationActionNone:
+ case OperationSchemaValidationUpdateResponseMitigationActionLog, OperationSchemaValidationUpdateResponseMitigationActionBlock, OperationSchemaValidationUpdateResponseMitigationActionNone:
return true
}
return false
@@ -307,59 +330,18 @@ func (r OperationSchemaValidationUpdateParamsMitigationAction) IsKnown() bool {
type OperationSchemaValidationEditParams struct {
// Identifier.
- ZoneID param.Field[string] `path:"zone_id,required"`
- Body map[string]OperationSchemaValidationEditParamsBody `json:"body,required"`
+ ZoneID param.Field[string] `path:"zone_id,required"`
+ SettingsMultipleRequest SettingsMultipleRequestParam `json:"settings_multiple_request,required"`
}
func (r OperationSchemaValidationEditParams) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r.Body)
-}
-
-// Operation ID to mitigation action mappings
-type OperationSchemaValidationEditParamsBody struct {
- // When set, this applies a mitigation action to this operation
- //
- // - `log` log request when request does not conform to schema for this operation
- // - `block` deny access to the site when request does not conform to schema for
- // this operation
- // - `none` will skip mitigation for this operation
- // - `null` indicates that no operation level mitigation is in place, see Zone
- // Level Schema Validation Settings for mitigation action that will be applied
- MitigationAction param.Field[OperationSchemaValidationEditParamsBodyMitigationAction] `json:"mitigation_action"`
-}
-
-func (r OperationSchemaValidationEditParamsBody) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
-// When set, this applies a mitigation action to this operation
-//
-// - `log` log request when request does not conform to schema for this operation
-// - `block` deny access to the site when request does not conform to schema for
-// this operation
-// - `none` will skip mitigation for this operation
-// - `null` indicates that no operation level mitigation is in place, see Zone
-// Level Schema Validation Settings for mitigation action that will be applied
-type OperationSchemaValidationEditParamsBodyMitigationAction string
-
-const (
- OperationSchemaValidationEditParamsBodyMitigationActionLog OperationSchemaValidationEditParamsBodyMitigationAction = "log"
- OperationSchemaValidationEditParamsBodyMitigationActionBlock OperationSchemaValidationEditParamsBodyMitigationAction = "block"
- OperationSchemaValidationEditParamsBodyMitigationActionNone OperationSchemaValidationEditParamsBodyMitigationAction = "none"
-)
-
-func (r OperationSchemaValidationEditParamsBodyMitigationAction) IsKnown() bool {
- switch r {
- case OperationSchemaValidationEditParamsBodyMitigationActionLog, OperationSchemaValidationEditParamsBodyMitigationActionBlock, OperationSchemaValidationEditParamsBodyMitigationActionNone:
- return true
- }
- return false
+ return apijson.MarshalRoot(r.SettingsMultipleRequest)
}
type OperationSchemaValidationEditResponseEnvelope struct {
- Errors Message `json:"errors,required"`
- Messages Message `json:"messages,required"`
- Result OperationSchemaValidationEditResponse `json:"result,required"`
+ Errors Message `json:"errors,required"`
+ Messages Message `json:"messages,required"`
+ Result SettingsMultipleRequest `json:"result,required"`
// Whether the API call was successful.
Success OperationSchemaValidationEditResponseEnvelopeSuccess `json:"success,required"`
JSON operationSchemaValidationEditResponseEnvelopeJSON `json:"-"`
diff --git a/api_gateway/operationschemavalidation_test.go b/api_gateway/operationschemavalidation_test.go
index 943f6ee2f95..c0e807c07f0 100644
--- a/api_gateway/operationschemavalidation_test.go
+++ b/api_gateway/operationschemavalidation_test.go
@@ -59,12 +59,12 @@ func TestOperationSchemaValidationEdit(t *testing.T) {
)
_, err := client.APIGateway.Operations.SchemaValidation.Edit(context.TODO(), api_gateway.OperationSchemaValidationEditParams{
ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
- Body: map[string]api_gateway.OperationSchemaValidationEditParamsBody{
- "3818d821-5901-4147-a474-f5f5aec1d54e": {
- MitigationAction: cloudflare.F(api_gateway.OperationSchemaValidationEditParamsBodyMitigationActionLog),
+ SettingsMultipleRequest: api_gateway.SettingsMultipleRequestParam{
+ "3818d821-5901-4147-a474-f5f5aec1d54e": api_gateway.SettingsMultipleRequestItemParam{
+ MitigationAction: cloudflare.F(api_gateway.SettingsMultipleRequestItemMitigationActionLog),
},
- "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": {
- MitigationAction: cloudflare.F(api_gateway.OperationSchemaValidationEditParamsBodyMitigationActionBlock),
+ "b17c8043-99a0-4202-b7d9-8f7cdbee02cd": api_gateway.SettingsMultipleRequestItemParam{
+ MitigationAction: cloudflare.F(api_gateway.SettingsMultipleRequestItemMitigationActionBlock),
},
},
})
diff --git a/api_gateway/setting.go b/api_gateway/setting.go
index c6d0d528aa3..57c460fc801 100644
--- a/api_gateway/setting.go
+++ b/api_gateway/setting.go
@@ -3,6 +3,7 @@
package api_gateway
import (
+ "github.com/cloudflare/cloudflare-go/v6/internal/apijson"
"github.com/cloudflare/cloudflare-go/v6/option"
)
@@ -12,6 +13,10 @@ import (
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewSettingService] method instead.
+//
+// Deprecated: Use the
+// [github.com/cloudflare/cloudflare-go/v6/schema_validation.SettingService]
+// service instead
type SettingService struct {
Options []option.RequestOption
SchemaValidation *SettingSchemaValidationService
@@ -26,3 +31,83 @@ func NewSettingService(opts ...option.RequestOption) (r *SettingService) {
r.SchemaValidation = NewSettingSchemaValidationService(opts...)
return
}
+
+type Settings struct {
+ // The default mitigation action used when there is no mitigation action defined on
+ // the operation
+ //
+ // Mitigation actions are as follows:
+ //
+ // - `log` - log request when request does not conform to schema
+ // - `block` - deny access to the site when request does not conform to schema
+ //
+ // A special value of of `none` will skip running schema validation entirely for
+ // the request when there is no mitigation action defined on the operation
+ ValidationDefaultMitigationAction SettingsValidationDefaultMitigationAction `json:"validation_default_mitigation_action"`
+ // When set, this overrides both zone level and operation level mitigation actions.
+ //
+ // - `none` will skip running schema validation entirely for the request
+ // - `null` indicates that no override is in place
+ ValidationOverrideMitigationAction SettingsValidationOverrideMitigationAction `json:"validation_override_mitigation_action,nullable"`
+ JSON settingsJSON `json:"-"`
+}
+
+// settingsJSON contains the JSON metadata for the struct [Settings]
+type settingsJSON struct {
+ ValidationDefaultMitigationAction apijson.Field
+ ValidationOverrideMitigationAction apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *Settings) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r settingsJSON) RawJSON() string {
+ return r.raw
+}
+
+// The default mitigation action used when there is no mitigation action defined on
+// the operation
+//
+// Mitigation actions are as follows:
+//
+// - `log` - log request when request does not conform to schema
+// - `block` - deny access to the site when request does not conform to schema
+//
+// A special value of of `none` will skip running schema validation entirely for
+// the request when there is no mitigation action defined on the operation
+type SettingsValidationDefaultMitigationAction string
+
+const (
+ SettingsValidationDefaultMitigationActionNone SettingsValidationDefaultMitigationAction = "none"
+ SettingsValidationDefaultMitigationActionLog SettingsValidationDefaultMitigationAction = "log"
+ SettingsValidationDefaultMitigationActionBlock SettingsValidationDefaultMitigationAction = "block"
+)
+
+func (r SettingsValidationDefaultMitigationAction) IsKnown() bool {
+ switch r {
+ case SettingsValidationDefaultMitigationActionNone, SettingsValidationDefaultMitigationActionLog, SettingsValidationDefaultMitigationActionBlock:
+ return true
+ }
+ return false
+}
+
+// When set, this overrides both zone level and operation level mitigation actions.
+//
+// - `none` will skip running schema validation entirely for the request
+// - `null` indicates that no override is in place
+type SettingsValidationOverrideMitigationAction string
+
+const (
+ SettingsValidationOverrideMitigationActionNone SettingsValidationOverrideMitigationAction = "none"
+)
+
+func (r SettingsValidationOverrideMitigationAction) IsKnown() bool {
+ switch r {
+ case SettingsValidationOverrideMitigationActionNone:
+ return true
+ }
+ return false
+}
diff --git a/api_gateway/settingschemavalidation.go b/api_gateway/settingschemavalidation.go
index fa6368389f3..055c2e805fd 100644
--- a/api_gateway/settingschemavalidation.go
+++ b/api_gateway/settingschemavalidation.go
@@ -39,7 +39,7 @@ func NewSettingSchemaValidationService(opts ...option.RequestOption) (r *Setting
// Deprecated: Use
// [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/)
// instead.
-func (r *SettingSchemaValidationService) Update(ctx context.Context, params SettingSchemaValidationUpdateParams, opts ...option.RequestOption) (res *SettingSchemaValidationUpdateResponse, err error) {
+func (r *SettingSchemaValidationService) Update(ctx context.Context, params SettingSchemaValidationUpdateParams, opts ...option.RequestOption) (res *Settings, err error) {
opts = slices.Concat(r.Options, opts)
if params.ZoneID.Value == "" {
err = errors.New("missing required zone_id parameter")
@@ -55,7 +55,7 @@ func (r *SettingSchemaValidationService) Update(ctx context.Context, params Sett
// Deprecated: Use
// [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/)
// instead.
-func (r *SettingSchemaValidationService) Edit(ctx context.Context, params SettingSchemaValidationEditParams, opts ...option.RequestOption) (res *SettingSchemaValidationEditResponse, err error) {
+func (r *SettingSchemaValidationService) Edit(ctx context.Context, params SettingSchemaValidationEditParams, opts ...option.RequestOption) (res *Settings, err error) {
opts = slices.Concat(r.Options, opts)
if params.ZoneID.Value == "" {
err = errors.New("missing required zone_id parameter")
@@ -71,7 +71,7 @@ func (r *SettingSchemaValidationService) Edit(ctx context.Context, params Settin
// Deprecated: Use
// [Schema Validation API](https://developers.cloudflare.com/api/resources/schema_validation/)
// instead.
-func (r *SettingSchemaValidationService) Get(ctx context.Context, query SettingSchemaValidationGetParams, opts ...option.RequestOption) (res *SettingSchemaValidationGetResponse, err error) {
+func (r *SettingSchemaValidationService) Get(ctx context.Context, query SettingSchemaValidationGetParams, opts ...option.RequestOption) (res *Settings, err error) {
opts = slices.Concat(r.Options, opts)
if query.ZoneID.Value == "" {
err = errors.New("missing required zone_id parameter")
@@ -82,249 +82,6 @@ func (r *SettingSchemaValidationService) Get(ctx context.Context, query SettingS
return
}
-type SettingSchemaValidationUpdateResponse struct {
- // The default mitigation action used when there is no mitigation action defined on
- // the operation
- //
- // Mitigation actions are as follows:
- //
- // - `log` - log request when request does not conform to schema
- // - `block` - deny access to the site when request does not conform to schema
- //
- // A special value of of `none` will skip running schema validation entirely for
- // the request when there is no mitigation action defined on the operation
- ValidationDefaultMitigationAction SettingSchemaValidationUpdateResponseValidationDefaultMitigationAction `json:"validation_default_mitigation_action"`
- // When set, this overrides both zone level and operation level mitigation actions.
- //
- // - `none` will skip running schema validation entirely for the request
- // - `null` indicates that no override is in place
- ValidationOverrideMitigationAction SettingSchemaValidationUpdateResponseValidationOverrideMitigationAction `json:"validation_override_mitigation_action,nullable"`
- JSON settingSchemaValidationUpdateResponseJSON `json:"-"`
-}
-
-// settingSchemaValidationUpdateResponseJSON contains the JSON metadata for the
-// struct [SettingSchemaValidationUpdateResponse]
-type settingSchemaValidationUpdateResponseJSON struct {
- ValidationDefaultMitigationAction apijson.Field
- ValidationOverrideMitigationAction apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SettingSchemaValidationUpdateResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r settingSchemaValidationUpdateResponseJSON) RawJSON() string {
- return r.raw
-}
-
-// The default mitigation action used when there is no mitigation action defined on
-// the operation
-//
-// Mitigation actions are as follows:
-//
-// - `log` - log request when request does not conform to schema
-// - `block` - deny access to the site when request does not conform to schema
-//
-// A special value of of `none` will skip running schema validation entirely for
-// the request when there is no mitigation action defined on the operation
-type SettingSchemaValidationUpdateResponseValidationDefaultMitigationAction string
-
-const (
- SettingSchemaValidationUpdateResponseValidationDefaultMitigationActionNone SettingSchemaValidationUpdateResponseValidationDefaultMitigationAction = "none"
- SettingSchemaValidationUpdateResponseValidationDefaultMitigationActionLog SettingSchemaValidationUpdateResponseValidationDefaultMitigationAction = "log"
- SettingSchemaValidationUpdateResponseValidationDefaultMitigationActionBlock SettingSchemaValidationUpdateResponseValidationDefaultMitigationAction = "block"
-)
-
-func (r SettingSchemaValidationUpdateResponseValidationDefaultMitigationAction) IsKnown() bool {
- switch r {
- case SettingSchemaValidationUpdateResponseValidationDefaultMitigationActionNone, SettingSchemaValidationUpdateResponseValidationDefaultMitigationActionLog, SettingSchemaValidationUpdateResponseValidationDefaultMitigationActionBlock:
- return true
- }
- return false
-}
-
-// When set, this overrides both zone level and operation level mitigation actions.
-//
-// - `none` will skip running schema validation entirely for the request
-// - `null` indicates that no override is in place
-type SettingSchemaValidationUpdateResponseValidationOverrideMitigationAction string
-
-const (
- SettingSchemaValidationUpdateResponseValidationOverrideMitigationActionNone SettingSchemaValidationUpdateResponseValidationOverrideMitigationAction = "none"
-)
-
-func (r SettingSchemaValidationUpdateResponseValidationOverrideMitigationAction) IsKnown() bool {
- switch r {
- case SettingSchemaValidationUpdateResponseValidationOverrideMitigationActionNone:
- return true
- }
- return false
-}
-
-type SettingSchemaValidationEditResponse struct {
- // The default mitigation action used when there is no mitigation action defined on
- // the operation
- //
- // Mitigation actions are as follows:
- //
- // - `log` - log request when request does not conform to schema
- // - `block` - deny access to the site when request does not conform to schema
- //
- // A special value of of `none` will skip running schema validation entirely for
- // the request when there is no mitigation action defined on the operation
- ValidationDefaultMitigationAction SettingSchemaValidationEditResponseValidationDefaultMitigationAction `json:"validation_default_mitigation_action"`
- // When set, this overrides both zone level and operation level mitigation actions.
- //
- // - `none` will skip running schema validation entirely for the request
- // - `null` indicates that no override is in place
- ValidationOverrideMitigationAction SettingSchemaValidationEditResponseValidationOverrideMitigationAction `json:"validation_override_mitigation_action,nullable"`
- JSON settingSchemaValidationEditResponseJSON `json:"-"`
-}
-
-// settingSchemaValidationEditResponseJSON contains the JSON metadata for the
-// struct [SettingSchemaValidationEditResponse]
-type settingSchemaValidationEditResponseJSON struct {
- ValidationDefaultMitigationAction apijson.Field
- ValidationOverrideMitigationAction apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SettingSchemaValidationEditResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r settingSchemaValidationEditResponseJSON) RawJSON() string {
- return r.raw
-}
-
-// The default mitigation action used when there is no mitigation action defined on
-// the operation
-//
-// Mitigation actions are as follows:
-//
-// - `log` - log request when request does not conform to schema
-// - `block` - deny access to the site when request does not conform to schema
-//
-// A special value of of `none` will skip running schema validation entirely for
-// the request when there is no mitigation action defined on the operation
-type SettingSchemaValidationEditResponseValidationDefaultMitigationAction string
-
-const (
- SettingSchemaValidationEditResponseValidationDefaultMitigationActionNone SettingSchemaValidationEditResponseValidationDefaultMitigationAction = "none"
- SettingSchemaValidationEditResponseValidationDefaultMitigationActionLog SettingSchemaValidationEditResponseValidationDefaultMitigationAction = "log"
- SettingSchemaValidationEditResponseValidationDefaultMitigationActionBlock SettingSchemaValidationEditResponseValidationDefaultMitigationAction = "block"
-)
-
-func (r SettingSchemaValidationEditResponseValidationDefaultMitigationAction) IsKnown() bool {
- switch r {
- case SettingSchemaValidationEditResponseValidationDefaultMitigationActionNone, SettingSchemaValidationEditResponseValidationDefaultMitigationActionLog, SettingSchemaValidationEditResponseValidationDefaultMitigationActionBlock:
- return true
- }
- return false
-}
-
-// When set, this overrides both zone level and operation level mitigation actions.
-//
-// - `none` will skip running schema validation entirely for the request
-// - `null` indicates that no override is in place
-type SettingSchemaValidationEditResponseValidationOverrideMitigationAction string
-
-const (
- SettingSchemaValidationEditResponseValidationOverrideMitigationActionNone SettingSchemaValidationEditResponseValidationOverrideMitigationAction = "none"
-)
-
-func (r SettingSchemaValidationEditResponseValidationOverrideMitigationAction) IsKnown() bool {
- switch r {
- case SettingSchemaValidationEditResponseValidationOverrideMitigationActionNone:
- return true
- }
- return false
-}
-
-type SettingSchemaValidationGetResponse struct {
- // The default mitigation action used when there is no mitigation action defined on
- // the operation
- //
- // Mitigation actions are as follows:
- //
- // - `log` - log request when request does not conform to schema
- // - `block` - deny access to the site when request does not conform to schema
- //
- // A special value of of `none` will skip running schema validation entirely for
- // the request when there is no mitigation action defined on the operation
- ValidationDefaultMitigationAction SettingSchemaValidationGetResponseValidationDefaultMitigationAction `json:"validation_default_mitigation_action"`
- // When set, this overrides both zone level and operation level mitigation actions.
- //
- // - `none` will skip running schema validation entirely for the request
- // - `null` indicates that no override is in place
- ValidationOverrideMitigationAction SettingSchemaValidationGetResponseValidationOverrideMitigationAction `json:"validation_override_mitigation_action,nullable"`
- JSON settingSchemaValidationGetResponseJSON `json:"-"`
-}
-
-// settingSchemaValidationGetResponseJSON contains the JSON metadata for the struct
-// [SettingSchemaValidationGetResponse]
-type settingSchemaValidationGetResponseJSON struct {
- ValidationDefaultMitigationAction apijson.Field
- ValidationOverrideMitigationAction apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SettingSchemaValidationGetResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r settingSchemaValidationGetResponseJSON) RawJSON() string {
- return r.raw
-}
-
-// The default mitigation action used when there is no mitigation action defined on
-// the operation
-//
-// Mitigation actions are as follows:
-//
-// - `log` - log request when request does not conform to schema
-// - `block` - deny access to the site when request does not conform to schema
-//
-// A special value of of `none` will skip running schema validation entirely for
-// the request when there is no mitigation action defined on the operation
-type SettingSchemaValidationGetResponseValidationDefaultMitigationAction string
-
-const (
- SettingSchemaValidationGetResponseValidationDefaultMitigationActionNone SettingSchemaValidationGetResponseValidationDefaultMitigationAction = "none"
- SettingSchemaValidationGetResponseValidationDefaultMitigationActionLog SettingSchemaValidationGetResponseValidationDefaultMitigationAction = "log"
- SettingSchemaValidationGetResponseValidationDefaultMitigationActionBlock SettingSchemaValidationGetResponseValidationDefaultMitigationAction = "block"
-)
-
-func (r SettingSchemaValidationGetResponseValidationDefaultMitigationAction) IsKnown() bool {
- switch r {
- case SettingSchemaValidationGetResponseValidationDefaultMitigationActionNone, SettingSchemaValidationGetResponseValidationDefaultMitigationActionLog, SettingSchemaValidationGetResponseValidationDefaultMitigationActionBlock:
- return true
- }
- return false
-}
-
-// When set, this overrides both zone level and operation level mitigation actions.
-//
-// - `none` will skip running schema validation entirely for the request
-// - `null` indicates that no override is in place
-type SettingSchemaValidationGetResponseValidationOverrideMitigationAction string
-
-const (
- SettingSchemaValidationGetResponseValidationOverrideMitigationActionNone SettingSchemaValidationGetResponseValidationOverrideMitigationAction = "none"
-)
-
-func (r SettingSchemaValidationGetResponseValidationOverrideMitigationAction) IsKnown() bool {
- switch r {
- case SettingSchemaValidationGetResponseValidationOverrideMitigationActionNone:
- return true
- }
- return false
-}
-
type SettingSchemaValidationUpdateParams struct {
// Identifier.
ZoneID param.Field[string] `path:"zone_id,required"`
diff --git a/api_gateway/userschema.go b/api_gateway/userschema.go
index 512f2865266..8c80dc5b84a 100644
--- a/api_gateway/userschema.go
+++ b/api_gateway/userschema.go
@@ -29,6 +29,10 @@ import (
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewUserSchemaService] method instead.
+//
+// Deprecated: Use the
+// [github.com/cloudflare/cloudflare-go/v6/schema_validation.SchemaService] service
+// instead
type UserSchemaService struct {
Options []option.RequestOption
Operations *UserSchemaOperationService
diff --git a/client.go b/client.go
index 96266b899e1..3279c670f58 100644
--- a/client.go
+++ b/client.go
@@ -14,6 +14,7 @@ import (
"github.com/cloudflare/cloudflare-go/v6/addressing"
"github.com/cloudflare/cloudflare-go/v6/ai"
"github.com/cloudflare/cloudflare-go/v6/ai_gateway"
+ "github.com/cloudflare/cloudflare-go/v6/ai_search"
"github.com/cloudflare/cloudflare-go/v6/alerting"
"github.com/cloudflare/cloudflare-go/v6/api_gateway"
"github.com/cloudflare/cloudflare-go/v6/argo"
@@ -218,6 +219,7 @@ type Client struct {
ContentScanning *content_scanning.ContentScanningService
AbuseReports *abuse_reports.AbuseReportService
AI *ai.AIService
+ AISearch *ai_search.AISearchService
SecurityCenter *security_center.SecurityCenterService
BrowserRendering *browser_rendering.BrowserRenderingService
CustomPages *custom_pages.CustomPageService
@@ -353,6 +355,7 @@ func NewClient(opts ...option.RequestOption) (r *Client) {
r.ContentScanning = content_scanning.NewContentScanningService(opts...)
r.AbuseReports = abuse_reports.NewAbuseReportService(opts...)
r.AI = ai.NewAIService(opts...)
+ r.AISearch = ai_search.NewAISearchService(opts...)
r.SecurityCenter = security_center.NewSecurityCenterService(opts...)
r.BrowserRendering = browser_rendering.NewBrowserRenderingService(opts...)
r.CustomPages = custom_pages.NewCustomPageService(opts...)
diff --git a/internal/version.go b/internal/version.go
index 74ff7068f22..a6ec4238c47 100644
--- a/internal/version.go
+++ b/internal/version.go
@@ -2,4 +2,4 @@
package internal
-const PackageVersion = "6.4.0" // x-release-please-version
+const PackageVersion = "6.5.0" // x-release-please-version
diff --git a/leaked_credential_checks/detection.go b/leaked_credential_checks/detection.go
index f59b8db745a..863c7b5aa8a 100644
--- a/leaked_credential_checks/detection.go
+++ b/leaked_credential_checks/detection.go
@@ -122,6 +122,27 @@ func (r *DetectionService) Delete(ctx context.Context, detectionID string, body
return
}
+// Get user-defined detection pattern for Leaked Credential Checks.
+func (r *DetectionService) Get(ctx context.Context, detectionID string, query DetectionGetParams, opts ...option.RequestOption) (res *DetectionGetResponse, err error) {
+ var env DetectionGetResponseEnvelope
+ opts = slices.Concat(r.Options, opts)
+ if query.ZoneID.Value == "" {
+ err = errors.New("missing required zone_id parameter")
+ return
+ }
+ if detectionID == "" {
+ err = errors.New("missing required detection_id parameter")
+ return
+ }
+ path := fmt.Sprintf("zones/%s/leaked-credential-checks/detections/%s", query.ZoneID, detectionID)
+ err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &env, opts...)
+ if err != nil {
+ return
+ }
+ res = &env.Result
+ return
+}
+
// Defines a custom set of username/password expressions to match Leaked Credential
// Checks on.
type DetectionNewResponse struct {
@@ -214,6 +235,36 @@ func (r detectionListResponseJSON) RawJSON() string {
type DetectionDeleteResponse = interface{}
+// Defines a custom set of username/password expressions to match Leaked Credential
+// Checks on.
+type DetectionGetResponse struct {
+ // Defines the unique ID for this custom detection.
+ ID string `json:"id"`
+ // Defines ehe ruleset expression to use in matching the password in a request.
+ Password string `json:"password"`
+ // Defines the ruleset expression to use in matching the username in a request.
+ Username string `json:"username"`
+ JSON detectionGetResponseJSON `json:"-"`
+}
+
+// detectionGetResponseJSON contains the JSON metadata for the struct
+// [DetectionGetResponse]
+type detectionGetResponseJSON struct {
+ ID apijson.Field
+ Password apijson.Field
+ Username apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DetectionGetResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r detectionGetResponseJSON) RawJSON() string {
+ return r.raw
+}
+
type DetectionNewParams struct {
// Defines an identifier.
ZoneID param.Field[string] `path:"zone_id,required"`
@@ -382,3 +433,53 @@ func (r DetectionDeleteResponseEnvelopeSuccess) IsKnown() bool {
}
return false
}
+
+type DetectionGetParams struct {
+ // Defines an identifier.
+ ZoneID param.Field[string] `path:"zone_id,required"`
+}
+
+type DetectionGetResponseEnvelope struct {
+ Errors []shared.ResponseInfo `json:"errors,required"`
+ Messages []shared.ResponseInfo `json:"messages,required"`
+ // Defines a custom set of username/password expressions to match Leaked Credential
+ // Checks on.
+ Result DetectionGetResponse `json:"result,required"`
+ // Defines whether the API call was successful.
+ Success DetectionGetResponseEnvelopeSuccess `json:"success,required"`
+ JSON detectionGetResponseEnvelopeJSON `json:"-"`
+}
+
+// detectionGetResponseEnvelopeJSON contains the JSON metadata for the struct
+// [DetectionGetResponseEnvelope]
+type detectionGetResponseEnvelopeJSON struct {
+ Errors apijson.Field
+ Messages apijson.Field
+ Result apijson.Field
+ Success apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DetectionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r detectionGetResponseEnvelopeJSON) RawJSON() string {
+ return r.raw
+}
+
+// Defines whether the API call was successful.
+type DetectionGetResponseEnvelopeSuccess bool
+
+const (
+ DetectionGetResponseEnvelopeSuccessTrue DetectionGetResponseEnvelopeSuccess = true
+)
+
+func (r DetectionGetResponseEnvelopeSuccess) IsKnown() bool {
+ switch r {
+ case DetectionGetResponseEnvelopeSuccessTrue:
+ return true
+ }
+ return false
+}
diff --git a/leaked_credential_checks/detection_test.go b/leaked_credential_checks/detection_test.go
index aceef53db38..35eddab625b 100644
--- a/leaked_credential_checks/detection_test.go
+++ b/leaked_credential_checks/detection_test.go
@@ -125,3 +125,32 @@ func TestDetectionDelete(t *testing.T) {
t.Fatalf("err should be nil: %s", err.Error())
}
}
+
+func TestDetectionGet(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.LeakedCredentialChecks.Detections.Get(
+ context.TODO(),
+ "18a14bafaa8eb1df04ce683ec18c765e",
+ leaked_credential_checks.DetectionGetParams{
+ ZoneID: 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/load_balancers/monitor.go b/load_balancers/monitor.go
index 9c1dab4b953..c4dc308f531 100644
--- a/load_balancers/monitor.go
+++ b/load_balancers/monitor.go
@@ -209,7 +209,7 @@ type Monitor struct {
// The port number to connect to for the health check. Required for TCP, UDP, and
// SMTP checks. HTTP and HTTPS checks should only define the port when using a
// non-standard port (HTTP: default 80, HTTPS: default 443).
- Port int64 `json:"port"`
+ Port int64 `json:"port,nullable"`
// Assign this monitor to emulate the specified zone while probing. This parameter
// is only valid for HTTP and HTTPS monitors.
ProbeZone string `json:"probe_zone"`
diff --git a/load_balancers/pool.go b/load_balancers/pool.go
index 49ba8105931..f7c2d5bd768 100644
--- a/load_balancers/pool.go
+++ b/load_balancers/pool.go
@@ -223,7 +223,7 @@ type Pool struct {
// decimal degrees. If this is set, longitude must also be set.
Latitude float64 `json:"latitude"`
// Configures load shedding policies and percentages for the pool.
- LoadShedding LoadShedding `json:"load_shedding"`
+ LoadShedding LoadShedding `json:"load_shedding,nullable"`
// The longitude of the data center containing the origins used in this pool in
// decimal degrees. If this is set, latitude must also be set.
Longitude float64 `json:"longitude"`
@@ -254,7 +254,7 @@ type Pool struct {
NotificationFilter NotificationFilter `json:"notification_filter,nullable"`
// Configures origin steering for the pool. Controls how origins are selected for
// new sessions and traffic without session affinity.
- OriginSteering OriginSteering `json:"origin_steering"`
+ OriginSteering OriginSteering `json:"origin_steering,nullable"`
// The list of origins within this pool. Traffic directed at this pool is balanced
// across all currently healthy origins, provided the pool itself is healthy.
Origins []Origin `json:"origins"`
diff --git a/magic_transit/ipsectunnel.go b/magic_transit/ipsectunnel.go
index bca42d2f1de..49dddcbae4a 100644
--- a/magic_transit/ipsectunnel.go
+++ b/magic_transit/ipsectunnel.go
@@ -2365,8 +2365,9 @@ type IPSECTunnelNewParams struct {
Name param.Field[string] `json:"name,required"`
// True if automatic stateful return routing should be enabled for a tunnel, false
// otherwise.
- AutomaticReturnRouting param.Field[bool] `json:"automatic_return_routing"`
- BGP param.Field[IPSECTunnelNewParamsBGP] `json:"bgp"`
+ AutomaticReturnRouting param.Field[bool] `json:"automatic_return_routing"`
+ BGP param.Field[IPSECTunnelNewParamsBGP] `json:"bgp"`
+ CustomRemoteIdentities param.Field[IPSECTunnelNewParamsCustomRemoteIdentities] `json:"custom_remote_identities"`
// The IP address assigned to the customer side of the IPsec tunnel. Not required,
// but must be set for proactive traceroutes to work.
CustomerEndpoint param.Field[string] `json:"customer_endpoint"`
@@ -2421,6 +2422,22 @@ func (r IPSECTunnelNewParamsBGP) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
+type IPSECTunnelNewParamsCustomRemoteIdentities struct {
+ // A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
+ // generated IKE IDs can still be used even if this custom value is specified.
+ //
+ // Must be of the form `..custom.ipsec.cloudflare.com`.
+ //
+ // This custom ID does not need to be unique. Two IPsec tunnels may have the same
+ // custom fqdn_id. However, if another IPsec tunnel has the same value then the two
+ // tunnels cannot have the same cloudflare_endpoint.
+ FqdnID param.Field[string] `json:"fqdn_id"`
+}
+
+func (r IPSECTunnelNewParamsCustomRemoteIdentities) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
type IPSECTunnelNewParamsHealthCheck struct {
// The direction of the flow of the healthcheck. Either unidirectional, where the
// probe comes to you via the tunnel and the result comes back to Cloudflare via
@@ -2555,8 +2572,9 @@ type IPSECTunnelUpdateParams struct {
Name param.Field[string] `json:"name,required"`
// True if automatic stateful return routing should be enabled for a tunnel, false
// otherwise.
- AutomaticReturnRouting param.Field[bool] `json:"automatic_return_routing"`
- BGP param.Field[IPSECTunnelUpdateParamsBGP] `json:"bgp"`
+ AutomaticReturnRouting param.Field[bool] `json:"automatic_return_routing"`
+ BGP param.Field[IPSECTunnelUpdateParamsBGP] `json:"bgp"`
+ CustomRemoteIdentities param.Field[IPSECTunnelUpdateParamsCustomRemoteIdentities] `json:"custom_remote_identities"`
// The IP address assigned to the customer side of the IPsec tunnel. Not required,
// but must be set for proactive traceroutes to work.
CustomerEndpoint param.Field[string] `json:"customer_endpoint"`
@@ -2611,6 +2629,22 @@ func (r IPSECTunnelUpdateParamsBGP) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
+type IPSECTunnelUpdateParamsCustomRemoteIdentities struct {
+ // A custom IKE ID of type FQDN that may be used to identity the IPsec tunnel. The
+ // generated IKE IDs can still be used even if this custom value is specified.
+ //
+ // Must be of the form `..custom.ipsec.cloudflare.com`.
+ //
+ // This custom ID does not need to be unique. Two IPsec tunnels may have the same
+ // custom fqdn_id. However, if another IPsec tunnel has the same value then the two
+ // tunnels cannot have the same cloudflare_endpoint.
+ FqdnID param.Field[string] `json:"fqdn_id"`
+}
+
+func (r IPSECTunnelUpdateParamsCustomRemoteIdentities) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
type IPSECTunnelUpdateParamsHealthCheck struct {
// The direction of the flow of the healthcheck. Either unidirectional, where the
// probe comes to you via the tunnel and the result comes back to Cloudflare via
diff --git a/magic_transit/ipsectunnel_test.go b/magic_transit/ipsectunnel_test.go
index a5406b9c73c..d213cf8122b 100644
--- a/magic_transit/ipsectunnel_test.go
+++ b/magic_transit/ipsectunnel_test.go
@@ -38,6 +38,9 @@ func TestIPSECTunnelNewWithOptionalParams(t *testing.T) {
ExtraPrefixes: cloudflare.F([]string{"string"}),
Md5Key: cloudflare.F("md5_key"),
}),
+ CustomRemoteIdentities: cloudflare.F(magic_transit.IPSECTunnelNewParamsCustomRemoteIdentities{
+ FqdnID: cloudflare.F("fqdn_id"),
+ }),
CustomerEndpoint: cloudflare.F("203.0.113.1"),
Description: cloudflare.F("Tunnel for ISP X"),
HealthCheck: cloudflare.F(magic_transit.IPSECTunnelNewParamsHealthCheck{
@@ -91,6 +94,9 @@ func TestIPSECTunnelUpdateWithOptionalParams(t *testing.T) {
ExtraPrefixes: cloudflare.F([]string{"string"}),
Md5Key: cloudflare.F("md5_key"),
}),
+ CustomRemoteIdentities: cloudflare.F(magic_transit.IPSECTunnelUpdateParamsCustomRemoteIdentities{
+ FqdnID: cloudflare.F("fqdn_id"),
+ }),
CustomerEndpoint: cloudflare.F("203.0.113.1"),
Description: cloudflare.F("Tunnel for ISP X"),
HealthCheck: cloudflare.F(magic_transit.IPSECTunnelUpdateParamsHealthCheck{
diff --git a/r2/superslurperjob.go b/r2/superslurperjob.go
index 03463e45115..760ae8efc63 100644
--- a/r2/superslurperjob.go
+++ b/r2/superslurperjob.go
@@ -266,10 +266,12 @@ type SuperSlurperJobListResponseSource struct {
Bucket string `json:"bucket"`
Endpoint string `json:"endpoint,nullable"`
Jurisdiction SuperSlurperJobListResponseSourceJurisdiction `json:"jurisdiction"`
- PathPrefix string `json:"pathPrefix,nullable"`
- Vendor SuperSlurperJobListResponseSourceVendor `json:"vendor"`
- JSON superSlurperJobListResponseSourceJSON `json:"-"`
- union SuperSlurperJobListResponseSourceUnion
+ // This field can have the runtime type of [[]string].
+ Keys interface{} `json:"keys"`
+ PathPrefix string `json:"pathPrefix,nullable"`
+ Vendor SuperSlurperJobListResponseSourceVendor `json:"vendor"`
+ JSON superSlurperJobListResponseSourceJSON `json:"-"`
+ union SuperSlurperJobListResponseSourceUnion
}
// superSlurperJobListResponseSourceJSON contains the JSON metadata for the struct
@@ -278,6 +280,7 @@ type superSlurperJobListResponseSourceJSON struct {
Bucket apijson.Field
Endpoint apijson.Field
Jurisdiction apijson.Field
+ Keys apijson.Field
PathPrefix apijson.Field
Vendor apijson.Field
raw string
@@ -337,6 +340,7 @@ func init() {
type SuperSlurperJobListResponseSourceS3SourceResponseSchema struct {
Bucket string `json:"bucket"`
Endpoint string `json:"endpoint,nullable"`
+ Keys []string `json:"keys,nullable"`
PathPrefix string `json:"pathPrefix,nullable"`
Vendor SuperSlurperJobListResponseSourceS3SourceResponseSchemaVendor `json:"vendor"`
JSON superSlurperJobListResponseSourceS3SourceResponseSchemaJSON `json:"-"`
@@ -348,6 +352,7 @@ type SuperSlurperJobListResponseSourceS3SourceResponseSchema struct {
type superSlurperJobListResponseSourceS3SourceResponseSchemaJSON struct {
Bucket apijson.Field
Endpoint apijson.Field
+ Keys apijson.Field
PathPrefix apijson.Field
Vendor apijson.Field
raw string
@@ -381,6 +386,7 @@ func (r SuperSlurperJobListResponseSourceS3SourceResponseSchemaVendor) IsKnown()
type SuperSlurperJobListResponseSourceGcsSourceResponseSchema struct {
Bucket string `json:"bucket"`
+ Keys []string `json:"keys,nullable"`
PathPrefix string `json:"pathPrefix,nullable"`
Vendor SuperSlurperJobListResponseSourceGcsSourceResponseSchemaVendor `json:"vendor"`
JSON superSlurperJobListResponseSourceGcsSourceResponseSchemaJSON `json:"-"`
@@ -391,6 +397,7 @@ type SuperSlurperJobListResponseSourceGcsSourceResponseSchema struct {
// [SuperSlurperJobListResponseSourceGcsSourceResponseSchema]
type superSlurperJobListResponseSourceGcsSourceResponseSchemaJSON struct {
Bucket apijson.Field
+ Keys apijson.Field
PathPrefix apijson.Field
Vendor apijson.Field
raw string
@@ -425,6 +432,7 @@ func (r SuperSlurperJobListResponseSourceGcsSourceResponseSchemaVendor) IsKnown(
type SuperSlurperJobListResponseSourceR2SourceResponseSchema struct {
Bucket string `json:"bucket"`
Jurisdiction SuperSlurperJobListResponseSourceR2SourceResponseSchemaJurisdiction `json:"jurisdiction"`
+ Keys []string `json:"keys,nullable"`
PathPrefix string `json:"pathPrefix,nullable"`
Vendor Provider `json:"vendor"`
JSON superSlurperJobListResponseSourceR2SourceResponseSchemaJSON `json:"-"`
@@ -436,6 +444,7 @@ type SuperSlurperJobListResponseSourceR2SourceResponseSchema struct {
type superSlurperJobListResponseSourceR2SourceResponseSchemaJSON struct {
Bucket apijson.Field
Jurisdiction apijson.Field
+ Keys apijson.Field
PathPrefix apijson.Field
Vendor apijson.Field
raw string
@@ -596,10 +605,12 @@ type SuperSlurperJobGetResponseSource struct {
Bucket string `json:"bucket"`
Endpoint string `json:"endpoint,nullable"`
Jurisdiction SuperSlurperJobGetResponseSourceJurisdiction `json:"jurisdiction"`
- PathPrefix string `json:"pathPrefix,nullable"`
- Vendor SuperSlurperJobGetResponseSourceVendor `json:"vendor"`
- JSON superSlurperJobGetResponseSourceJSON `json:"-"`
- union SuperSlurperJobGetResponseSourceUnion
+ // This field can have the runtime type of [[]string].
+ Keys interface{} `json:"keys"`
+ PathPrefix string `json:"pathPrefix,nullable"`
+ Vendor SuperSlurperJobGetResponseSourceVendor `json:"vendor"`
+ JSON superSlurperJobGetResponseSourceJSON `json:"-"`
+ union SuperSlurperJobGetResponseSourceUnion
}
// superSlurperJobGetResponseSourceJSON contains the JSON metadata for the struct
@@ -608,6 +619,7 @@ type superSlurperJobGetResponseSourceJSON struct {
Bucket apijson.Field
Endpoint apijson.Field
Jurisdiction apijson.Field
+ Keys apijson.Field
PathPrefix apijson.Field
Vendor apijson.Field
raw string
@@ -667,6 +679,7 @@ func init() {
type SuperSlurperJobGetResponseSourceS3SourceResponseSchema struct {
Bucket string `json:"bucket"`
Endpoint string `json:"endpoint,nullable"`
+ Keys []string `json:"keys,nullable"`
PathPrefix string `json:"pathPrefix,nullable"`
Vendor SuperSlurperJobGetResponseSourceS3SourceResponseSchemaVendor `json:"vendor"`
JSON superSlurperJobGetResponseSourceS3SourceResponseSchemaJSON `json:"-"`
@@ -677,6 +690,7 @@ type SuperSlurperJobGetResponseSourceS3SourceResponseSchema struct {
type superSlurperJobGetResponseSourceS3SourceResponseSchemaJSON struct {
Bucket apijson.Field
Endpoint apijson.Field
+ Keys apijson.Field
PathPrefix apijson.Field
Vendor apijson.Field
raw string
@@ -710,6 +724,7 @@ func (r SuperSlurperJobGetResponseSourceS3SourceResponseSchemaVendor) IsKnown()
type SuperSlurperJobGetResponseSourceGcsSourceResponseSchema struct {
Bucket string `json:"bucket"`
+ Keys []string `json:"keys,nullable"`
PathPrefix string `json:"pathPrefix,nullable"`
Vendor SuperSlurperJobGetResponseSourceGcsSourceResponseSchemaVendor `json:"vendor"`
JSON superSlurperJobGetResponseSourceGcsSourceResponseSchemaJSON `json:"-"`
@@ -720,6 +735,7 @@ type SuperSlurperJobGetResponseSourceGcsSourceResponseSchema struct {
// [SuperSlurperJobGetResponseSourceGcsSourceResponseSchema]
type superSlurperJobGetResponseSourceGcsSourceResponseSchemaJSON struct {
Bucket apijson.Field
+ Keys apijson.Field
PathPrefix apijson.Field
Vendor apijson.Field
raw string
@@ -754,6 +770,7 @@ func (r SuperSlurperJobGetResponseSourceGcsSourceResponseSchemaVendor) IsKnown()
type SuperSlurperJobGetResponseSourceR2SourceResponseSchema struct {
Bucket string `json:"bucket"`
Jurisdiction SuperSlurperJobGetResponseSourceR2SourceResponseSchemaJurisdiction `json:"jurisdiction"`
+ Keys []string `json:"keys,nullable"`
PathPrefix string `json:"pathPrefix,nullable"`
Vendor Provider `json:"vendor"`
JSON superSlurperJobGetResponseSourceR2SourceResponseSchemaJSON `json:"-"`
@@ -764,6 +781,7 @@ type SuperSlurperJobGetResponseSourceR2SourceResponseSchema struct {
type superSlurperJobGetResponseSourceR2SourceResponseSchemaJSON struct {
Bucket apijson.Field
Jurisdiction apijson.Field
+ Keys apijson.Field
PathPrefix apijson.Field
Vendor apijson.Field
raw string
diff --git a/radar/aitomarkdown.go b/radar/aitomarkdown.go
index af95b8304e4..fde9103842c 100644
--- a/radar/aitomarkdown.go
+++ b/radar/aitomarkdown.go
@@ -44,15 +44,15 @@ func NewAIToMarkdownService(opts ...option.RequestOption) (r *AIToMarkdownServic
// Deprecated: Use
// [AI > To Markdown](https://developers.cloudflare.com/api/resources/ai/subresources/to_markdown/)
// instead.
-func (r *AIToMarkdownService) New(ctx context.Context, file io.Reader, body AIToMarkdownNewParams, opts ...option.RequestOption) (res *pagination.SinglePage[AIToMarkdownNewResponse], err error) {
+func (r *AIToMarkdownService) New(ctx context.Context, file io.Reader, params AIToMarkdownNewParams, opts ...option.RequestOption) (res *pagination.SinglePage[AIToMarkdownNewResponse], err error) {
var raw *http.Response
opts = slices.Concat(r.Options, opts)
opts = append([]option.RequestOption{option.WithRequestBody("application/octet-stream", file), option.WithResponseInto(&raw)}, opts...)
- if body.AccountID.Value == "" {
+ if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
return
}
- path := fmt.Sprintf("accounts/%s/ai/tomarkdown", body.AccountID)
+ path := fmt.Sprintf("accounts/%s/ai/tomarkdown", params.AccountID)
cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodPost, path, nil, &res, opts...)
if err != nil {
return nil, err
@@ -70,8 +70,8 @@ func (r *AIToMarkdownService) New(ctx context.Context, file io.Reader, body AITo
// Deprecated: Use
// [AI > To Markdown](https://developers.cloudflare.com/api/resources/ai/subresources/to_markdown/)
// instead.
-func (r *AIToMarkdownService) NewAutoPaging(ctx context.Context, file io.Reader, body AIToMarkdownNewParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[AIToMarkdownNewResponse] {
- return pagination.NewSinglePageAutoPager(r.New(ctx, file, body, opts...))
+func (r *AIToMarkdownService) NewAutoPaging(ctx context.Context, file io.Reader, params AIToMarkdownNewParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[AIToMarkdownNewResponse] {
+ return pagination.NewSinglePageAutoPager(r.New(ctx, file, params, opts...))
}
type AIToMarkdownNewResponse struct {
diff --git a/radar/botwebcrawler.go b/radar/botwebcrawler.go
index 7988adf55dc..16f5c2602da 100644
--- a/radar/botwebcrawler.go
+++ b/radar/botwebcrawler.go
@@ -616,6 +616,8 @@ func (r botWebCrawlerTimeseriesGroupsResponseSerie0JSON) RawJSON() string {
type BotWebCrawlerSummaryParams struct {
// Filters results by bot operator.
BotOperator param.Field[[]string] `query:"botOperator"`
+ // Filters results by agent type.
+ ClientType param.Field[[]BotWebCrawlerSummaryParamsClientType] `query:"clientType"`
// End of the date range (inclusive).
DateEnd param.Field[[]time.Time] `query:"dateEnd" format:"date-time"`
// Filters results by date range. For example, use `7d` and `7dcontrol` to compare
@@ -651,6 +653,7 @@ func (r BotWebCrawlerSummaryParams) URLQuery() (v url.Values) {
type BotWebCrawlerSummaryParamsDimension string
const (
+ BotWebCrawlerSummaryParamsDimensionClientType BotWebCrawlerSummaryParamsDimension = "CLIENT_TYPE"
BotWebCrawlerSummaryParamsDimensionUserAgent BotWebCrawlerSummaryParamsDimension = "USER_AGENT"
BotWebCrawlerSummaryParamsDimensionReferer BotWebCrawlerSummaryParamsDimension = "REFERER"
BotWebCrawlerSummaryParamsDimensionCrawlReferRatio BotWebCrawlerSummaryParamsDimension = "CRAWL_REFER_RATIO"
@@ -660,7 +663,25 @@ const (
func (r BotWebCrawlerSummaryParamsDimension) IsKnown() bool {
switch r {
- case BotWebCrawlerSummaryParamsDimensionUserAgent, BotWebCrawlerSummaryParamsDimensionReferer, BotWebCrawlerSummaryParamsDimensionCrawlReferRatio, BotWebCrawlerSummaryParamsDimensionVertical, BotWebCrawlerSummaryParamsDimensionIndustry:
+ case BotWebCrawlerSummaryParamsDimensionClientType, BotWebCrawlerSummaryParamsDimensionUserAgent, BotWebCrawlerSummaryParamsDimensionReferer, BotWebCrawlerSummaryParamsDimensionCrawlReferRatio, BotWebCrawlerSummaryParamsDimensionVertical, BotWebCrawlerSummaryParamsDimensionIndustry:
+ return true
+ }
+ return false
+}
+
+// The type of the client.
+type BotWebCrawlerSummaryParamsClientType string
+
+const (
+ BotWebCrawlerSummaryParamsClientTypeHuman BotWebCrawlerSummaryParamsClientType = "HUMAN"
+ BotWebCrawlerSummaryParamsClientTypeNonAIBot BotWebCrawlerSummaryParamsClientType = "NON_AI_BOT"
+ BotWebCrawlerSummaryParamsClientTypeAIBot BotWebCrawlerSummaryParamsClientType = "AI_BOT"
+ BotWebCrawlerSummaryParamsClientTypeMixedPurpose BotWebCrawlerSummaryParamsClientType = "MIXED_PURPOSE"
+)
+
+func (r BotWebCrawlerSummaryParamsClientType) IsKnown() bool {
+ switch r {
+ case BotWebCrawlerSummaryParamsClientTypeHuman, BotWebCrawlerSummaryParamsClientTypeNonAIBot, BotWebCrawlerSummaryParamsClientTypeAIBot, BotWebCrawlerSummaryParamsClientTypeMixedPurpose:
return true
}
return false
@@ -712,6 +733,8 @@ type BotWebCrawlerTimeseriesGroupsParams struct {
AggInterval param.Field[BotWebCrawlerTimeseriesGroupsParamsAggInterval] `query:"aggInterval"`
// Filters results by bot operator.
BotOperator param.Field[[]string] `query:"botOperator"`
+ // Filters results by agent type.
+ ClientType param.Field[[]BotWebCrawlerTimeseriesGroupsParamsClientType] `query:"clientType"`
// End of the date range (inclusive).
DateEnd param.Field[[]time.Time] `query:"dateEnd" format:"date-time"`
// Filters results by date range. For example, use `7d` and `7dcontrol` to compare
@@ -747,6 +770,7 @@ func (r BotWebCrawlerTimeseriesGroupsParams) URLQuery() (v url.Values) {
type BotWebCrawlerTimeseriesGroupsParamsDimension string
const (
+ BotWebCrawlerTimeseriesGroupsParamsDimensionClientType BotWebCrawlerTimeseriesGroupsParamsDimension = "CLIENT_TYPE"
BotWebCrawlerTimeseriesGroupsParamsDimensionUserAgent BotWebCrawlerTimeseriesGroupsParamsDimension = "USER_AGENT"
BotWebCrawlerTimeseriesGroupsParamsDimensionReferer BotWebCrawlerTimeseriesGroupsParamsDimension = "REFERER"
BotWebCrawlerTimeseriesGroupsParamsDimensionCrawlReferRatio BotWebCrawlerTimeseriesGroupsParamsDimension = "CRAWL_REFER_RATIO"
@@ -756,7 +780,7 @@ const (
func (r BotWebCrawlerTimeseriesGroupsParamsDimension) IsKnown() bool {
switch r {
- case BotWebCrawlerTimeseriesGroupsParamsDimensionUserAgent, BotWebCrawlerTimeseriesGroupsParamsDimensionReferer, BotWebCrawlerTimeseriesGroupsParamsDimensionCrawlReferRatio, BotWebCrawlerTimeseriesGroupsParamsDimensionVertical, BotWebCrawlerTimeseriesGroupsParamsDimensionIndustry:
+ case BotWebCrawlerTimeseriesGroupsParamsDimensionClientType, BotWebCrawlerTimeseriesGroupsParamsDimensionUserAgent, BotWebCrawlerTimeseriesGroupsParamsDimensionReferer, BotWebCrawlerTimeseriesGroupsParamsDimensionCrawlReferRatio, BotWebCrawlerTimeseriesGroupsParamsDimensionVertical, BotWebCrawlerTimeseriesGroupsParamsDimensionIndustry:
return true
}
return false
@@ -782,6 +806,24 @@ func (r BotWebCrawlerTimeseriesGroupsParamsAggInterval) IsKnown() bool {
return false
}
+// The type of the client.
+type BotWebCrawlerTimeseriesGroupsParamsClientType string
+
+const (
+ BotWebCrawlerTimeseriesGroupsParamsClientTypeHuman BotWebCrawlerTimeseriesGroupsParamsClientType = "HUMAN"
+ BotWebCrawlerTimeseriesGroupsParamsClientTypeNonAIBot BotWebCrawlerTimeseriesGroupsParamsClientType = "NON_AI_BOT"
+ BotWebCrawlerTimeseriesGroupsParamsClientTypeAIBot BotWebCrawlerTimeseriesGroupsParamsClientType = "AI_BOT"
+ BotWebCrawlerTimeseriesGroupsParamsClientTypeMixedPurpose BotWebCrawlerTimeseriesGroupsParamsClientType = "MIXED_PURPOSE"
+)
+
+func (r BotWebCrawlerTimeseriesGroupsParamsClientType) IsKnown() bool {
+ switch r {
+ case BotWebCrawlerTimeseriesGroupsParamsClientTypeHuman, BotWebCrawlerTimeseriesGroupsParamsClientTypeNonAIBot, BotWebCrawlerTimeseriesGroupsParamsClientTypeAIBot, BotWebCrawlerTimeseriesGroupsParamsClientTypeMixedPurpose:
+ return true
+ }
+ return false
+}
+
// Format in which results will be returned.
type BotWebCrawlerTimeseriesGroupsParamsFormat string
diff --git a/radar/botwebcrawler_test.go b/radar/botwebcrawler_test.go
index d1f8f957da0..d8495c3c567 100644
--- a/radar/botwebcrawler_test.go
+++ b/radar/botwebcrawler_test.go
@@ -30,9 +30,10 @@ func TestBotWebCrawlerSummaryWithOptionalParams(t *testing.T) {
)
_, err := client.Radar.Bots.WebCrawlers.Summary(
context.TODO(),
- radar.BotWebCrawlerSummaryParamsDimensionUserAgent,
+ radar.BotWebCrawlerSummaryParamsDimensionClientType,
radar.BotWebCrawlerSummaryParams{
BotOperator: cloudflare.F([]string{"string"}),
+ ClientType: cloudflare.F([]radar.BotWebCrawlerSummaryParamsClientType{radar.BotWebCrawlerSummaryParamsClientTypeHuman}),
DateEnd: cloudflare.F([]time.Time{time.Now()}),
DateRange: cloudflare.F([]string{"7d"}),
DateStart: cloudflare.F([]time.Time{time.Now()}),
@@ -67,10 +68,11 @@ func TestBotWebCrawlerTimeseriesGroupsWithOptionalParams(t *testing.T) {
)
_, err := client.Radar.Bots.WebCrawlers.TimeseriesGroups(
context.TODO(),
- radar.BotWebCrawlerTimeseriesGroupsParamsDimensionUserAgent,
+ radar.BotWebCrawlerTimeseriesGroupsParamsDimensionClientType,
radar.BotWebCrawlerTimeseriesGroupsParams{
AggInterval: cloudflare.F(radar.BotWebCrawlerTimeseriesGroupsParamsAggInterval1h),
BotOperator: cloudflare.F([]string{"string"}),
+ ClientType: cloudflare.F([]radar.BotWebCrawlerTimeseriesGroupsParamsClientType{radar.BotWebCrawlerTimeseriesGroupsParamsClientTypeHuman}),
DateEnd: cloudflare.F([]time.Time{time.Now()}),
DateRange: cloudflare.F([]string{"7d"}),
DateStart: cloudflare.F([]time.Time{time.Now()}),
diff --git a/scripts/detect-breaking-changes b/scripts/detect-breaking-changes
index 9cf93a4825e..30a81e56dc7 100755
--- a/scripts/detect-breaking-changes
+++ b/scripts/detect-breaking-changes
@@ -650,6 +650,10 @@ TEST_PATHS=(
ai/model_test.go
ai/modelschema_test.go
ai/tomarkdown_test.go
+ ai_search/instance_test.go
+ ai_search/instanceitem_test.go
+ ai_search/instancejob_test.go
+ ai_search/token_test.go
security_center/insight_test.go
security_center/insightclass_test.go
security_center/insightseverity_test.go
diff --git a/workers/betaworkerversion.go b/workers/betaworkerversion.go
index fd5c96a6b34..59ee98b689b 100644
--- a/workers/betaworkerversion.go
+++ b/workers/betaworkerversion.go
@@ -189,6 +189,9 @@ type Version struct {
Placement VersionPlacement `json:"placement"`
// The client used to create the version.
Source string `json:"source"`
+ // Time in milliseconds spent on
+ // [Worker startup](https://developers.cloudflare.com/workers/platform/limits/#worker-startup-time).
+ StartupTimeMs int64 `json:"startup_time_ms"`
// Usage model for the version.
//
// Deprecated: deprecated
@@ -212,6 +215,7 @@ type versionJSON struct {
Modules apijson.Field
Placement apijson.Field
Source apijson.Field
+ StartupTimeMs apijson.Field
UsageModel apijson.Field
raw string
ExtraFields map[string]apijson.Field
diff --git a/zero_trust/dlpdatasetupload.go b/zero_trust/dlpdatasetupload.go
index 7774141ce03..e1c8d1feda2 100644
--- a/zero_trust/dlpdatasetupload.go
+++ b/zero_trust/dlpdatasetupload.go
@@ -64,11 +64,11 @@ 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 *DLPDatasetUploadEditResponse, err error) {
+func (r *DLPDatasetUploadService) Edit(ctx context.Context, datasetID string, version int64, dataset io.Reader, params 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...)
- if body.AccountID.Value == "" {
+ if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
return
}
@@ -76,7 +76,7 @@ func (r *DLPDatasetUploadService) Edit(ctx context.Context, datasetID string, ve
err = errors.New("missing required dataset_id parameter")
return
}
- path := fmt.Sprintf("accounts/%s/dlp/datasets/%s/upload/%v", body.AccountID, datasetID, version)
+ path := fmt.Sprintf("accounts/%s/dlp/datasets/%s/upload/%v", params.AccountID, datasetID, version)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
diff --git a/zero_trust/dlpdatasetversionentry.go b/zero_trust/dlpdatasetversionentry.go
index b7fd69705e5..505ca1cf031 100644
--- a/zero_trust/dlpdatasetversionentry.go
+++ b/zero_trust/dlpdatasetversionentry.go
@@ -40,11 +40,11 @@ func NewDLPDatasetVersionEntryService(opts ...option.RequestOption) (r *DLPDatas
// This is used for multi-column EDMv2 datasets. The EDMv2 format can only be
// created in the Cloudflare dashboard.
-func (r *DLPDatasetVersionEntryService) New(ctx context.Context, datasetID string, version int64, entryID string, datasetVersionEntry io.Reader, body DLPDatasetVersionEntryNewParams, opts ...option.RequestOption) (res *DLPDatasetVersionEntryNewResponse, err error) {
+func (r *DLPDatasetVersionEntryService) New(ctx context.Context, datasetID string, version int64, entryID string, datasetVersionEntry io.Reader, params DLPDatasetVersionEntryNewParams, opts ...option.RequestOption) (res *DLPDatasetVersionEntryNewResponse, err error) {
var env DLPDatasetVersionEntryNewResponseEnvelope
opts = slices.Concat(r.Options, opts)
opts = append([]option.RequestOption{option.WithRequestBody("application/octet-stream", datasetVersionEntry)}, opts...)
- if body.AccountID.Value == "" {
+ if params.AccountID.Value == "" {
err = errors.New("missing required account_id parameter")
return
}
@@ -56,7 +56,7 @@ func (r *DLPDatasetVersionEntryService) New(ctx context.Context, datasetID strin
err = errors.New("missing required entry_id parameter")
return
}
- path := fmt.Sprintf("accounts/%s/dlp/datasets/%s/versions/%v/entries/%s", body.AccountID, datasetID, version, entryID)
+ path := fmt.Sprintf("accounts/%s/dlp/datasets/%s/versions/%v/entries/%s", params.AccountID, datasetID, version, entryID)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, nil, &env, opts...)
if err != nil {
return
diff --git a/zero_trust/dlpentry.go b/zero_trust/dlpentry.go
index 99615925399..ed9b165697d 100644
--- a/zero_trust/dlpentry.go
+++ b/zero_trust/dlpentry.go
@@ -706,14 +706,16 @@ 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
- // [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 [DLPEntryListResponsePredefinedVariant].
+ // [DLPEntryListResponsePredefinedEntryConfidence].
+ 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"`
+ UploadStatus DLPEntryListResponseUploadStatus `json:"upload_status"`
+ // This field can have the runtime type of
+ // [DLPEntryListResponsePredefinedEntryVariant].
Variant interface{} `json:"variant"`
// This field can have the runtime type of [interface{}].
WordList interface{} `json:"word_list"`
@@ -735,6 +737,7 @@ type dlpEntryListResponseJSON struct {
ProfileID apijson.Field
Secret apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
Variant apijson.Field
WordList apijson.Field
raw string
@@ -757,18 +760,20 @@ 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 [DLPEntryListResponseCustom],
-// [DLPEntryListResponsePredefined], [DLPEntryListResponseIntegration],
-// [DLPEntryListResponseExactData], [DLPEntryListResponseDocumentFingerprint],
-// [DLPEntryListResponseWordList].
+// Possible runtime types of the union are [DLPEntryListResponseCustomEntry],
+// [DLPEntryListResponsePredefinedEntry], [DLPEntryListResponseIntegrationEntry],
+// [DLPEntryListResponseExactDataEntry],
+// [DLPEntryListResponseDocumentFingerprintEntry],
+// [DLPEntryListResponseWordListEntry].
func (r DLPEntryListResponse) AsUnion() DLPEntryListResponseUnion {
return r.union
}
-// Union satisfied by [DLPEntryListResponseCustom],
-// [DLPEntryListResponsePredefined], [DLPEntryListResponseIntegration],
-// [DLPEntryListResponseExactData], [DLPEntryListResponseDocumentFingerprint] or
-// [DLPEntryListResponseWordList].
+// Union satisfied by [DLPEntryListResponseCustomEntry],
+// [DLPEntryListResponsePredefinedEntry], [DLPEntryListResponseIntegrationEntry],
+// [DLPEntryListResponseExactDataEntry],
+// [DLPEntryListResponseDocumentFingerprintEntry] or
+// [DLPEntryListResponseWordListEntry].
type DLPEntryListResponseUnion interface {
implementsDLPEntryListResponse()
}
@@ -776,176 +781,212 @@ type DLPEntryListResponseUnion interface {
func init() {
apijson.RegisterUnion(
reflect.TypeOf((*DLPEntryListResponseUnion)(nil)).Elem(),
- "type",
+ "",
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryListResponseCustom{}),
- DiscriminatorValue: "custom",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryListResponseCustomEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryListResponsePredefined{}),
- DiscriminatorValue: "predefined",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryListResponsePredefinedEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryListResponseIntegration{}),
- DiscriminatorValue: "integration",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryListResponseIntegrationEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryListResponseExactData{}),
- DiscriminatorValue: "exact_data",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryListResponseExactDataEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryListResponseDocumentFingerprint{}),
- DiscriminatorValue: "document_fingerprint",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryListResponseDocumentFingerprintEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryListResponseWordList{}),
- DiscriminatorValue: "word_list",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryListResponseWordListEntry{}),
},
)
}
-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:"-"`
-}
-
-// dlpEntryListResponseCustomJSON contains the JSON metadata for the struct
-// [DLPEntryListResponseCustom]
-type dlpEntryListResponseCustomJSON 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 *DLPEntryListResponseCustom) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryListResponseCustomEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryListResponseCustomEntryJSON `json:"-"`
+}
+
+// dlpEntryListResponseCustomEntryJSON contains the JSON metadata for the struct
+// [DLPEntryListResponseCustomEntry]
+type dlpEntryListResponseCustomEntryJSON 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
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryListResponseCustomEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryListResponseCustomJSON) RawJSON() string {
+func (r dlpEntryListResponseCustomEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryListResponseCustom) implementsDLPEntryListResponse() {}
+func (r DLPEntryListResponseCustomEntry) implementsDLPEntryListResponse() {}
-type DLPEntryListResponseCustomType string
+type DLPEntryListResponseCustomEntryType string
const (
- DLPEntryListResponseCustomTypeCustom DLPEntryListResponseCustomType = "custom"
+ DLPEntryListResponseCustomEntryTypeCustom DLPEntryListResponseCustomEntryType = "custom"
)
-func (r DLPEntryListResponseCustomType) IsKnown() bool {
+func (r DLPEntryListResponseCustomEntryType) IsKnown() bool {
switch r {
- case DLPEntryListResponseCustomTypeCustom:
+ case DLPEntryListResponseCustomEntryTypeCustom:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryListResponseCustomEntryUploadStatus string
-// dlpEntryListResponsePredefinedJSON contains the JSON metadata for the struct
-// [DLPEntryListResponsePredefined]
-type dlpEntryListResponsePredefinedJSON 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
+const (
+ DLPEntryListResponseCustomEntryUploadStatusEmpty DLPEntryListResponseCustomEntryUploadStatus = "empty"
+ DLPEntryListResponseCustomEntryUploadStatusUploading DLPEntryListResponseCustomEntryUploadStatus = "uploading"
+ DLPEntryListResponseCustomEntryUploadStatusPending DLPEntryListResponseCustomEntryUploadStatus = "pending"
+ DLPEntryListResponseCustomEntryUploadStatusProcessing DLPEntryListResponseCustomEntryUploadStatus = "processing"
+ DLPEntryListResponseCustomEntryUploadStatusFailed DLPEntryListResponseCustomEntryUploadStatus = "failed"
+ DLPEntryListResponseCustomEntryUploadStatusComplete DLPEntryListResponseCustomEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryListResponseCustomEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryListResponseCustomEntryUploadStatusEmpty, DLPEntryListResponseCustomEntryUploadStatusUploading, DLPEntryListResponseCustomEntryUploadStatusPending, DLPEntryListResponseCustomEntryUploadStatusProcessing, DLPEntryListResponseCustomEntryUploadStatusFailed, DLPEntryListResponseCustomEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryListResponsePredefined) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryListResponsePredefinedEntryUploadStatus `json:"upload_status"`
+ Variant DLPEntryListResponsePredefinedEntryVariant `json:"variant"`
+ JSON dlpEntryListResponsePredefinedEntryJSON `json:"-"`
+}
+
+// dlpEntryListResponsePredefinedEntryJSON contains the JSON metadata for the
+// struct [DLPEntryListResponsePredefinedEntry]
+type dlpEntryListResponsePredefinedEntryJSON struct {
+ ID apijson.Field
+ Confidence apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ ProfileID apijson.Field
+ UploadStatus apijson.Field
+ Variant apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryListResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryListResponsePredefinedJSON) RawJSON() string {
+func (r dlpEntryListResponsePredefinedEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryListResponsePredefined) implementsDLPEntryListResponse() {}
+func (r DLPEntryListResponsePredefinedEntry) implementsDLPEntryListResponse() {}
-type DLPEntryListResponsePredefinedConfidence struct {
+type DLPEntryListResponsePredefinedEntryConfidence 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 dlpEntryListResponsePredefinedConfidenceJSON `json:"-"`
+ Available bool `json:"available,required"`
+ JSON dlpEntryListResponsePredefinedEntryConfidenceJSON `json:"-"`
}
-// dlpEntryListResponsePredefinedConfidenceJSON contains the JSON metadata for the
-// struct [DLPEntryListResponsePredefinedConfidence]
-type dlpEntryListResponsePredefinedConfidenceJSON struct {
+// dlpEntryListResponsePredefinedEntryConfidenceJSON contains the JSON metadata for
+// the struct [DLPEntryListResponsePredefinedEntryConfidence]
+type dlpEntryListResponsePredefinedEntryConfidenceJSON struct {
AIContextAvailable apijson.Field
Available apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryListResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryListResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryListResponsePredefinedConfidenceJSON) RawJSON() string {
+func (r dlpEntryListResponsePredefinedEntryConfidenceJSON) RawJSON() string {
return r.raw
}
-type DLPEntryListResponsePredefinedType string
+type DLPEntryListResponsePredefinedEntryType string
+
+const (
+ DLPEntryListResponsePredefinedEntryTypePredefined DLPEntryListResponsePredefinedEntryType = "predefined"
+)
+
+func (r DLPEntryListResponsePredefinedEntryType) IsKnown() bool {
+ switch r {
+ case DLPEntryListResponsePredefinedEntryTypePredefined:
+ return true
+ }
+ return false
+}
+
+type DLPEntryListResponsePredefinedEntryUploadStatus string
const (
- DLPEntryListResponsePredefinedTypePredefined DLPEntryListResponsePredefinedType = "predefined"
+ DLPEntryListResponsePredefinedEntryUploadStatusEmpty DLPEntryListResponsePredefinedEntryUploadStatus = "empty"
+ DLPEntryListResponsePredefinedEntryUploadStatusUploading DLPEntryListResponsePredefinedEntryUploadStatus = "uploading"
+ DLPEntryListResponsePredefinedEntryUploadStatusPending DLPEntryListResponsePredefinedEntryUploadStatus = "pending"
+ DLPEntryListResponsePredefinedEntryUploadStatusProcessing DLPEntryListResponsePredefinedEntryUploadStatus = "processing"
+ DLPEntryListResponsePredefinedEntryUploadStatusFailed DLPEntryListResponsePredefinedEntryUploadStatus = "failed"
+ DLPEntryListResponsePredefinedEntryUploadStatusComplete DLPEntryListResponsePredefinedEntryUploadStatus = "complete"
)
-func (r DLPEntryListResponsePredefinedType) IsKnown() bool {
+func (r DLPEntryListResponsePredefinedEntryUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryListResponsePredefinedTypePredefined:
+ case DLPEntryListResponsePredefinedEntryUploadStatusEmpty, DLPEntryListResponsePredefinedEntryUploadStatusUploading, DLPEntryListResponsePredefinedEntryUploadStatusPending, DLPEntryListResponsePredefinedEntryUploadStatusProcessing, DLPEntryListResponsePredefinedEntryUploadStatusFailed, DLPEntryListResponsePredefinedEntryUploadStatusComplete:
return true
}
return false
}
-type DLPEntryListResponsePredefinedVariant struct {
- TopicType DLPEntryListResponsePredefinedVariantTopicType `json:"topic_type,required"`
- Type DLPEntryListResponsePredefinedVariantType `json:"type,required"`
- Description string `json:"description,nullable"`
- JSON dlpEntryListResponsePredefinedVariantJSON `json:"-"`
+type DLPEntryListResponsePredefinedEntryVariant struct {
+ TopicType DLPEntryListResponsePredefinedEntryVariantTopicType `json:"topic_type,required"`
+ Type DLPEntryListResponsePredefinedEntryVariantType `json:"type,required"`
+ Description string `json:"description,nullable"`
+ JSON dlpEntryListResponsePredefinedEntryVariantJSON `json:"-"`
}
-// dlpEntryListResponsePredefinedVariantJSON contains the JSON metadata for the
-// struct [DLPEntryListResponsePredefinedVariant]
-type dlpEntryListResponsePredefinedVariantJSON struct {
+// dlpEntryListResponsePredefinedEntryVariantJSON contains the JSON metadata for
+// the struct [DLPEntryListResponsePredefinedEntryVariant]
+type dlpEntryListResponsePredefinedEntryVariantJSON struct {
TopicType apijson.Field
Type apijson.Field
Description apijson.Field
@@ -953,109 +994,131 @@ type dlpEntryListResponsePredefinedVariantJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryListResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryListResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryListResponsePredefinedVariantJSON) RawJSON() string {
+func (r dlpEntryListResponsePredefinedEntryVariantJSON) RawJSON() string {
return r.raw
}
-type DLPEntryListResponsePredefinedVariantTopicType string
+type DLPEntryListResponsePredefinedEntryVariantTopicType string
const (
- DLPEntryListResponsePredefinedVariantTopicTypeIntent DLPEntryListResponsePredefinedVariantTopicType = "Intent"
- DLPEntryListResponsePredefinedVariantTopicTypeContent DLPEntryListResponsePredefinedVariantTopicType = "Content"
+ DLPEntryListResponsePredefinedEntryVariantTopicTypeIntent DLPEntryListResponsePredefinedEntryVariantTopicType = "Intent"
+ DLPEntryListResponsePredefinedEntryVariantTopicTypeContent DLPEntryListResponsePredefinedEntryVariantTopicType = "Content"
)
-func (r DLPEntryListResponsePredefinedVariantTopicType) IsKnown() bool {
+func (r DLPEntryListResponsePredefinedEntryVariantTopicType) IsKnown() bool {
switch r {
- case DLPEntryListResponsePredefinedVariantTopicTypeIntent, DLPEntryListResponsePredefinedVariantTopicTypeContent:
+ case DLPEntryListResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryListResponsePredefinedEntryVariantTopicTypeContent:
return true
}
return false
}
-type DLPEntryListResponsePredefinedVariantType string
+type DLPEntryListResponsePredefinedEntryVariantType string
const (
- DLPEntryListResponsePredefinedVariantTypePromptTopic DLPEntryListResponsePredefinedVariantType = "PromptTopic"
+ DLPEntryListResponsePredefinedEntryVariantTypePromptTopic DLPEntryListResponsePredefinedEntryVariantType = "PromptTopic"
)
-func (r DLPEntryListResponsePredefinedVariantType) IsKnown() bool {
+func (r DLPEntryListResponsePredefinedEntryVariantType) IsKnown() bool {
switch r {
- case DLPEntryListResponsePredefinedVariantTypePromptTopic:
+ case DLPEntryListResponsePredefinedEntryVariantTypePromptTopic:
return true
}
return false
}
-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:"-"`
-}
-
-// dlpEntryListResponseIntegrationJSON contains the JSON metadata for the struct
-// [DLPEntryListResponseIntegration]
-type dlpEntryListResponseIntegrationJSON 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 *DLPEntryListResponseIntegration) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryListResponseIntegrationEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryListResponseIntegrationEntryJSON `json:"-"`
+}
+
+// dlpEntryListResponseIntegrationEntryJSON contains the JSON metadata for the
+// struct [DLPEntryListResponseIntegrationEntry]
+type dlpEntryListResponseIntegrationEntryJSON struct {
+ ID apijson.Field
+ CreatedAt apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ UpdatedAt apijson.Field
+ ProfileID apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryListResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryListResponseIntegrationJSON) RawJSON() string {
+func (r dlpEntryListResponseIntegrationEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryListResponseIntegration) implementsDLPEntryListResponse() {}
+func (r DLPEntryListResponseIntegrationEntry) implementsDLPEntryListResponse() {}
+
+type DLPEntryListResponseIntegrationEntryType string
+
+const (
+ DLPEntryListResponseIntegrationEntryTypeIntegration DLPEntryListResponseIntegrationEntryType = "integration"
+)
+
+func (r DLPEntryListResponseIntegrationEntryType) IsKnown() bool {
+ switch r {
+ case DLPEntryListResponseIntegrationEntryTypeIntegration:
+ return true
+ }
+ return false
+}
-type DLPEntryListResponseIntegrationType string
+type DLPEntryListResponseIntegrationEntryUploadStatus string
const (
- DLPEntryListResponseIntegrationTypeIntegration DLPEntryListResponseIntegrationType = "integration"
+ DLPEntryListResponseIntegrationEntryUploadStatusEmpty DLPEntryListResponseIntegrationEntryUploadStatus = "empty"
+ DLPEntryListResponseIntegrationEntryUploadStatusUploading DLPEntryListResponseIntegrationEntryUploadStatus = "uploading"
+ DLPEntryListResponseIntegrationEntryUploadStatusPending DLPEntryListResponseIntegrationEntryUploadStatus = "pending"
+ DLPEntryListResponseIntegrationEntryUploadStatusProcessing DLPEntryListResponseIntegrationEntryUploadStatus = "processing"
+ DLPEntryListResponseIntegrationEntryUploadStatusFailed DLPEntryListResponseIntegrationEntryUploadStatus = "failed"
+ DLPEntryListResponseIntegrationEntryUploadStatusComplete DLPEntryListResponseIntegrationEntryUploadStatus = "complete"
)
-func (r DLPEntryListResponseIntegrationType) IsKnown() bool {
+func (r DLPEntryListResponseIntegrationEntryUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryListResponseIntegrationTypeIntegration:
+ case DLPEntryListResponseIntegrationEntryUploadStatusEmpty, DLPEntryListResponseIntegrationEntryUploadStatusUploading, DLPEntryListResponseIntegrationEntryUploadStatusPending, DLPEntryListResponseIntegrationEntryUploadStatusProcessing, DLPEntryListResponseIntegrationEntryUploadStatusFailed, DLPEntryListResponseIntegrationEntryUploadStatusComplete:
return true
}
return false
}
-type DLPEntryListResponseExactData struct {
+type DLPEntryListResponseExactDataEntry 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 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 {
+ 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"`
+ UploadStatus DLPEntryListResponseExactDataEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryListResponseExactDataEntryJSON `json:"-"`
+}
+
+// dlpEntryListResponseExactDataEntryJSON contains the JSON metadata for the struct
+// [DLPEntryListResponseExactDataEntry]
+type dlpEntryListResponseExactDataEntryJSON struct {
ID apijson.Field
CaseSensitive apijson.Field
CreatedAt apijson.Field
@@ -1064,127 +1127,189 @@ type dlpEntryListResponseExactDataJSON struct {
Secret apijson.Field
Type apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryListResponseExactData) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryListResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryListResponseExactDataJSON) RawJSON() string {
+func (r dlpEntryListResponseExactDataEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryListResponseExactData) implementsDLPEntryListResponse() {}
+func (r DLPEntryListResponseExactDataEntry) implementsDLPEntryListResponse() {}
-type DLPEntryListResponseExactDataType string
+type DLPEntryListResponseExactDataEntryType string
const (
- DLPEntryListResponseExactDataTypeExactData DLPEntryListResponseExactDataType = "exact_data"
+ DLPEntryListResponseExactDataEntryTypeExactData DLPEntryListResponseExactDataEntryType = "exact_data"
)
-func (r DLPEntryListResponseExactDataType) IsKnown() bool {
+func (r DLPEntryListResponseExactDataEntryType) IsKnown() bool {
switch r {
- case DLPEntryListResponseExactDataTypeExactData:
+ case DLPEntryListResponseExactDataEntryTypeExactData:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryListResponseExactDataEntryUploadStatus string
-// dlpEntryListResponseDocumentFingerprintJSON contains the JSON metadata for the
-// struct [DLPEntryListResponseDocumentFingerprint]
-type dlpEntryListResponseDocumentFingerprintJSON 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
+const (
+ DLPEntryListResponseExactDataEntryUploadStatusEmpty DLPEntryListResponseExactDataEntryUploadStatus = "empty"
+ DLPEntryListResponseExactDataEntryUploadStatusUploading DLPEntryListResponseExactDataEntryUploadStatus = "uploading"
+ DLPEntryListResponseExactDataEntryUploadStatusPending DLPEntryListResponseExactDataEntryUploadStatus = "pending"
+ DLPEntryListResponseExactDataEntryUploadStatusProcessing DLPEntryListResponseExactDataEntryUploadStatus = "processing"
+ DLPEntryListResponseExactDataEntryUploadStatusFailed DLPEntryListResponseExactDataEntryUploadStatus = "failed"
+ DLPEntryListResponseExactDataEntryUploadStatusComplete DLPEntryListResponseExactDataEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryListResponseExactDataEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryListResponseExactDataEntryUploadStatusEmpty, DLPEntryListResponseExactDataEntryUploadStatusUploading, DLPEntryListResponseExactDataEntryUploadStatusPending, DLPEntryListResponseExactDataEntryUploadStatusProcessing, DLPEntryListResponseExactDataEntryUploadStatusFailed, DLPEntryListResponseExactDataEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryListResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryListResponseDocumentFingerprintEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryListResponseDocumentFingerprintEntryJSON `json:"-"`
+}
+
+// dlpEntryListResponseDocumentFingerprintEntryJSON contains the JSON metadata for
+// the struct [DLPEntryListResponseDocumentFingerprintEntry]
+type dlpEntryListResponseDocumentFingerprintEntryJSON struct {
+ ID apijson.Field
+ CreatedAt apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ UpdatedAt apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryListResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryListResponseDocumentFingerprintJSON) RawJSON() string {
+func (r dlpEntryListResponseDocumentFingerprintEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryListResponseDocumentFingerprint) implementsDLPEntryListResponse() {}
+func (r DLPEntryListResponseDocumentFingerprintEntry) implementsDLPEntryListResponse() {}
-type DLPEntryListResponseDocumentFingerprintType string
+type DLPEntryListResponseDocumentFingerprintEntryType string
const (
- DLPEntryListResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryListResponseDocumentFingerprintType = "document_fingerprint"
+ DLPEntryListResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryListResponseDocumentFingerprintEntryType = "document_fingerprint"
)
-func (r DLPEntryListResponseDocumentFingerprintType) IsKnown() bool {
+func (r DLPEntryListResponseDocumentFingerprintEntryType) IsKnown() bool {
switch r {
- case DLPEntryListResponseDocumentFingerprintTypeDocumentFingerprint:
+ case DLPEntryListResponseDocumentFingerprintEntryTypeDocumentFingerprint:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryListResponseDocumentFingerprintEntryUploadStatus string
-// dlpEntryListResponseWordListJSON contains the JSON metadata for the struct
-// [DLPEntryListResponseWordList]
-type dlpEntryListResponseWordListJSON 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
+const (
+ DLPEntryListResponseDocumentFingerprintEntryUploadStatusEmpty DLPEntryListResponseDocumentFingerprintEntryUploadStatus = "empty"
+ DLPEntryListResponseDocumentFingerprintEntryUploadStatusUploading DLPEntryListResponseDocumentFingerprintEntryUploadStatus = "uploading"
+ DLPEntryListResponseDocumentFingerprintEntryUploadStatusPending DLPEntryListResponseDocumentFingerprintEntryUploadStatus = "pending"
+ DLPEntryListResponseDocumentFingerprintEntryUploadStatusProcessing DLPEntryListResponseDocumentFingerprintEntryUploadStatus = "processing"
+ DLPEntryListResponseDocumentFingerprintEntryUploadStatusFailed DLPEntryListResponseDocumentFingerprintEntryUploadStatus = "failed"
+ DLPEntryListResponseDocumentFingerprintEntryUploadStatusComplete DLPEntryListResponseDocumentFingerprintEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryListResponseDocumentFingerprintEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryListResponseDocumentFingerprintEntryUploadStatusEmpty, DLPEntryListResponseDocumentFingerprintEntryUploadStatusUploading, DLPEntryListResponseDocumentFingerprintEntryUploadStatusPending, DLPEntryListResponseDocumentFingerprintEntryUploadStatusProcessing, DLPEntryListResponseDocumentFingerprintEntryUploadStatusFailed, DLPEntryListResponseDocumentFingerprintEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryListResponseWordList) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryListResponseWordListEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryListResponseWordListEntryJSON `json:"-"`
+}
+
+// dlpEntryListResponseWordListEntryJSON contains the JSON metadata for the struct
+// [DLPEntryListResponseWordListEntry]
+type dlpEntryListResponseWordListEntryJSON 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
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryListResponseWordListEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryListResponseWordListJSON) RawJSON() string {
+func (r dlpEntryListResponseWordListEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryListResponseWordList) implementsDLPEntryListResponse() {}
+func (r DLPEntryListResponseWordListEntry) implementsDLPEntryListResponse() {}
+
+type DLPEntryListResponseWordListEntryType string
+
+const (
+ DLPEntryListResponseWordListEntryTypeWordList DLPEntryListResponseWordListEntryType = "word_list"
+)
+
+func (r DLPEntryListResponseWordListEntryType) IsKnown() bool {
+ switch r {
+ case DLPEntryListResponseWordListEntryTypeWordList:
+ return true
+ }
+ return false
+}
-type DLPEntryListResponseWordListType string
+type DLPEntryListResponseWordListEntryUploadStatus string
const (
- DLPEntryListResponseWordListTypeWordList DLPEntryListResponseWordListType = "word_list"
+ DLPEntryListResponseWordListEntryUploadStatusEmpty DLPEntryListResponseWordListEntryUploadStatus = "empty"
+ DLPEntryListResponseWordListEntryUploadStatusUploading DLPEntryListResponseWordListEntryUploadStatus = "uploading"
+ DLPEntryListResponseWordListEntryUploadStatusPending DLPEntryListResponseWordListEntryUploadStatus = "pending"
+ DLPEntryListResponseWordListEntryUploadStatusProcessing DLPEntryListResponseWordListEntryUploadStatus = "processing"
+ DLPEntryListResponseWordListEntryUploadStatusFailed DLPEntryListResponseWordListEntryUploadStatus = "failed"
+ DLPEntryListResponseWordListEntryUploadStatusComplete DLPEntryListResponseWordListEntryUploadStatus = "complete"
)
-func (r DLPEntryListResponseWordListType) IsKnown() bool {
+func (r DLPEntryListResponseWordListEntryUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryListResponseWordListTypeWordList:
+ case DLPEntryListResponseWordListEntryUploadStatusEmpty, DLPEntryListResponseWordListEntryUploadStatusUploading, DLPEntryListResponseWordListEntryUploadStatusPending, DLPEntryListResponseWordListEntryUploadStatusProcessing, DLPEntryListResponseWordListEntryUploadStatusFailed, DLPEntryListResponseWordListEntryUploadStatusComplete:
return true
}
return false
@@ -1209,6 +1334,25 @@ func (r DLPEntryListResponseType) IsKnown() bool {
return false
}
+type DLPEntryListResponseUploadStatus string
+
+const (
+ DLPEntryListResponseUploadStatusEmpty DLPEntryListResponseUploadStatus = "empty"
+ DLPEntryListResponseUploadStatusUploading DLPEntryListResponseUploadStatus = "uploading"
+ DLPEntryListResponseUploadStatusPending DLPEntryListResponseUploadStatus = "pending"
+ DLPEntryListResponseUploadStatusProcessing DLPEntryListResponseUploadStatus = "processing"
+ DLPEntryListResponseUploadStatusFailed DLPEntryListResponseUploadStatus = "failed"
+ DLPEntryListResponseUploadStatusComplete DLPEntryListResponseUploadStatus = "complete"
+)
+
+func (r DLPEntryListResponseUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryListResponseUploadStatusEmpty, DLPEntryListResponseUploadStatusUploading, DLPEntryListResponseUploadStatusPending, DLPEntryListResponseUploadStatusProcessing, DLPEntryListResponseUploadStatusFailed, DLPEntryListResponseUploadStatusComplete:
+ return true
+ }
+ return false
+}
+
type DLPEntryDeleteResponse = interface{}
type DLPEntryGetResponse struct {
@@ -1219,24 +1363,17 @@ type DLPEntryGetResponse struct {
// 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
- // [DLPEntryGetResponsePredefinedEntryConfidence].
+ // This field can have the runtime type of [DLPEntryGetResponseObjectConfidence].
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"`
- // 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].
+ // This field can have the runtime type of [[]DLPEntryGetResponseObjectProfile].
+ Profiles interface{} `json:"profiles"`
+ Secret bool `json:"secret"`
+ UpdatedAt time.Time `json:"updated_at" format:"date-time"`
+ UploadStatus DLPEntryGetResponseUploadStatus `json:"upload_status"`
+ // This field can have the runtime type of [DLPEntryGetResponseObjectVariant].
Variant interface{} `json:"variant"`
// This field can have the runtime type of [interface{}].
WordList interface{} `json:"word_list"`
@@ -1259,6 +1396,7 @@ type dlpEntryGetResponseJSON struct {
Profiles apijson.Field
Secret apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
Variant apijson.Field
WordList apijson.Field
raw string
@@ -1281,20 +1419,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 [DLPEntryGetResponseObject],
+// [DLPEntryGetResponseObject], [DLPEntryGetResponseObject],
+// [DLPEntryGetResponseObject], [DLPEntryGetResponseObject],
+// [DLPEntryGetResponseObject].
func (r DLPEntryGetResponse) AsUnion() DLPEntryGetResponseUnion {
return r.union
}
-// Union satisfied by [DLPEntryGetResponseCustomEntry],
-// [DLPEntryGetResponsePredefinedEntry], [DLPEntryGetResponseIntegrationEntry],
-// [DLPEntryGetResponseExactDataEntry],
-// [DLPEntryGetResponseDocumentFingerprintEntry] or
-// [DLPEntryGetResponseWordListEntry].
+// Union satisfied by [DLPEntryGetResponseObject], [DLPEntryGetResponseObject],
+// [DLPEntryGetResponseObject], [DLPEntryGetResponseObject],
+// [DLPEntryGetResponseObject] or [DLPEntryGetResponseObject].
type DLPEntryGetResponseUnion interface {
implementsDLPEntryGetResponse()
}
@@ -1305,581 +1440,162 @@ func init() {
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryGetResponseCustomEntry{}),
+ Type: reflect.TypeOf(DLPEntryGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryGetResponsePredefinedEntry{}),
+ Type: reflect.TypeOf(DLPEntryGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryGetResponseIntegrationEntry{}),
+ Type: reflect.TypeOf(DLPEntryGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryGetResponseExactDataEntry{}),
+ Type: reflect.TypeOf(DLPEntryGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryGetResponseDocumentFingerprintEntry{}),
+ Type: reflect.TypeOf(DLPEntryGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryGetResponseWordListEntry{}),
+ Type: reflect.TypeOf(DLPEntryGetResponseObject{}),
},
)
}
-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:"-"`
-}
-
-// dlpEntryGetResponseCustomEntryJSON contains the JSON metadata for the struct
-// [DLPEntryGetResponseCustomEntry]
-type dlpEntryGetResponseCustomEntryJSON 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
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) {
+type DLPEntryGetResponseObject 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 DLPEntryGetResponseObjectType `json:"type,required"`
+ UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ ProfileID string `json:"profile_id,nullable" format:"uuid"`
+ Profiles []DLPEntryGetResponseObjectProfile `json:"profiles"`
+ UploadStatus DLPEntryGetResponseObjectUploadStatus `json:"upload_status"`
+ JSON dlpEntryGetResponseObjectJSON `json:"-"`
+}
+
+// dlpEntryGetResponseObjectJSON contains the JSON metadata for the struct
+// [DLPEntryGetResponseObject]
+type dlpEntryGetResponseObjectJSON 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
+ Profiles apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryGetResponseObject) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryGetResponseCustomEntryJSON) RawJSON() string {
+func (r dlpEntryGetResponseObjectJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryGetResponseCustomEntry) implementsDLPEntryGetResponse() {}
+func (r DLPEntryGetResponseObject) implementsDLPEntryGetResponse() {}
-type DLPEntryGetResponseCustomEntryType string
+type DLPEntryGetResponseObjectType string
const (
- DLPEntryGetResponseCustomEntryTypeCustom DLPEntryGetResponseCustomEntryType = "custom"
+ DLPEntryGetResponseObjectTypeCustom DLPEntryGetResponseObjectType = "custom"
)
-func (r DLPEntryGetResponseCustomEntryType) IsKnown() bool {
+func (r DLPEntryGetResponseObjectType) IsKnown() bool {
switch r {
- case DLPEntryGetResponseCustomEntryTypeCustom:
+ case DLPEntryGetResponseObjectTypeCustom:
return true
}
return false
}
// 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:"-"`
+type DLPEntryGetResponseObjectProfile struct {
+ ID string `json:"id,required" format:"uuid"`
+ Name string `json:"name,required"`
+ JSON dlpEntryGetResponseObjectProfileJSON `json:"-"`
}
-// dlpEntryGetResponseCustomEntryProfileJSON contains the JSON metadata for the
-// struct [DLPEntryGetResponseCustomEntryProfile]
-type dlpEntryGetResponseCustomEntryProfileJSON struct {
+// dlpEntryGetResponseObjectProfileJSON contains the JSON metadata for the struct
+// [DLPEntryGetResponseObjectProfile]
+type dlpEntryGetResponseObjectProfileJSON struct {
ID apijson.Field
Name apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryGetResponseCustomEntryProfile) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryGetResponseObjectProfile) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryGetResponseCustomEntryProfileJSON) RawJSON() string {
+func (r dlpEntryGetResponseObjectProfileJSON) 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:"-"`
-}
-
-// 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 *DLPEntryGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryGetResponsePredefinedEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryGetResponsePredefinedEntry) implementsDLPEntryGetResponse() {}
-
-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 dlpEntryGetResponsePredefinedEntryConfidenceJSON `json:"-"`
-}
-
-// 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 *DLPEntryGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryGetResponsePredefinedEntryConfidenceJSON) RawJSON() string {
- return r.raw
-}
-
-type DLPEntryGetResponsePredefinedEntryType string
+type DLPEntryGetResponseObjectUploadStatus string
const (
- DLPEntryGetResponsePredefinedEntryTypePredefined DLPEntryGetResponsePredefinedEntryType = "predefined"
+ DLPEntryGetResponseObjectUploadStatusEmpty DLPEntryGetResponseObjectUploadStatus = "empty"
+ DLPEntryGetResponseObjectUploadStatusUploading DLPEntryGetResponseObjectUploadStatus = "uploading"
+ DLPEntryGetResponseObjectUploadStatusPending DLPEntryGetResponseObjectUploadStatus = "pending"
+ DLPEntryGetResponseObjectUploadStatusProcessing DLPEntryGetResponseObjectUploadStatus = "processing"
+ DLPEntryGetResponseObjectUploadStatusFailed DLPEntryGetResponseObjectUploadStatus = "failed"
+ DLPEntryGetResponseObjectUploadStatusComplete DLPEntryGetResponseObjectUploadStatus = "complete"
)
-func (r DLPEntryGetResponsePredefinedEntryType) IsKnown() bool {
+func (r DLPEntryGetResponseObjectUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryGetResponsePredefinedEntryTypePredefined:
+ case DLPEntryGetResponseObjectUploadStatusEmpty, DLPEntryGetResponseObjectUploadStatusUploading, DLPEntryGetResponseObjectUploadStatusPending, DLPEntryGetResponseObjectUploadStatusProcessing, DLPEntryGetResponseObjectUploadStatusFailed, DLPEntryGetResponseObjectUploadStatusComplete:
return true
}
return false
}
-// 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)
-}
-
-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
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryGetResponsePredefinedEntryVariantJSON) RawJSON() string {
- return r.raw
-}
-
-type DLPEntryGetResponsePredefinedEntryVariantTopicType string
-
-const (
- DLPEntryGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryGetResponsePredefinedEntryVariantTopicType = "Intent"
- DLPEntryGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryGetResponsePredefinedEntryVariantTopicType = "Content"
-)
-
-func (r DLPEntryGetResponsePredefinedEntryVariantTopicType) IsKnown() bool {
- switch r {
- case DLPEntryGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryGetResponsePredefinedEntryVariantTopicTypeContent:
- return true
- }
- return false
-}
-
-type DLPEntryGetResponsePredefinedEntryVariantType string
-
-const (
- DLPEntryGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryGetResponsePredefinedEntryVariantType = "PromptTopic"
-)
-
-func (r DLPEntryGetResponsePredefinedEntryVariantType) IsKnown() bool {
- switch r {
- case DLPEntryGetResponsePredefinedEntryVariantTypePromptTopic:
- 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"`
- Profiles []DLPEntryGetResponseIntegrationEntryProfile `json:"profiles"`
- JSON dlpEntryGetResponseIntegrationEntryJSON `json:"-"`
-}
-
-// dlpEntryGetResponseIntegrationEntryJSON contains the JSON metadata for the
-// struct [DLPEntryGetResponseIntegrationEntry]
-type dlpEntryGetResponseIntegrationEntryJSON struct {
- ID apijson.Field
- CreatedAt apijson.Field
- Enabled apijson.Field
- Name apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- ProfileID apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryGetResponseIntegrationEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryGetResponseIntegrationEntry) implementsDLPEntryGetResponse() {}
-
-type DLPEntryGetResponseIntegrationEntryType string
-
-const (
- DLPEntryGetResponseIntegrationEntryTypeIntegration DLPEntryGetResponseIntegrationEntryType = "integration"
-)
-
-func (r DLPEntryGetResponseIntegrationEntryType) IsKnown() bool {
- switch r {
- case DLPEntryGetResponseIntegrationEntryTypeIntegration:
- return true
- }
- return false
-}
-
-// 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 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
- Enabled apijson.Field
- Name apijson.Field
- Secret apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryGetResponseExactDataEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryGetResponseExactDataEntry) implementsDLPEntryGetResponse() {}
-
-type DLPEntryGetResponseExactDataEntryType string
-
-const (
- DLPEntryGetResponseExactDataEntryTypeExactData DLPEntryGetResponseExactDataEntryType = "exact_data"
-)
-
-func (r DLPEntryGetResponseExactDataEntryType) IsKnown() bool {
- switch r {
- case DLPEntryGetResponseExactDataEntryTypeExactData:
- return true
- }
- return false
-}
-
-// 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:"-"`
-}
-
-// 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 *DLPEntryGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryGetResponseDocumentFingerprintEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryGetResponseDocumentFingerprintEntry) implementsDLPEntryGetResponse() {}
-
-type DLPEntryGetResponseDocumentFingerprintEntryType string
-
-const (
- DLPEntryGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryGetResponseDocumentFingerprintEntryType = "document_fingerprint"
-)
-
-func (r DLPEntryGetResponseDocumentFingerprintEntryType) IsKnown() bool {
- switch r {
- case DLPEntryGetResponseDocumentFingerprintEntryTypeDocumentFingerprint:
- return true
- }
- return false
-}
-
-// 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:"-"`
-}
-
-// 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
- Name apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- WordList apijson.Field
- ProfileID apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryGetResponseWordListEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryGetResponseWordListEntry) implementsDLPEntryGetResponse() {}
-
-type DLPEntryGetResponseWordListEntryType string
+type DLPEntryGetResponseType string
const (
- DLPEntryGetResponseWordListEntryTypeWordList DLPEntryGetResponseWordListEntryType = "word_list"
+ DLPEntryGetResponseTypeCustom DLPEntryGetResponseType = "custom"
+ DLPEntryGetResponseTypePredefined DLPEntryGetResponseType = "predefined"
+ DLPEntryGetResponseTypeIntegration DLPEntryGetResponseType = "integration"
+ DLPEntryGetResponseTypeExactData DLPEntryGetResponseType = "exact_data"
+ DLPEntryGetResponseTypeDocumentFingerprint DLPEntryGetResponseType = "document_fingerprint"
+ DLPEntryGetResponseTypeWordList DLPEntryGetResponseType = "word_list"
)
-func (r DLPEntryGetResponseWordListEntryType) IsKnown() bool {
+func (r DLPEntryGetResponseType) IsKnown() bool {
switch r {
- case DLPEntryGetResponseWordListEntryTypeWordList:
+ case DLPEntryGetResponseTypeCustom, DLPEntryGetResponseTypePredefined, DLPEntryGetResponseTypeIntegration, DLPEntryGetResponseTypeExactData, DLPEntryGetResponseTypeDocumentFingerprint, DLPEntryGetResponseTypeWordList:
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
+type DLPEntryGetResponseUploadStatus string
const (
- DLPEntryGetResponseTypeCustom DLPEntryGetResponseType = "custom"
- DLPEntryGetResponseTypePredefined DLPEntryGetResponseType = "predefined"
- DLPEntryGetResponseTypeIntegration DLPEntryGetResponseType = "integration"
- DLPEntryGetResponseTypeExactData DLPEntryGetResponseType = "exact_data"
- DLPEntryGetResponseTypeDocumentFingerprint DLPEntryGetResponseType = "document_fingerprint"
- DLPEntryGetResponseTypeWordList DLPEntryGetResponseType = "word_list"
+ DLPEntryGetResponseUploadStatusEmpty DLPEntryGetResponseUploadStatus = "empty"
+ DLPEntryGetResponseUploadStatusUploading DLPEntryGetResponseUploadStatus = "uploading"
+ DLPEntryGetResponseUploadStatusPending DLPEntryGetResponseUploadStatus = "pending"
+ DLPEntryGetResponseUploadStatusProcessing DLPEntryGetResponseUploadStatus = "processing"
+ DLPEntryGetResponseUploadStatusFailed DLPEntryGetResponseUploadStatus = "failed"
+ DLPEntryGetResponseUploadStatusComplete DLPEntryGetResponseUploadStatus = "complete"
)
-func (r DLPEntryGetResponseType) IsKnown() bool {
+func (r DLPEntryGetResponseUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryGetResponseTypeCustom, DLPEntryGetResponseTypePredefined, DLPEntryGetResponseTypeIntegration, DLPEntryGetResponseTypeExactData, DLPEntryGetResponseTypeDocumentFingerprint, DLPEntryGetResponseTypeWordList:
+ case DLPEntryGetResponseUploadStatusEmpty, DLPEntryGetResponseUploadStatusUploading, DLPEntryGetResponseUploadStatusPending, DLPEntryGetResponseUploadStatusProcessing, DLPEntryGetResponseUploadStatusFailed, DLPEntryGetResponseUploadStatusComplete:
return true
}
return false
diff --git a/zero_trust/dlpentrycustom.go b/zero_trust/dlpentrycustom.go
index 9859a9a5f36..05ba13d3fb6 100644
--- a/zero_trust/dlpentrycustom.go
+++ b/zero_trust/dlpentrycustom.go
@@ -220,15 +220,16 @@ 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
- // [DLPEntryCustomListResponsePredefinedConfidence].
- 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"`
+ // [DLPEntryCustomListResponsePredefinedEntryConfidence].
+ 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"`
+ UploadStatus DLPEntryCustomListResponseUploadStatus `json:"upload_status"`
// This field can have the runtime type of
- // [DLPEntryCustomListResponsePredefinedVariant].
+ // [DLPEntryCustomListResponsePredefinedEntryVariant].
Variant interface{} `json:"variant"`
// This field can have the runtime type of [interface{}].
WordList interface{} `json:"word_list"`
@@ -250,6 +251,7 @@ type dlpEntryCustomListResponseJSON struct {
ProfileID apijson.Field
Secret apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
Variant apijson.Field
WordList apijson.Field
raw string
@@ -272,20 +274,22 @@ 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 [DLPEntryCustomListResponseCustom],
-// [DLPEntryCustomListResponsePredefined], [DLPEntryCustomListResponseIntegration],
-// [DLPEntryCustomListResponseExactData],
-// [DLPEntryCustomListResponseDocumentFingerprint],
-// [DLPEntryCustomListResponseWordList].
+// Possible runtime types of the union are [DLPEntryCustomListResponseCustomEntry],
+// [DLPEntryCustomListResponsePredefinedEntry],
+// [DLPEntryCustomListResponseIntegrationEntry],
+// [DLPEntryCustomListResponseExactDataEntry],
+// [DLPEntryCustomListResponseDocumentFingerprintEntry],
+// [DLPEntryCustomListResponseWordListEntry].
func (r DLPEntryCustomListResponse) AsUnion() DLPEntryCustomListResponseUnion {
return r.union
}
-// Union satisfied by [DLPEntryCustomListResponseCustom],
-// [DLPEntryCustomListResponsePredefined], [DLPEntryCustomListResponseIntegration],
-// [DLPEntryCustomListResponseExactData],
-// [DLPEntryCustomListResponseDocumentFingerprint] or
-// [DLPEntryCustomListResponseWordList].
+// Union satisfied by [DLPEntryCustomListResponseCustomEntry],
+// [DLPEntryCustomListResponsePredefinedEntry],
+// [DLPEntryCustomListResponseIntegrationEntry],
+// [DLPEntryCustomListResponseExactDataEntry],
+// [DLPEntryCustomListResponseDocumentFingerprintEntry] or
+// [DLPEntryCustomListResponseWordListEntry].
type DLPEntryCustomListResponseUnion interface {
implementsDLPEntryCustomListResponse()
}
@@ -293,176 +297,212 @@ type DLPEntryCustomListResponseUnion interface {
func init() {
apijson.RegisterUnion(
reflect.TypeOf((*DLPEntryCustomListResponseUnion)(nil)).Elem(),
- "type",
+ "",
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomListResponseCustom{}),
- DiscriminatorValue: "custom",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryCustomListResponseCustomEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomListResponsePredefined{}),
- DiscriminatorValue: "predefined",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryCustomListResponsePredefinedEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomListResponseIntegration{}),
- DiscriminatorValue: "integration",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryCustomListResponseIntegrationEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomListResponseExactData{}),
- DiscriminatorValue: "exact_data",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryCustomListResponseExactDataEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomListResponseDocumentFingerprint{}),
- DiscriminatorValue: "document_fingerprint",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryCustomListResponseDocumentFingerprintEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomListResponseWordList{}),
- DiscriminatorValue: "word_list",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryCustomListResponseWordListEntry{}),
},
)
}
-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:"-"`
-}
-
-// dlpEntryCustomListResponseCustomJSON contains the JSON metadata for the struct
-// [DLPEntryCustomListResponseCustom]
-type dlpEntryCustomListResponseCustomJSON 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 *DLPEntryCustomListResponseCustom) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryCustomListResponseCustomEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryCustomListResponseCustomEntryJSON `json:"-"`
+}
+
+// dlpEntryCustomListResponseCustomEntryJSON contains the JSON metadata for the
+// struct [DLPEntryCustomListResponseCustomEntry]
+type dlpEntryCustomListResponseCustomEntryJSON 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
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryCustomListResponseCustomEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomListResponseCustomJSON) RawJSON() string {
+func (r dlpEntryCustomListResponseCustomEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryCustomListResponseCustom) implementsDLPEntryCustomListResponse() {}
+func (r DLPEntryCustomListResponseCustomEntry) implementsDLPEntryCustomListResponse() {}
-type DLPEntryCustomListResponseCustomType string
+type DLPEntryCustomListResponseCustomEntryType string
const (
- DLPEntryCustomListResponseCustomTypeCustom DLPEntryCustomListResponseCustomType = "custom"
+ DLPEntryCustomListResponseCustomEntryTypeCustom DLPEntryCustomListResponseCustomEntryType = "custom"
)
-func (r DLPEntryCustomListResponseCustomType) IsKnown() bool {
+func (r DLPEntryCustomListResponseCustomEntryType) IsKnown() bool {
switch r {
- case DLPEntryCustomListResponseCustomTypeCustom:
+ case DLPEntryCustomListResponseCustomEntryTypeCustom:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryCustomListResponseCustomEntryUploadStatus string
-// dlpEntryCustomListResponsePredefinedJSON contains the JSON metadata for the
-// struct [DLPEntryCustomListResponsePredefined]
-type dlpEntryCustomListResponsePredefinedJSON 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
+const (
+ DLPEntryCustomListResponseCustomEntryUploadStatusEmpty DLPEntryCustomListResponseCustomEntryUploadStatus = "empty"
+ DLPEntryCustomListResponseCustomEntryUploadStatusUploading DLPEntryCustomListResponseCustomEntryUploadStatus = "uploading"
+ DLPEntryCustomListResponseCustomEntryUploadStatusPending DLPEntryCustomListResponseCustomEntryUploadStatus = "pending"
+ DLPEntryCustomListResponseCustomEntryUploadStatusProcessing DLPEntryCustomListResponseCustomEntryUploadStatus = "processing"
+ DLPEntryCustomListResponseCustomEntryUploadStatusFailed DLPEntryCustomListResponseCustomEntryUploadStatus = "failed"
+ DLPEntryCustomListResponseCustomEntryUploadStatusComplete DLPEntryCustomListResponseCustomEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryCustomListResponseCustomEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryCustomListResponseCustomEntryUploadStatusEmpty, DLPEntryCustomListResponseCustomEntryUploadStatusUploading, DLPEntryCustomListResponseCustomEntryUploadStatusPending, DLPEntryCustomListResponseCustomEntryUploadStatusProcessing, DLPEntryCustomListResponseCustomEntryUploadStatusFailed, DLPEntryCustomListResponseCustomEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryCustomListResponsePredefined) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryCustomListResponsePredefinedEntryUploadStatus `json:"upload_status"`
+ Variant DLPEntryCustomListResponsePredefinedEntryVariant `json:"variant"`
+ JSON dlpEntryCustomListResponsePredefinedEntryJSON `json:"-"`
+}
+
+// dlpEntryCustomListResponsePredefinedEntryJSON contains the JSON metadata for the
+// struct [DLPEntryCustomListResponsePredefinedEntry]
+type dlpEntryCustomListResponsePredefinedEntryJSON struct {
+ ID apijson.Field
+ Confidence apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ ProfileID apijson.Field
+ UploadStatus apijson.Field
+ Variant apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryCustomListResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomListResponsePredefinedJSON) RawJSON() string {
+func (r dlpEntryCustomListResponsePredefinedEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryCustomListResponsePredefined) implementsDLPEntryCustomListResponse() {}
+func (r DLPEntryCustomListResponsePredefinedEntry) implementsDLPEntryCustomListResponse() {}
-type DLPEntryCustomListResponsePredefinedConfidence struct {
+type DLPEntryCustomListResponsePredefinedEntryConfidence 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 dlpEntryCustomListResponsePredefinedConfidenceJSON `json:"-"`
+ Available bool `json:"available,required"`
+ JSON dlpEntryCustomListResponsePredefinedEntryConfidenceJSON `json:"-"`
}
-// dlpEntryCustomListResponsePredefinedConfidenceJSON contains the JSON metadata
-// for the struct [DLPEntryCustomListResponsePredefinedConfidence]
-type dlpEntryCustomListResponsePredefinedConfidenceJSON struct {
+// dlpEntryCustomListResponsePredefinedEntryConfidenceJSON contains the JSON
+// metadata for the struct [DLPEntryCustomListResponsePredefinedEntryConfidence]
+type dlpEntryCustomListResponsePredefinedEntryConfidenceJSON struct {
AIContextAvailable apijson.Field
Available apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryCustomListResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryCustomListResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomListResponsePredefinedConfidenceJSON) RawJSON() string {
+func (r dlpEntryCustomListResponsePredefinedEntryConfidenceJSON) RawJSON() string {
return r.raw
}
-type DLPEntryCustomListResponsePredefinedType string
+type DLPEntryCustomListResponsePredefinedEntryType string
const (
- DLPEntryCustomListResponsePredefinedTypePredefined DLPEntryCustomListResponsePredefinedType = "predefined"
+ DLPEntryCustomListResponsePredefinedEntryTypePredefined DLPEntryCustomListResponsePredefinedEntryType = "predefined"
)
-func (r DLPEntryCustomListResponsePredefinedType) IsKnown() bool {
+func (r DLPEntryCustomListResponsePredefinedEntryType) IsKnown() bool {
switch r {
- case DLPEntryCustomListResponsePredefinedTypePredefined:
+ case DLPEntryCustomListResponsePredefinedEntryTypePredefined:
return true
}
return false
}
-type DLPEntryCustomListResponsePredefinedVariant struct {
- TopicType DLPEntryCustomListResponsePredefinedVariantTopicType `json:"topic_type,required"`
- Type DLPEntryCustomListResponsePredefinedVariantType `json:"type,required"`
- Description string `json:"description,nullable"`
- JSON dlpEntryCustomListResponsePredefinedVariantJSON `json:"-"`
+type DLPEntryCustomListResponsePredefinedEntryUploadStatus string
+
+const (
+ DLPEntryCustomListResponsePredefinedEntryUploadStatusEmpty DLPEntryCustomListResponsePredefinedEntryUploadStatus = "empty"
+ DLPEntryCustomListResponsePredefinedEntryUploadStatusUploading DLPEntryCustomListResponsePredefinedEntryUploadStatus = "uploading"
+ DLPEntryCustomListResponsePredefinedEntryUploadStatusPending DLPEntryCustomListResponsePredefinedEntryUploadStatus = "pending"
+ DLPEntryCustomListResponsePredefinedEntryUploadStatusProcessing DLPEntryCustomListResponsePredefinedEntryUploadStatus = "processing"
+ DLPEntryCustomListResponsePredefinedEntryUploadStatusFailed DLPEntryCustomListResponsePredefinedEntryUploadStatus = "failed"
+ DLPEntryCustomListResponsePredefinedEntryUploadStatusComplete DLPEntryCustomListResponsePredefinedEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryCustomListResponsePredefinedEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryCustomListResponsePredefinedEntryUploadStatusEmpty, DLPEntryCustomListResponsePredefinedEntryUploadStatusUploading, DLPEntryCustomListResponsePredefinedEntryUploadStatusPending, DLPEntryCustomListResponsePredefinedEntryUploadStatusProcessing, DLPEntryCustomListResponsePredefinedEntryUploadStatusFailed, DLPEntryCustomListResponsePredefinedEntryUploadStatusComplete:
+ 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:"-"`
}
-// dlpEntryCustomListResponsePredefinedVariantJSON contains the JSON metadata for
-// the struct [DLPEntryCustomListResponsePredefinedVariant]
-type dlpEntryCustomListResponsePredefinedVariantJSON struct {
+// dlpEntryCustomListResponsePredefinedEntryVariantJSON contains the JSON metadata
+// for the struct [DLPEntryCustomListResponsePredefinedEntryVariant]
+type dlpEntryCustomListResponsePredefinedEntryVariantJSON struct {
TopicType apijson.Field
Type apijson.Field
Description apijson.Field
@@ -470,109 +510,131 @@ type dlpEntryCustomListResponsePredefinedVariantJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryCustomListResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryCustomListResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomListResponsePredefinedVariantJSON) RawJSON() string {
+func (r dlpEntryCustomListResponsePredefinedEntryVariantJSON) RawJSON() string {
return r.raw
}
-type DLPEntryCustomListResponsePredefinedVariantTopicType string
+type DLPEntryCustomListResponsePredefinedEntryVariantTopicType string
const (
- DLPEntryCustomListResponsePredefinedVariantTopicTypeIntent DLPEntryCustomListResponsePredefinedVariantTopicType = "Intent"
- DLPEntryCustomListResponsePredefinedVariantTopicTypeContent DLPEntryCustomListResponsePredefinedVariantTopicType = "Content"
+ DLPEntryCustomListResponsePredefinedEntryVariantTopicTypeIntent DLPEntryCustomListResponsePredefinedEntryVariantTopicType = "Intent"
+ DLPEntryCustomListResponsePredefinedEntryVariantTopicTypeContent DLPEntryCustomListResponsePredefinedEntryVariantTopicType = "Content"
)
-func (r DLPEntryCustomListResponsePredefinedVariantTopicType) IsKnown() bool {
+func (r DLPEntryCustomListResponsePredefinedEntryVariantTopicType) IsKnown() bool {
switch r {
- case DLPEntryCustomListResponsePredefinedVariantTopicTypeIntent, DLPEntryCustomListResponsePredefinedVariantTopicTypeContent:
+ case DLPEntryCustomListResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryCustomListResponsePredefinedEntryVariantTopicTypeContent:
return true
}
return false
}
-type DLPEntryCustomListResponsePredefinedVariantType string
+type DLPEntryCustomListResponsePredefinedEntryVariantType string
const (
- DLPEntryCustomListResponsePredefinedVariantTypePromptTopic DLPEntryCustomListResponsePredefinedVariantType = "PromptTopic"
+ DLPEntryCustomListResponsePredefinedEntryVariantTypePromptTopic DLPEntryCustomListResponsePredefinedEntryVariantType = "PromptTopic"
)
-func (r DLPEntryCustomListResponsePredefinedVariantType) IsKnown() bool {
+func (r DLPEntryCustomListResponsePredefinedEntryVariantType) IsKnown() bool {
switch r {
- case DLPEntryCustomListResponsePredefinedVariantTypePromptTopic:
+ case DLPEntryCustomListResponsePredefinedEntryVariantTypePromptTopic:
return true
}
return false
}
-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:"-"`
-}
-
-// dlpEntryCustomListResponseIntegrationJSON contains the JSON metadata for the
-// struct [DLPEntryCustomListResponseIntegration]
-type dlpEntryCustomListResponseIntegrationJSON 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 *DLPEntryCustomListResponseIntegration) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryCustomListResponseIntegrationEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryCustomListResponseIntegrationEntryJSON `json:"-"`
+}
+
+// dlpEntryCustomListResponseIntegrationEntryJSON contains the JSON metadata for
+// the struct [DLPEntryCustomListResponseIntegrationEntry]
+type dlpEntryCustomListResponseIntegrationEntryJSON struct {
+ ID apijson.Field
+ CreatedAt apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ UpdatedAt apijson.Field
+ ProfileID apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryCustomListResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomListResponseIntegrationJSON) RawJSON() string {
+func (r dlpEntryCustomListResponseIntegrationEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryCustomListResponseIntegration) implementsDLPEntryCustomListResponse() {}
+func (r DLPEntryCustomListResponseIntegrationEntry) implementsDLPEntryCustomListResponse() {}
+
+type DLPEntryCustomListResponseIntegrationEntryType string
+
+const (
+ DLPEntryCustomListResponseIntegrationEntryTypeIntegration DLPEntryCustomListResponseIntegrationEntryType = "integration"
+)
-type DLPEntryCustomListResponseIntegrationType string
+func (r DLPEntryCustomListResponseIntegrationEntryType) IsKnown() bool {
+ switch r {
+ case DLPEntryCustomListResponseIntegrationEntryTypeIntegration:
+ return true
+ }
+ return false
+}
+
+type DLPEntryCustomListResponseIntegrationEntryUploadStatus string
const (
- DLPEntryCustomListResponseIntegrationTypeIntegration DLPEntryCustomListResponseIntegrationType = "integration"
+ DLPEntryCustomListResponseIntegrationEntryUploadStatusEmpty DLPEntryCustomListResponseIntegrationEntryUploadStatus = "empty"
+ DLPEntryCustomListResponseIntegrationEntryUploadStatusUploading DLPEntryCustomListResponseIntegrationEntryUploadStatus = "uploading"
+ DLPEntryCustomListResponseIntegrationEntryUploadStatusPending DLPEntryCustomListResponseIntegrationEntryUploadStatus = "pending"
+ DLPEntryCustomListResponseIntegrationEntryUploadStatusProcessing DLPEntryCustomListResponseIntegrationEntryUploadStatus = "processing"
+ DLPEntryCustomListResponseIntegrationEntryUploadStatusFailed DLPEntryCustomListResponseIntegrationEntryUploadStatus = "failed"
+ DLPEntryCustomListResponseIntegrationEntryUploadStatusComplete DLPEntryCustomListResponseIntegrationEntryUploadStatus = "complete"
)
-func (r DLPEntryCustomListResponseIntegrationType) IsKnown() bool {
+func (r DLPEntryCustomListResponseIntegrationEntryUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryCustomListResponseIntegrationTypeIntegration:
+ case DLPEntryCustomListResponseIntegrationEntryUploadStatusEmpty, DLPEntryCustomListResponseIntegrationEntryUploadStatusUploading, DLPEntryCustomListResponseIntegrationEntryUploadStatusPending, DLPEntryCustomListResponseIntegrationEntryUploadStatusProcessing, DLPEntryCustomListResponseIntegrationEntryUploadStatusFailed, DLPEntryCustomListResponseIntegrationEntryUploadStatusComplete:
return true
}
return false
}
-type DLPEntryCustomListResponseExactData struct {
+type DLPEntryCustomListResponseExactDataEntry 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 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 {
+ 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"`
+ UploadStatus DLPEntryCustomListResponseExactDataEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryCustomListResponseExactDataEntryJSON `json:"-"`
+}
+
+// dlpEntryCustomListResponseExactDataEntryJSON contains the JSON metadata for the
+// struct [DLPEntryCustomListResponseExactDataEntry]
+type dlpEntryCustomListResponseExactDataEntryJSON struct {
ID apijson.Field
CaseSensitive apijson.Field
CreatedAt apijson.Field
@@ -581,127 +643,189 @@ type dlpEntryCustomListResponseExactDataJSON struct {
Secret apijson.Field
Type apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryCustomListResponseExactData) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryCustomListResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomListResponseExactDataJSON) RawJSON() string {
+func (r dlpEntryCustomListResponseExactDataEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryCustomListResponseExactData) implementsDLPEntryCustomListResponse() {}
+func (r DLPEntryCustomListResponseExactDataEntry) implementsDLPEntryCustomListResponse() {}
-type DLPEntryCustomListResponseExactDataType string
+type DLPEntryCustomListResponseExactDataEntryType string
const (
- DLPEntryCustomListResponseExactDataTypeExactData DLPEntryCustomListResponseExactDataType = "exact_data"
+ DLPEntryCustomListResponseExactDataEntryTypeExactData DLPEntryCustomListResponseExactDataEntryType = "exact_data"
)
-func (r DLPEntryCustomListResponseExactDataType) IsKnown() bool {
+func (r DLPEntryCustomListResponseExactDataEntryType) IsKnown() bool {
switch r {
- case DLPEntryCustomListResponseExactDataTypeExactData:
+ case DLPEntryCustomListResponseExactDataEntryTypeExactData:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryCustomListResponseExactDataEntryUploadStatus string
-// dlpEntryCustomListResponseDocumentFingerprintJSON contains the JSON metadata for
-// the struct [DLPEntryCustomListResponseDocumentFingerprint]
-type dlpEntryCustomListResponseDocumentFingerprintJSON 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
+const (
+ DLPEntryCustomListResponseExactDataEntryUploadStatusEmpty DLPEntryCustomListResponseExactDataEntryUploadStatus = "empty"
+ DLPEntryCustomListResponseExactDataEntryUploadStatusUploading DLPEntryCustomListResponseExactDataEntryUploadStatus = "uploading"
+ DLPEntryCustomListResponseExactDataEntryUploadStatusPending DLPEntryCustomListResponseExactDataEntryUploadStatus = "pending"
+ DLPEntryCustomListResponseExactDataEntryUploadStatusProcessing DLPEntryCustomListResponseExactDataEntryUploadStatus = "processing"
+ DLPEntryCustomListResponseExactDataEntryUploadStatusFailed DLPEntryCustomListResponseExactDataEntryUploadStatus = "failed"
+ DLPEntryCustomListResponseExactDataEntryUploadStatusComplete DLPEntryCustomListResponseExactDataEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryCustomListResponseExactDataEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryCustomListResponseExactDataEntryUploadStatusEmpty, DLPEntryCustomListResponseExactDataEntryUploadStatusUploading, DLPEntryCustomListResponseExactDataEntryUploadStatusPending, DLPEntryCustomListResponseExactDataEntryUploadStatusProcessing, DLPEntryCustomListResponseExactDataEntryUploadStatusFailed, DLPEntryCustomListResponseExactDataEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryCustomListResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryCustomListResponseDocumentFingerprintEntryJSON `json:"-"`
+}
+
+// dlpEntryCustomListResponseDocumentFingerprintEntryJSON contains the JSON
+// metadata for the struct [DLPEntryCustomListResponseDocumentFingerprintEntry]
+type dlpEntryCustomListResponseDocumentFingerprintEntryJSON struct {
+ ID apijson.Field
+ CreatedAt apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ UpdatedAt apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryCustomListResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomListResponseDocumentFingerprintJSON) RawJSON() string {
+func (r dlpEntryCustomListResponseDocumentFingerprintEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryCustomListResponseDocumentFingerprint) implementsDLPEntryCustomListResponse() {}
+func (r DLPEntryCustomListResponseDocumentFingerprintEntry) implementsDLPEntryCustomListResponse() {}
-type DLPEntryCustomListResponseDocumentFingerprintType string
+type DLPEntryCustomListResponseDocumentFingerprintEntryType string
const (
- DLPEntryCustomListResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryCustomListResponseDocumentFingerprintType = "document_fingerprint"
+ DLPEntryCustomListResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryCustomListResponseDocumentFingerprintEntryType = "document_fingerprint"
)
-func (r DLPEntryCustomListResponseDocumentFingerprintType) IsKnown() bool {
+func (r DLPEntryCustomListResponseDocumentFingerprintEntryType) IsKnown() bool {
switch r {
- case DLPEntryCustomListResponseDocumentFingerprintTypeDocumentFingerprint:
+ case DLPEntryCustomListResponseDocumentFingerprintEntryTypeDocumentFingerprint:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatus string
-// dlpEntryCustomListResponseWordListJSON contains the JSON metadata for the struct
-// [DLPEntryCustomListResponseWordList]
-type dlpEntryCustomListResponseWordListJSON 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
+const (
+ DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusEmpty DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatus = "empty"
+ DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusUploading DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatus = "uploading"
+ DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusPending DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatus = "pending"
+ DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusProcessing DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatus = "processing"
+ DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusFailed DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatus = "failed"
+ DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusComplete DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusEmpty, DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusUploading, DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusPending, DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusProcessing, DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusFailed, DLPEntryCustomListResponseDocumentFingerprintEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryCustomListResponseWordList) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryCustomListResponseWordListEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryCustomListResponseWordListEntryJSON `json:"-"`
+}
+
+// dlpEntryCustomListResponseWordListEntryJSON contains the JSON metadata for the
+// struct [DLPEntryCustomListResponseWordListEntry]
+type dlpEntryCustomListResponseWordListEntryJSON 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
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryCustomListResponseWordListEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomListResponseWordListJSON) RawJSON() string {
+func (r dlpEntryCustomListResponseWordListEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryCustomListResponseWordList) implementsDLPEntryCustomListResponse() {}
+func (r DLPEntryCustomListResponseWordListEntry) implementsDLPEntryCustomListResponse() {}
-type DLPEntryCustomListResponseWordListType string
+type DLPEntryCustomListResponseWordListEntryType string
const (
- DLPEntryCustomListResponseWordListTypeWordList DLPEntryCustomListResponseWordListType = "word_list"
+ DLPEntryCustomListResponseWordListEntryTypeWordList DLPEntryCustomListResponseWordListEntryType = "word_list"
)
-func (r DLPEntryCustomListResponseWordListType) IsKnown() bool {
+func (r DLPEntryCustomListResponseWordListEntryType) IsKnown() bool {
switch r {
- case DLPEntryCustomListResponseWordListTypeWordList:
+ case DLPEntryCustomListResponseWordListEntryTypeWordList:
+ return true
+ }
+ return false
+}
+
+type DLPEntryCustomListResponseWordListEntryUploadStatus string
+
+const (
+ DLPEntryCustomListResponseWordListEntryUploadStatusEmpty DLPEntryCustomListResponseWordListEntryUploadStatus = "empty"
+ DLPEntryCustomListResponseWordListEntryUploadStatusUploading DLPEntryCustomListResponseWordListEntryUploadStatus = "uploading"
+ DLPEntryCustomListResponseWordListEntryUploadStatusPending DLPEntryCustomListResponseWordListEntryUploadStatus = "pending"
+ DLPEntryCustomListResponseWordListEntryUploadStatusProcessing DLPEntryCustomListResponseWordListEntryUploadStatus = "processing"
+ DLPEntryCustomListResponseWordListEntryUploadStatusFailed DLPEntryCustomListResponseWordListEntryUploadStatus = "failed"
+ DLPEntryCustomListResponseWordListEntryUploadStatusComplete DLPEntryCustomListResponseWordListEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryCustomListResponseWordListEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryCustomListResponseWordListEntryUploadStatusEmpty, DLPEntryCustomListResponseWordListEntryUploadStatusUploading, DLPEntryCustomListResponseWordListEntryUploadStatusPending, DLPEntryCustomListResponseWordListEntryUploadStatusProcessing, DLPEntryCustomListResponseWordListEntryUploadStatusFailed, DLPEntryCustomListResponseWordListEntryUploadStatusComplete:
return true
}
return false
@@ -726,6 +850,25 @@ func (r DLPEntryCustomListResponseType) IsKnown() bool {
return false
}
+type DLPEntryCustomListResponseUploadStatus string
+
+const (
+ DLPEntryCustomListResponseUploadStatusEmpty DLPEntryCustomListResponseUploadStatus = "empty"
+ DLPEntryCustomListResponseUploadStatusUploading DLPEntryCustomListResponseUploadStatus = "uploading"
+ DLPEntryCustomListResponseUploadStatusPending DLPEntryCustomListResponseUploadStatus = "pending"
+ DLPEntryCustomListResponseUploadStatusProcessing DLPEntryCustomListResponseUploadStatus = "processing"
+ DLPEntryCustomListResponseUploadStatusFailed DLPEntryCustomListResponseUploadStatus = "failed"
+ DLPEntryCustomListResponseUploadStatusComplete DLPEntryCustomListResponseUploadStatus = "complete"
+)
+
+func (r DLPEntryCustomListResponseUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryCustomListResponseUploadStatusEmpty, DLPEntryCustomListResponseUploadStatusUploading, DLPEntryCustomListResponseUploadStatusPending, DLPEntryCustomListResponseUploadStatusProcessing, DLPEntryCustomListResponseUploadStatusFailed, DLPEntryCustomListResponseUploadStatusComplete:
+ return true
+ }
+ return false
+}
+
type DLPEntryCustomDeleteResponse = interface{}
type DLPEntryCustomGetResponse struct {
@@ -737,23 +880,19 @@ 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].
+ // [DLPEntryCustomGetResponseObjectConfidence].
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"`
// This field can have the runtime type of
- // [[]DLPEntryCustomGetResponseCustomEntryProfile],
- // [[]DLPEntryCustomGetResponsePredefinedEntryProfile],
- // [[]DLPEntryCustomGetResponseIntegrationEntryProfile],
- // [[]DLPEntryCustomGetResponseExactDataEntryProfile],
- // [[]DLPEntryCustomGetResponseDocumentFingerprintEntryProfile],
- // [[]DLPEntryCustomGetResponseWordListEntryProfile].
- Profiles interface{} `json:"profiles"`
- Secret bool `json:"secret"`
- UpdatedAt time.Time `json:"updated_at" format:"date-time"`
+ // [[]DLPEntryCustomGetResponseObjectProfile].
+ Profiles interface{} `json:"profiles"`
+ Secret bool `json:"secret"`
+ UpdatedAt time.Time `json:"updated_at" format:"date-time"`
+ UploadStatus DLPEntryCustomGetResponseUploadStatus `json:"upload_status"`
// This field can have the runtime type of
- // [DLPEntryCustomGetResponsePredefinedEntryVariant].
+ // [DLPEntryCustomGetResponseObjectVariant].
Variant interface{} `json:"variant"`
// This field can have the runtime type of [interface{}].
WordList interface{} `json:"word_list"`
@@ -776,6 +915,7 @@ type dlpEntryCustomGetResponseJSON struct {
Profiles apijson.Field
Secret apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
Variant apijson.Field
WordList apijson.Field
raw string
@@ -798,22 +938,18 @@ 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 [DLPEntryCustomGetResponseObject],
+// [DLPEntryCustomGetResponseObject], [DLPEntryCustomGetResponseObject],
+// [DLPEntryCustomGetResponseObject], [DLPEntryCustomGetResponseObject],
+// [DLPEntryCustomGetResponseObject].
func (r DLPEntryCustomGetResponse) AsUnion() DLPEntryCustomGetResponseUnion {
return r.union
}
-// Union satisfied by [DLPEntryCustomGetResponseCustomEntry],
-// [DLPEntryCustomGetResponsePredefinedEntry],
-// [DLPEntryCustomGetResponseIntegrationEntry],
-// [DLPEntryCustomGetResponseExactDataEntry],
-// [DLPEntryCustomGetResponseDocumentFingerprintEntry] or
-// [DLPEntryCustomGetResponseWordListEntry].
+// Union satisfied by [DLPEntryCustomGetResponseObject],
+// [DLPEntryCustomGetResponseObject], [DLPEntryCustomGetResponseObject],
+// [DLPEntryCustomGetResponseObject], [DLPEntryCustomGetResponseObject] or
+// [DLPEntryCustomGetResponseObject].
type DLPEntryCustomGetResponseUnion interface {
implementsDLPEntryCustomGetResponse()
}
@@ -824,582 +960,162 @@ func init() {
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomGetResponseCustomEntry{}),
+ Type: reflect.TypeOf(DLPEntryCustomGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomGetResponsePredefinedEntry{}),
+ Type: reflect.TypeOf(DLPEntryCustomGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomGetResponseIntegrationEntry{}),
+ Type: reflect.TypeOf(DLPEntryCustomGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomGetResponseExactDataEntry{}),
+ Type: reflect.TypeOf(DLPEntryCustomGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomGetResponseDocumentFingerprintEntry{}),
+ Type: reflect.TypeOf(DLPEntryCustomGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryCustomGetResponseWordListEntry{}),
+ Type: reflect.TypeOf(DLPEntryCustomGetResponseObject{}),
},
)
}
-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:"-"`
-}
-
-// dlpEntryCustomGetResponseCustomEntryJSON contains the JSON metadata for the
-// struct [DLPEntryCustomGetResponseCustomEntry]
-type dlpEntryCustomGetResponseCustomEntryJSON 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
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryCustomGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryCustomGetResponseCustomEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryCustomGetResponseCustomEntry) implementsDLPEntryCustomGetResponse() {}
-
-type DLPEntryCustomGetResponseCustomEntryType string
-
-const (
- DLPEntryCustomGetResponseCustomEntryTypeCustom DLPEntryCustomGetResponseCustomEntryType = "custom"
-)
-
-func (r DLPEntryCustomGetResponseCustomEntryType) IsKnown() bool {
- switch r {
- case DLPEntryCustomGetResponseCustomEntryTypeCustom:
- return true
- }
- return false
-}
-
-// 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
-}
-
-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 *DLPEntryCustomGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryCustomGetResponsePredefinedEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryCustomGetResponsePredefinedEntry) implementsDLPEntryCustomGetResponse() {}
-
-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 dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON `json:"-"`
-}
-
-// 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 *DLPEntryCustomGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryCustomGetResponsePredefinedEntryConfidenceJSON) RawJSON() string {
- return r.raw
-}
-
-type DLPEntryCustomGetResponsePredefinedEntryType string
-
-const (
- DLPEntryCustomGetResponsePredefinedEntryTypePredefined DLPEntryCustomGetResponsePredefinedEntryType = "predefined"
-)
-
-func (r DLPEntryCustomGetResponsePredefinedEntryType) IsKnown() bool {
- switch r {
- case DLPEntryCustomGetResponsePredefinedEntryTypePredefined:
- return true
- }
- return false
-}
-
-// 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:"-"`
-}
-
-// 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
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryCustomGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryCustomGetResponsePredefinedEntryVariantJSON) RawJSON() string {
- return r.raw
-}
-
-type DLPEntryCustomGetResponsePredefinedEntryVariantTopicType string
-
-const (
- DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryCustomGetResponsePredefinedEntryVariantTopicType = "Intent"
- DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryCustomGetResponsePredefinedEntryVariantTopicType = "Content"
-)
-
-func (r DLPEntryCustomGetResponsePredefinedEntryVariantTopicType) IsKnown() bool {
- switch r {
- case DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryCustomGetResponsePredefinedEntryVariantTopicTypeContent:
- return true
- }
- return false
-}
-
-type DLPEntryCustomGetResponsePredefinedEntryVariantType string
-
-const (
- DLPEntryCustomGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryCustomGetResponsePredefinedEntryVariantType = "PromptTopic"
-)
-
-func (r DLPEntryCustomGetResponsePredefinedEntryVariantType) IsKnown() bool {
- switch r {
- case DLPEntryCustomGetResponsePredefinedEntryVariantTypePromptTopic:
- 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"`
- Profiles []DLPEntryCustomGetResponseIntegrationEntryProfile `json:"profiles"`
- JSON dlpEntryCustomGetResponseIntegrationEntryJSON `json:"-"`
-}
-
-// dlpEntryCustomGetResponseIntegrationEntryJSON contains the JSON metadata for the
-// struct [DLPEntryCustomGetResponseIntegrationEntry]
-type dlpEntryCustomGetResponseIntegrationEntryJSON struct {
- ID apijson.Field
- CreatedAt apijson.Field
- Enabled apijson.Field
- Name apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- ProfileID apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryCustomGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryCustomGetResponseIntegrationEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryCustomGetResponseIntegrationEntry) implementsDLPEntryCustomGetResponse() {}
-
-type DLPEntryCustomGetResponseIntegrationEntryType string
-
-const (
- DLPEntryCustomGetResponseIntegrationEntryTypeIntegration DLPEntryCustomGetResponseIntegrationEntryType = "integration"
-)
-
-func (r DLPEntryCustomGetResponseIntegrationEntryType) IsKnown() bool {
- switch r {
- case DLPEntryCustomGetResponseIntegrationEntryTypeIntegration:
- return true
- }
- return false
-}
-
-// 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 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
- Enabled apijson.Field
- Name apijson.Field
- Secret apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryCustomGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) {
+type DLPEntryCustomGetResponseObject 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 DLPEntryCustomGetResponseObjectType `json:"type,required"`
+ UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ ProfileID string `json:"profile_id,nullable" format:"uuid"`
+ Profiles []DLPEntryCustomGetResponseObjectProfile `json:"profiles"`
+ UploadStatus DLPEntryCustomGetResponseObjectUploadStatus `json:"upload_status"`
+ JSON dlpEntryCustomGetResponseObjectJSON `json:"-"`
+}
+
+// dlpEntryCustomGetResponseObjectJSON contains the JSON metadata for the struct
+// [DLPEntryCustomGetResponseObject]
+type dlpEntryCustomGetResponseObjectJSON 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
+ Profiles apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryCustomGetResponseObject) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomGetResponseExactDataEntryJSON) RawJSON() string {
+func (r dlpEntryCustomGetResponseObjectJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryCustomGetResponseExactDataEntry) implementsDLPEntryCustomGetResponse() {}
+func (r DLPEntryCustomGetResponseObject) implementsDLPEntryCustomGetResponse() {}
-type DLPEntryCustomGetResponseExactDataEntryType string
+type DLPEntryCustomGetResponseObjectType string
const (
- DLPEntryCustomGetResponseExactDataEntryTypeExactData DLPEntryCustomGetResponseExactDataEntryType = "exact_data"
+ DLPEntryCustomGetResponseObjectTypeCustom DLPEntryCustomGetResponseObjectType = "custom"
)
-func (r DLPEntryCustomGetResponseExactDataEntryType) IsKnown() bool {
+func (r DLPEntryCustomGetResponseObjectType) IsKnown() bool {
switch r {
- case DLPEntryCustomGetResponseExactDataEntryTypeExactData:
+ case DLPEntryCustomGetResponseObjectTypeCustom:
return true
}
return false
}
// 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:"-"`
-}
-
-// 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)
+type DLPEntryCustomGetResponseObjectProfile struct {
+ ID string `json:"id,required" format:"uuid"`
+ Name string `json:"name,required"`
+ JSON dlpEntryCustomGetResponseObjectProfileJSON `json:"-"`
}
-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 {
+// dlpEntryCustomGetResponseObjectProfileJSON contains the JSON metadata for the
+// struct [DLPEntryCustomGetResponseObjectProfile]
+type dlpEntryCustomGetResponseObjectProfileJSON 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 *DLPEntryCustomGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryCustomGetResponseObjectProfile) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryCustomGetResponseDocumentFingerprintEntryJSON) RawJSON() string {
+func (r dlpEntryCustomGetResponseObjectProfileJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryCustomGetResponseDocumentFingerprintEntry) implementsDLPEntryCustomGetResponse() {}
-
-type DLPEntryCustomGetResponseDocumentFingerprintEntryType string
+type DLPEntryCustomGetResponseObjectUploadStatus string
const (
- DLPEntryCustomGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryCustomGetResponseDocumentFingerprintEntryType = "document_fingerprint"
+ DLPEntryCustomGetResponseObjectUploadStatusEmpty DLPEntryCustomGetResponseObjectUploadStatus = "empty"
+ DLPEntryCustomGetResponseObjectUploadStatusUploading DLPEntryCustomGetResponseObjectUploadStatus = "uploading"
+ DLPEntryCustomGetResponseObjectUploadStatusPending DLPEntryCustomGetResponseObjectUploadStatus = "pending"
+ DLPEntryCustomGetResponseObjectUploadStatusProcessing DLPEntryCustomGetResponseObjectUploadStatus = "processing"
+ DLPEntryCustomGetResponseObjectUploadStatusFailed DLPEntryCustomGetResponseObjectUploadStatus = "failed"
+ DLPEntryCustomGetResponseObjectUploadStatusComplete DLPEntryCustomGetResponseObjectUploadStatus = "complete"
)
-func (r DLPEntryCustomGetResponseDocumentFingerprintEntryType) IsKnown() bool {
+func (r DLPEntryCustomGetResponseObjectUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryCustomGetResponseDocumentFingerprintEntryTypeDocumentFingerprint:
+ case DLPEntryCustomGetResponseObjectUploadStatusEmpty, DLPEntryCustomGetResponseObjectUploadStatusUploading, DLPEntryCustomGetResponseObjectUploadStatusPending, DLPEntryCustomGetResponseObjectUploadStatusProcessing, DLPEntryCustomGetResponseObjectUploadStatusFailed, DLPEntryCustomGetResponseObjectUploadStatusComplete:
return true
}
return false
}
-// 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)
-}
-
-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
- Name apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- WordList apijson.Field
- ProfileID apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryCustomGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryCustomGetResponseWordListEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryCustomGetResponseWordListEntry) implementsDLPEntryCustomGetResponse() {}
-
-type DLPEntryCustomGetResponseWordListEntryType string
+type DLPEntryCustomGetResponseType string
const (
- DLPEntryCustomGetResponseWordListEntryTypeWordList DLPEntryCustomGetResponseWordListEntryType = "word_list"
+ DLPEntryCustomGetResponseTypeCustom DLPEntryCustomGetResponseType = "custom"
+ DLPEntryCustomGetResponseTypePredefined DLPEntryCustomGetResponseType = "predefined"
+ DLPEntryCustomGetResponseTypeIntegration DLPEntryCustomGetResponseType = "integration"
+ DLPEntryCustomGetResponseTypeExactData DLPEntryCustomGetResponseType = "exact_data"
+ DLPEntryCustomGetResponseTypeDocumentFingerprint DLPEntryCustomGetResponseType = "document_fingerprint"
+ DLPEntryCustomGetResponseTypeWordList DLPEntryCustomGetResponseType = "word_list"
)
-func (r DLPEntryCustomGetResponseWordListEntryType) IsKnown() bool {
+func (r DLPEntryCustomGetResponseType) IsKnown() bool {
switch r {
- case DLPEntryCustomGetResponseWordListEntryTypeWordList:
+ case DLPEntryCustomGetResponseTypeCustom, DLPEntryCustomGetResponseTypePredefined, DLPEntryCustomGetResponseTypeIntegration, DLPEntryCustomGetResponseTypeExactData, DLPEntryCustomGetResponseTypeDocumentFingerprint, DLPEntryCustomGetResponseTypeWordList:
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
+type DLPEntryCustomGetResponseUploadStatus string
const (
- DLPEntryCustomGetResponseTypeCustom DLPEntryCustomGetResponseType = "custom"
- DLPEntryCustomGetResponseTypePredefined DLPEntryCustomGetResponseType = "predefined"
- DLPEntryCustomGetResponseTypeIntegration DLPEntryCustomGetResponseType = "integration"
- DLPEntryCustomGetResponseTypeExactData DLPEntryCustomGetResponseType = "exact_data"
- DLPEntryCustomGetResponseTypeDocumentFingerprint DLPEntryCustomGetResponseType = "document_fingerprint"
- DLPEntryCustomGetResponseTypeWordList DLPEntryCustomGetResponseType = "word_list"
+ DLPEntryCustomGetResponseUploadStatusEmpty DLPEntryCustomGetResponseUploadStatus = "empty"
+ DLPEntryCustomGetResponseUploadStatusUploading DLPEntryCustomGetResponseUploadStatus = "uploading"
+ DLPEntryCustomGetResponseUploadStatusPending DLPEntryCustomGetResponseUploadStatus = "pending"
+ DLPEntryCustomGetResponseUploadStatusProcessing DLPEntryCustomGetResponseUploadStatus = "processing"
+ DLPEntryCustomGetResponseUploadStatusFailed DLPEntryCustomGetResponseUploadStatus = "failed"
+ DLPEntryCustomGetResponseUploadStatusComplete DLPEntryCustomGetResponseUploadStatus = "complete"
)
-func (r DLPEntryCustomGetResponseType) IsKnown() bool {
+func (r DLPEntryCustomGetResponseUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryCustomGetResponseTypeCustom, DLPEntryCustomGetResponseTypePredefined, DLPEntryCustomGetResponseTypeIntegration, DLPEntryCustomGetResponseTypeExactData, DLPEntryCustomGetResponseTypeDocumentFingerprint, DLPEntryCustomGetResponseTypeWordList:
+ case DLPEntryCustomGetResponseUploadStatusEmpty, DLPEntryCustomGetResponseUploadStatusUploading, DLPEntryCustomGetResponseUploadStatusPending, DLPEntryCustomGetResponseUploadStatusProcessing, DLPEntryCustomGetResponseUploadStatusFailed, DLPEntryCustomGetResponseUploadStatusComplete:
return true
}
return false
diff --git a/zero_trust/dlpentryintegration.go b/zero_trust/dlpentryintegration.go
index 097871193ba..58966000eb4 100644
--- a/zero_trust/dlpentryintegration.go
+++ b/zero_trust/dlpentryintegration.go
@@ -218,15 +218,16 @@ 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
- // [DLPEntryIntegrationListResponsePredefinedConfidence].
- 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"`
+ // [DLPEntryIntegrationListResponsePredefinedEntryConfidence].
+ 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"`
+ UploadStatus DLPEntryIntegrationListResponseUploadStatus `json:"upload_status"`
// This field can have the runtime type of
- // [DLPEntryIntegrationListResponsePredefinedVariant].
+ // [DLPEntryIntegrationListResponsePredefinedEntryVariant].
Variant interface{} `json:"variant"`
// This field can have the runtime type of [interface{}].
WordList interface{} `json:"word_list"`
@@ -248,6 +249,7 @@ type dlpEntryIntegrationListResponseJSON struct {
ProfileID apijson.Field
Secret apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
Variant apijson.Field
WordList apijson.Field
raw string
@@ -270,22 +272,23 @@ 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 [DLPEntryIntegrationListResponseCustom],
-// [DLPEntryIntegrationListResponsePredefined],
-// [DLPEntryIntegrationListResponseIntegration],
-// [DLPEntryIntegrationListResponseExactData],
-// [DLPEntryIntegrationListResponseDocumentFingerprint],
-// [DLPEntryIntegrationListResponseWordList].
+// Possible runtime types of the union are
+// [DLPEntryIntegrationListResponseCustomEntry],
+// [DLPEntryIntegrationListResponsePredefinedEntry],
+// [DLPEntryIntegrationListResponseIntegrationEntry],
+// [DLPEntryIntegrationListResponseExactDataEntry],
+// [DLPEntryIntegrationListResponseDocumentFingerprintEntry],
+// [DLPEntryIntegrationListResponseWordListEntry].
func (r DLPEntryIntegrationListResponse) AsUnion() DLPEntryIntegrationListResponseUnion {
return r.union
}
-// Union satisfied by [DLPEntryIntegrationListResponseCustom],
-// [DLPEntryIntegrationListResponsePredefined],
-// [DLPEntryIntegrationListResponseIntegration],
-// [DLPEntryIntegrationListResponseExactData],
-// [DLPEntryIntegrationListResponseDocumentFingerprint] or
-// [DLPEntryIntegrationListResponseWordList].
+// Union satisfied by [DLPEntryIntegrationListResponseCustomEntry],
+// [DLPEntryIntegrationListResponsePredefinedEntry],
+// [DLPEntryIntegrationListResponseIntegrationEntry],
+// [DLPEntryIntegrationListResponseExactDataEntry],
+// [DLPEntryIntegrationListResponseDocumentFingerprintEntry] or
+// [DLPEntryIntegrationListResponseWordListEntry].
type DLPEntryIntegrationListResponseUnion interface {
implementsDLPEntryIntegrationListResponse()
}
@@ -293,176 +296,213 @@ type DLPEntryIntegrationListResponseUnion interface {
func init() {
apijson.RegisterUnion(
reflect.TypeOf((*DLPEntryIntegrationListResponseUnion)(nil)).Elem(),
- "type",
+ "",
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationListResponseCustom{}),
- DiscriminatorValue: "custom",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryIntegrationListResponseCustomEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationListResponsePredefined{}),
- DiscriminatorValue: "predefined",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryIntegrationListResponsePredefinedEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationListResponseIntegration{}),
- DiscriminatorValue: "integration",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryIntegrationListResponseIntegrationEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationListResponseExactData{}),
- DiscriminatorValue: "exact_data",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryIntegrationListResponseExactDataEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationListResponseDocumentFingerprint{}),
- DiscriminatorValue: "document_fingerprint",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryIntegrationListResponseDocumentFingerprintEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationListResponseWordList{}),
- DiscriminatorValue: "word_list",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryIntegrationListResponseWordListEntry{}),
},
)
}
-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:"-"`
-}
-
-// dlpEntryIntegrationListResponseCustomJSON contains the JSON metadata for the
-// struct [DLPEntryIntegrationListResponseCustom]
-type dlpEntryIntegrationListResponseCustomJSON 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 *DLPEntryIntegrationListResponseCustom) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryIntegrationListResponseCustomEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryIntegrationListResponseCustomEntryJSON `json:"-"`
+}
+
+// dlpEntryIntegrationListResponseCustomEntryJSON contains the JSON metadata for
+// the struct [DLPEntryIntegrationListResponseCustomEntry]
+type dlpEntryIntegrationListResponseCustomEntryJSON 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
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryIntegrationListResponseCustomEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryIntegrationListResponseCustomJSON) RawJSON() string {
+func (r dlpEntryIntegrationListResponseCustomEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryIntegrationListResponseCustom) implementsDLPEntryIntegrationListResponse() {}
+func (r DLPEntryIntegrationListResponseCustomEntry) implementsDLPEntryIntegrationListResponse() {}
-type DLPEntryIntegrationListResponseCustomType string
+type DLPEntryIntegrationListResponseCustomEntryType string
const (
- DLPEntryIntegrationListResponseCustomTypeCustom DLPEntryIntegrationListResponseCustomType = "custom"
+ DLPEntryIntegrationListResponseCustomEntryTypeCustom DLPEntryIntegrationListResponseCustomEntryType = "custom"
)
-func (r DLPEntryIntegrationListResponseCustomType) IsKnown() bool {
+func (r DLPEntryIntegrationListResponseCustomEntryType) IsKnown() bool {
switch r {
- case DLPEntryIntegrationListResponseCustomTypeCustom:
+ case DLPEntryIntegrationListResponseCustomEntryTypeCustom:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryIntegrationListResponseCustomEntryUploadStatus string
-// dlpEntryIntegrationListResponsePredefinedJSON contains the JSON metadata for the
-// struct [DLPEntryIntegrationListResponsePredefined]
-type dlpEntryIntegrationListResponsePredefinedJSON 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
+const (
+ DLPEntryIntegrationListResponseCustomEntryUploadStatusEmpty DLPEntryIntegrationListResponseCustomEntryUploadStatus = "empty"
+ DLPEntryIntegrationListResponseCustomEntryUploadStatusUploading DLPEntryIntegrationListResponseCustomEntryUploadStatus = "uploading"
+ DLPEntryIntegrationListResponseCustomEntryUploadStatusPending DLPEntryIntegrationListResponseCustomEntryUploadStatus = "pending"
+ DLPEntryIntegrationListResponseCustomEntryUploadStatusProcessing DLPEntryIntegrationListResponseCustomEntryUploadStatus = "processing"
+ DLPEntryIntegrationListResponseCustomEntryUploadStatusFailed DLPEntryIntegrationListResponseCustomEntryUploadStatus = "failed"
+ DLPEntryIntegrationListResponseCustomEntryUploadStatusComplete DLPEntryIntegrationListResponseCustomEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryIntegrationListResponseCustomEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryIntegrationListResponseCustomEntryUploadStatusEmpty, DLPEntryIntegrationListResponseCustomEntryUploadStatusUploading, DLPEntryIntegrationListResponseCustomEntryUploadStatusPending, DLPEntryIntegrationListResponseCustomEntryUploadStatusProcessing, DLPEntryIntegrationListResponseCustomEntryUploadStatusFailed, DLPEntryIntegrationListResponseCustomEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryIntegrationListResponsePredefined) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryIntegrationListResponsePredefinedEntryUploadStatus `json:"upload_status"`
+ Variant DLPEntryIntegrationListResponsePredefinedEntryVariant `json:"variant"`
+ JSON dlpEntryIntegrationListResponsePredefinedEntryJSON `json:"-"`
+}
+
+// dlpEntryIntegrationListResponsePredefinedEntryJSON contains the JSON metadata
+// for the struct [DLPEntryIntegrationListResponsePredefinedEntry]
+type dlpEntryIntegrationListResponsePredefinedEntryJSON struct {
+ ID apijson.Field
+ Confidence apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ ProfileID apijson.Field
+ UploadStatus apijson.Field
+ Variant apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryIntegrationListResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryIntegrationListResponsePredefinedJSON) RawJSON() string {
+func (r dlpEntryIntegrationListResponsePredefinedEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryIntegrationListResponsePredefined) implementsDLPEntryIntegrationListResponse() {}
+func (r DLPEntryIntegrationListResponsePredefinedEntry) implementsDLPEntryIntegrationListResponse() {}
-type DLPEntryIntegrationListResponsePredefinedConfidence struct {
+type DLPEntryIntegrationListResponsePredefinedEntryConfidence 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 dlpEntryIntegrationListResponsePredefinedConfidenceJSON `json:"-"`
+ Available bool `json:"available,required"`
+ JSON dlpEntryIntegrationListResponsePredefinedEntryConfidenceJSON `json:"-"`
}
-// dlpEntryIntegrationListResponsePredefinedConfidenceJSON contains the JSON
-// metadata for the struct [DLPEntryIntegrationListResponsePredefinedConfidence]
-type dlpEntryIntegrationListResponsePredefinedConfidenceJSON struct {
+// dlpEntryIntegrationListResponsePredefinedEntryConfidenceJSON contains the JSON
+// metadata for the struct
+// [DLPEntryIntegrationListResponsePredefinedEntryConfidence]
+type dlpEntryIntegrationListResponsePredefinedEntryConfidenceJSON struct {
AIContextAvailable apijson.Field
Available apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryIntegrationListResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryIntegrationListResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryIntegrationListResponsePredefinedConfidenceJSON) RawJSON() string {
+func (r dlpEntryIntegrationListResponsePredefinedEntryConfidenceJSON) RawJSON() string {
return r.raw
}
-type DLPEntryIntegrationListResponsePredefinedType string
+type DLPEntryIntegrationListResponsePredefinedEntryType string
const (
- DLPEntryIntegrationListResponsePredefinedTypePredefined DLPEntryIntegrationListResponsePredefinedType = "predefined"
+ DLPEntryIntegrationListResponsePredefinedEntryTypePredefined DLPEntryIntegrationListResponsePredefinedEntryType = "predefined"
)
-func (r DLPEntryIntegrationListResponsePredefinedType) IsKnown() bool {
+func (r DLPEntryIntegrationListResponsePredefinedEntryType) IsKnown() bool {
switch r {
- case DLPEntryIntegrationListResponsePredefinedTypePredefined:
+ case DLPEntryIntegrationListResponsePredefinedEntryTypePredefined:
return true
}
return false
}
-type DLPEntryIntegrationListResponsePredefinedVariant struct {
- TopicType DLPEntryIntegrationListResponsePredefinedVariantTopicType `json:"topic_type,required"`
- Type DLPEntryIntegrationListResponsePredefinedVariantType `json:"type,required"`
- Description string `json:"description,nullable"`
- JSON dlpEntryIntegrationListResponsePredefinedVariantJSON `json:"-"`
+type DLPEntryIntegrationListResponsePredefinedEntryUploadStatus string
+
+const (
+ DLPEntryIntegrationListResponsePredefinedEntryUploadStatusEmpty DLPEntryIntegrationListResponsePredefinedEntryUploadStatus = "empty"
+ DLPEntryIntegrationListResponsePredefinedEntryUploadStatusUploading DLPEntryIntegrationListResponsePredefinedEntryUploadStatus = "uploading"
+ DLPEntryIntegrationListResponsePredefinedEntryUploadStatusPending DLPEntryIntegrationListResponsePredefinedEntryUploadStatus = "pending"
+ DLPEntryIntegrationListResponsePredefinedEntryUploadStatusProcessing DLPEntryIntegrationListResponsePredefinedEntryUploadStatus = "processing"
+ DLPEntryIntegrationListResponsePredefinedEntryUploadStatusFailed DLPEntryIntegrationListResponsePredefinedEntryUploadStatus = "failed"
+ DLPEntryIntegrationListResponsePredefinedEntryUploadStatusComplete DLPEntryIntegrationListResponsePredefinedEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryIntegrationListResponsePredefinedEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryIntegrationListResponsePredefinedEntryUploadStatusEmpty, DLPEntryIntegrationListResponsePredefinedEntryUploadStatusUploading, DLPEntryIntegrationListResponsePredefinedEntryUploadStatusPending, DLPEntryIntegrationListResponsePredefinedEntryUploadStatusProcessing, DLPEntryIntegrationListResponsePredefinedEntryUploadStatusFailed, DLPEntryIntegrationListResponsePredefinedEntryUploadStatusComplete:
+ 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:"-"`
}
-// dlpEntryIntegrationListResponsePredefinedVariantJSON contains the JSON metadata
-// for the struct [DLPEntryIntegrationListResponsePredefinedVariant]
-type dlpEntryIntegrationListResponsePredefinedVariantJSON struct {
+// dlpEntryIntegrationListResponsePredefinedEntryVariantJSON contains the JSON
+// metadata for the struct [DLPEntryIntegrationListResponsePredefinedEntryVariant]
+type dlpEntryIntegrationListResponsePredefinedEntryVariantJSON struct {
TopicType apijson.Field
Type apijson.Field
Description apijson.Field
@@ -470,109 +510,132 @@ type dlpEntryIntegrationListResponsePredefinedVariantJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryIntegrationListResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryIntegrationListResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryIntegrationListResponsePredefinedVariantJSON) RawJSON() string {
+func (r dlpEntryIntegrationListResponsePredefinedEntryVariantJSON) RawJSON() string {
return r.raw
}
-type DLPEntryIntegrationListResponsePredefinedVariantTopicType string
+type DLPEntryIntegrationListResponsePredefinedEntryVariantTopicType string
const (
- DLPEntryIntegrationListResponsePredefinedVariantTopicTypeIntent DLPEntryIntegrationListResponsePredefinedVariantTopicType = "Intent"
- DLPEntryIntegrationListResponsePredefinedVariantTopicTypeContent DLPEntryIntegrationListResponsePredefinedVariantTopicType = "Content"
+ DLPEntryIntegrationListResponsePredefinedEntryVariantTopicTypeIntent DLPEntryIntegrationListResponsePredefinedEntryVariantTopicType = "Intent"
+ DLPEntryIntegrationListResponsePredefinedEntryVariantTopicTypeContent DLPEntryIntegrationListResponsePredefinedEntryVariantTopicType = "Content"
)
-func (r DLPEntryIntegrationListResponsePredefinedVariantTopicType) IsKnown() bool {
+func (r DLPEntryIntegrationListResponsePredefinedEntryVariantTopicType) IsKnown() bool {
switch r {
- case DLPEntryIntegrationListResponsePredefinedVariantTopicTypeIntent, DLPEntryIntegrationListResponsePredefinedVariantTopicTypeContent:
+ case DLPEntryIntegrationListResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryIntegrationListResponsePredefinedEntryVariantTopicTypeContent:
return true
}
return false
}
-type DLPEntryIntegrationListResponsePredefinedVariantType string
+type DLPEntryIntegrationListResponsePredefinedEntryVariantType string
const (
- DLPEntryIntegrationListResponsePredefinedVariantTypePromptTopic DLPEntryIntegrationListResponsePredefinedVariantType = "PromptTopic"
+ DLPEntryIntegrationListResponsePredefinedEntryVariantTypePromptTopic DLPEntryIntegrationListResponsePredefinedEntryVariantType = "PromptTopic"
)
-func (r DLPEntryIntegrationListResponsePredefinedVariantType) IsKnown() bool {
+func (r DLPEntryIntegrationListResponsePredefinedEntryVariantType) IsKnown() bool {
switch r {
- case DLPEntryIntegrationListResponsePredefinedVariantTypePromptTopic:
+ case DLPEntryIntegrationListResponsePredefinedEntryVariantTypePromptTopic:
return true
}
return false
}
-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:"-"`
+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"`
+ UploadStatus DLPEntryIntegrationListResponseIntegrationEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryIntegrationListResponseIntegrationEntryJSON `json:"-"`
+}
+
+// dlpEntryIntegrationListResponseIntegrationEntryJSON contains the JSON metadata
+// for the struct [DLPEntryIntegrationListResponseIntegrationEntry]
+type dlpEntryIntegrationListResponseIntegrationEntryJSON struct {
+ ID apijson.Field
+ CreatedAt apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ UpdatedAt apijson.Field
+ ProfileID apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryIntegrationListResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
}
-// dlpEntryIntegrationListResponseIntegrationJSON contains the JSON metadata for
-// the struct [DLPEntryIntegrationListResponseIntegration]
-type dlpEntryIntegrationListResponseIntegrationJSON 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 dlpEntryIntegrationListResponseIntegrationEntryJSON) RawJSON() string {
+ return r.raw
}
-func (r *DLPEntryIntegrationListResponseIntegration) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
+func (r DLPEntryIntegrationListResponseIntegrationEntry) implementsDLPEntryIntegrationListResponse() {
}
-func (r dlpEntryIntegrationListResponseIntegrationJSON) RawJSON() string {
- return r.raw
-}
+type DLPEntryIntegrationListResponseIntegrationEntryType string
+
+const (
+ DLPEntryIntegrationListResponseIntegrationEntryTypeIntegration DLPEntryIntegrationListResponseIntegrationEntryType = "integration"
+)
-func (r DLPEntryIntegrationListResponseIntegration) implementsDLPEntryIntegrationListResponse() {}
+func (r DLPEntryIntegrationListResponseIntegrationEntryType) IsKnown() bool {
+ switch r {
+ case DLPEntryIntegrationListResponseIntegrationEntryTypeIntegration:
+ return true
+ }
+ return false
+}
-type DLPEntryIntegrationListResponseIntegrationType string
+type DLPEntryIntegrationListResponseIntegrationEntryUploadStatus string
const (
- DLPEntryIntegrationListResponseIntegrationTypeIntegration DLPEntryIntegrationListResponseIntegrationType = "integration"
+ DLPEntryIntegrationListResponseIntegrationEntryUploadStatusEmpty DLPEntryIntegrationListResponseIntegrationEntryUploadStatus = "empty"
+ DLPEntryIntegrationListResponseIntegrationEntryUploadStatusUploading DLPEntryIntegrationListResponseIntegrationEntryUploadStatus = "uploading"
+ DLPEntryIntegrationListResponseIntegrationEntryUploadStatusPending DLPEntryIntegrationListResponseIntegrationEntryUploadStatus = "pending"
+ DLPEntryIntegrationListResponseIntegrationEntryUploadStatusProcessing DLPEntryIntegrationListResponseIntegrationEntryUploadStatus = "processing"
+ DLPEntryIntegrationListResponseIntegrationEntryUploadStatusFailed DLPEntryIntegrationListResponseIntegrationEntryUploadStatus = "failed"
+ DLPEntryIntegrationListResponseIntegrationEntryUploadStatusComplete DLPEntryIntegrationListResponseIntegrationEntryUploadStatus = "complete"
)
-func (r DLPEntryIntegrationListResponseIntegrationType) IsKnown() bool {
+func (r DLPEntryIntegrationListResponseIntegrationEntryUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryIntegrationListResponseIntegrationTypeIntegration:
+ case DLPEntryIntegrationListResponseIntegrationEntryUploadStatusEmpty, DLPEntryIntegrationListResponseIntegrationEntryUploadStatusUploading, DLPEntryIntegrationListResponseIntegrationEntryUploadStatusPending, DLPEntryIntegrationListResponseIntegrationEntryUploadStatusProcessing, DLPEntryIntegrationListResponseIntegrationEntryUploadStatusFailed, DLPEntryIntegrationListResponseIntegrationEntryUploadStatusComplete:
return true
}
return false
}
-type DLPEntryIntegrationListResponseExactData struct {
+type DLPEntryIntegrationListResponseExactDataEntry 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 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 {
+ 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"`
+ UploadStatus DLPEntryIntegrationListResponseExactDataEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryIntegrationListResponseExactDataEntryJSON `json:"-"`
+}
+
+// dlpEntryIntegrationListResponseExactDataEntryJSON contains the JSON metadata for
+// the struct [DLPEntryIntegrationListResponseExactDataEntry]
+type dlpEntryIntegrationListResponseExactDataEntryJSON struct {
ID apijson.Field
CaseSensitive apijson.Field
CreatedAt apijson.Field
@@ -581,128 +644,191 @@ type dlpEntryIntegrationListResponseExactDataJSON struct {
Secret apijson.Field
Type apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryIntegrationListResponseExactData) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryIntegrationListResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryIntegrationListResponseExactDataJSON) RawJSON() string {
+func (r dlpEntryIntegrationListResponseExactDataEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryIntegrationListResponseExactData) implementsDLPEntryIntegrationListResponse() {}
+func (r DLPEntryIntegrationListResponseExactDataEntry) implementsDLPEntryIntegrationListResponse() {}
-type DLPEntryIntegrationListResponseExactDataType string
+type DLPEntryIntegrationListResponseExactDataEntryType string
const (
- DLPEntryIntegrationListResponseExactDataTypeExactData DLPEntryIntegrationListResponseExactDataType = "exact_data"
+ DLPEntryIntegrationListResponseExactDataEntryTypeExactData DLPEntryIntegrationListResponseExactDataEntryType = "exact_data"
)
-func (r DLPEntryIntegrationListResponseExactDataType) IsKnown() bool {
+func (r DLPEntryIntegrationListResponseExactDataEntryType) IsKnown() bool {
switch r {
- case DLPEntryIntegrationListResponseExactDataTypeExactData:
+ case DLPEntryIntegrationListResponseExactDataEntryTypeExactData:
return true
}
return false
}
-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:"-"`
+type DLPEntryIntegrationListResponseExactDataEntryUploadStatus string
+
+const (
+ DLPEntryIntegrationListResponseExactDataEntryUploadStatusEmpty DLPEntryIntegrationListResponseExactDataEntryUploadStatus = "empty"
+ DLPEntryIntegrationListResponseExactDataEntryUploadStatusUploading DLPEntryIntegrationListResponseExactDataEntryUploadStatus = "uploading"
+ DLPEntryIntegrationListResponseExactDataEntryUploadStatusPending DLPEntryIntegrationListResponseExactDataEntryUploadStatus = "pending"
+ DLPEntryIntegrationListResponseExactDataEntryUploadStatusProcessing DLPEntryIntegrationListResponseExactDataEntryUploadStatus = "processing"
+ DLPEntryIntegrationListResponseExactDataEntryUploadStatusFailed DLPEntryIntegrationListResponseExactDataEntryUploadStatus = "failed"
+ DLPEntryIntegrationListResponseExactDataEntryUploadStatusComplete DLPEntryIntegrationListResponseExactDataEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryIntegrationListResponseExactDataEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryIntegrationListResponseExactDataEntryUploadStatusEmpty, DLPEntryIntegrationListResponseExactDataEntryUploadStatusUploading, DLPEntryIntegrationListResponseExactDataEntryUploadStatusPending, DLPEntryIntegrationListResponseExactDataEntryUploadStatusProcessing, DLPEntryIntegrationListResponseExactDataEntryUploadStatusFailed, DLPEntryIntegrationListResponseExactDataEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-// dlpEntryIntegrationListResponseDocumentFingerprintJSON contains the JSON
-// metadata for the struct [DLPEntryIntegrationListResponseDocumentFingerprint]
-type dlpEntryIntegrationListResponseDocumentFingerprintJSON 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
+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"`
+ UploadStatus DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryIntegrationListResponseDocumentFingerprintEntryJSON `json:"-"`
}
-func (r *DLPEntryIntegrationListResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) {
+// dlpEntryIntegrationListResponseDocumentFingerprintEntryJSON contains the JSON
+// metadata for the struct
+// [DLPEntryIntegrationListResponseDocumentFingerprintEntry]
+type dlpEntryIntegrationListResponseDocumentFingerprintEntryJSON struct {
+ ID apijson.Field
+ CreatedAt apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ UpdatedAt apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryIntegrationListResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryIntegrationListResponseDocumentFingerprintJSON) RawJSON() string {
+func (r dlpEntryIntegrationListResponseDocumentFingerprintEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryIntegrationListResponseDocumentFingerprint) implementsDLPEntryIntegrationListResponse() {
+func (r DLPEntryIntegrationListResponseDocumentFingerprintEntry) implementsDLPEntryIntegrationListResponse() {
}
-type DLPEntryIntegrationListResponseDocumentFingerprintType string
+type DLPEntryIntegrationListResponseDocumentFingerprintEntryType string
const (
- DLPEntryIntegrationListResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryIntegrationListResponseDocumentFingerprintType = "document_fingerprint"
+ DLPEntryIntegrationListResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryIntegrationListResponseDocumentFingerprintEntryType = "document_fingerprint"
)
-func (r DLPEntryIntegrationListResponseDocumentFingerprintType) IsKnown() bool {
+func (r DLPEntryIntegrationListResponseDocumentFingerprintEntryType) IsKnown() bool {
switch r {
- case DLPEntryIntegrationListResponseDocumentFingerprintTypeDocumentFingerprint:
+ case DLPEntryIntegrationListResponseDocumentFingerprintEntryTypeDocumentFingerprint:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatus string
-// dlpEntryIntegrationListResponseWordListJSON contains the JSON metadata for the
-// struct [DLPEntryIntegrationListResponseWordList]
-type dlpEntryIntegrationListResponseWordListJSON 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
+const (
+ DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusEmpty DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatus = "empty"
+ DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusUploading DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatus = "uploading"
+ DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusPending DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatus = "pending"
+ DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusProcessing DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatus = "processing"
+ DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusFailed DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatus = "failed"
+ DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusComplete DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusEmpty, DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusUploading, DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusPending, DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusProcessing, DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusFailed, DLPEntryIntegrationListResponseDocumentFingerprintEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryIntegrationListResponseWordList) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryIntegrationListResponseWordListEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryIntegrationListResponseWordListEntryJSON `json:"-"`
+}
+
+// dlpEntryIntegrationListResponseWordListEntryJSON contains the JSON metadata for
+// the struct [DLPEntryIntegrationListResponseWordListEntry]
+type dlpEntryIntegrationListResponseWordListEntryJSON 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
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryIntegrationListResponseWordListEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryIntegrationListResponseWordListJSON) RawJSON() string {
+func (r dlpEntryIntegrationListResponseWordListEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryIntegrationListResponseWordList) implementsDLPEntryIntegrationListResponse() {}
+func (r DLPEntryIntegrationListResponseWordListEntry) implementsDLPEntryIntegrationListResponse() {}
+
+type DLPEntryIntegrationListResponseWordListEntryType string
+
+const (
+ DLPEntryIntegrationListResponseWordListEntryTypeWordList DLPEntryIntegrationListResponseWordListEntryType = "word_list"
+)
+
+func (r DLPEntryIntegrationListResponseWordListEntryType) IsKnown() bool {
+ switch r {
+ case DLPEntryIntegrationListResponseWordListEntryTypeWordList:
+ return true
+ }
+ return false
+}
-type DLPEntryIntegrationListResponseWordListType string
+type DLPEntryIntegrationListResponseWordListEntryUploadStatus string
const (
- DLPEntryIntegrationListResponseWordListTypeWordList DLPEntryIntegrationListResponseWordListType = "word_list"
+ DLPEntryIntegrationListResponseWordListEntryUploadStatusEmpty DLPEntryIntegrationListResponseWordListEntryUploadStatus = "empty"
+ DLPEntryIntegrationListResponseWordListEntryUploadStatusUploading DLPEntryIntegrationListResponseWordListEntryUploadStatus = "uploading"
+ DLPEntryIntegrationListResponseWordListEntryUploadStatusPending DLPEntryIntegrationListResponseWordListEntryUploadStatus = "pending"
+ DLPEntryIntegrationListResponseWordListEntryUploadStatusProcessing DLPEntryIntegrationListResponseWordListEntryUploadStatus = "processing"
+ DLPEntryIntegrationListResponseWordListEntryUploadStatusFailed DLPEntryIntegrationListResponseWordListEntryUploadStatus = "failed"
+ DLPEntryIntegrationListResponseWordListEntryUploadStatusComplete DLPEntryIntegrationListResponseWordListEntryUploadStatus = "complete"
)
-func (r DLPEntryIntegrationListResponseWordListType) IsKnown() bool {
+func (r DLPEntryIntegrationListResponseWordListEntryUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryIntegrationListResponseWordListTypeWordList:
+ case DLPEntryIntegrationListResponseWordListEntryUploadStatusEmpty, DLPEntryIntegrationListResponseWordListEntryUploadStatusUploading, DLPEntryIntegrationListResponseWordListEntryUploadStatusPending, DLPEntryIntegrationListResponseWordListEntryUploadStatusProcessing, DLPEntryIntegrationListResponseWordListEntryUploadStatusFailed, DLPEntryIntegrationListResponseWordListEntryUploadStatusComplete:
return true
}
return false
@@ -727,6 +853,25 @@ func (r DLPEntryIntegrationListResponseType) IsKnown() bool {
return false
}
+type DLPEntryIntegrationListResponseUploadStatus string
+
+const (
+ DLPEntryIntegrationListResponseUploadStatusEmpty DLPEntryIntegrationListResponseUploadStatus = "empty"
+ DLPEntryIntegrationListResponseUploadStatusUploading DLPEntryIntegrationListResponseUploadStatus = "uploading"
+ DLPEntryIntegrationListResponseUploadStatusPending DLPEntryIntegrationListResponseUploadStatus = "pending"
+ DLPEntryIntegrationListResponseUploadStatusProcessing DLPEntryIntegrationListResponseUploadStatus = "processing"
+ DLPEntryIntegrationListResponseUploadStatusFailed DLPEntryIntegrationListResponseUploadStatus = "failed"
+ DLPEntryIntegrationListResponseUploadStatusComplete DLPEntryIntegrationListResponseUploadStatus = "complete"
+)
+
+func (r DLPEntryIntegrationListResponseUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryIntegrationListResponseUploadStatusEmpty, DLPEntryIntegrationListResponseUploadStatusUploading, DLPEntryIntegrationListResponseUploadStatusPending, DLPEntryIntegrationListResponseUploadStatusProcessing, DLPEntryIntegrationListResponseUploadStatusFailed, DLPEntryIntegrationListResponseUploadStatusComplete:
+ return true
+ }
+ return false
+}
+
type DLPEntryIntegrationDeleteResponse = interface{}
type DLPEntryIntegrationGetResponse struct {
@@ -738,23 +883,19 @@ 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].
+ // [DLPEntryIntegrationGetResponseObjectConfidence].
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"`
// This field can have the runtime type of
- // [[]DLPEntryIntegrationGetResponseCustomEntryProfile],
- // [[]DLPEntryIntegrationGetResponsePredefinedEntryProfile],
- // [[]DLPEntryIntegrationGetResponseIntegrationEntryProfile],
- // [[]DLPEntryIntegrationGetResponseExactDataEntryProfile],
- // [[]DLPEntryIntegrationGetResponseDocumentFingerprintEntryProfile],
- // [[]DLPEntryIntegrationGetResponseWordListEntryProfile].
- Profiles interface{} `json:"profiles"`
- Secret bool `json:"secret"`
- UpdatedAt time.Time `json:"updated_at" format:"date-time"`
+ // [[]DLPEntryIntegrationGetResponseObjectProfile].
+ Profiles interface{} `json:"profiles"`
+ Secret bool `json:"secret"`
+ UpdatedAt time.Time `json:"updated_at" format:"date-time"`
+ UploadStatus DLPEntryIntegrationGetResponseUploadStatus `json:"upload_status"`
// This field can have the runtime type of
- // [DLPEntryIntegrationGetResponsePredefinedEntryVariant].
+ // [DLPEntryIntegrationGetResponseObjectVariant].
Variant interface{} `json:"variant"`
// This field can have the runtime type of [interface{}].
WordList interface{} `json:"word_list"`
@@ -777,6 +918,7 @@ type dlpEntryIntegrationGetResponseJSON struct {
Profiles apijson.Field
Secret apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
Variant apijson.Field
WordList apijson.Field
raw string
@@ -799,23 +941,18 @@ 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 [DLPEntryIntegrationGetResponseObject],
+// [DLPEntryIntegrationGetResponseObject], [DLPEntryIntegrationGetResponseObject],
+// [DLPEntryIntegrationGetResponseObject], [DLPEntryIntegrationGetResponseObject],
+// [DLPEntryIntegrationGetResponseObject].
func (r DLPEntryIntegrationGetResponse) AsUnion() DLPEntryIntegrationGetResponseUnion {
return r.union
}
-// Union satisfied by [DLPEntryIntegrationGetResponseCustomEntry],
-// [DLPEntryIntegrationGetResponsePredefinedEntry],
-// [DLPEntryIntegrationGetResponseIntegrationEntry],
-// [DLPEntryIntegrationGetResponseExactDataEntry],
-// [DLPEntryIntegrationGetResponseDocumentFingerprintEntry] or
-// [DLPEntryIntegrationGetResponseWordListEntry].
+// Union satisfied by [DLPEntryIntegrationGetResponseObject],
+// [DLPEntryIntegrationGetResponseObject], [DLPEntryIntegrationGetResponseObject],
+// [DLPEntryIntegrationGetResponseObject], [DLPEntryIntegrationGetResponseObject]
+// or [DLPEntryIntegrationGetResponseObject].
type DLPEntryIntegrationGetResponseUnion interface {
implementsDLPEntryIntegrationGetResponse()
}
@@ -826,584 +963,162 @@ func init() {
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationGetResponseCustomEntry{}),
+ Type: reflect.TypeOf(DLPEntryIntegrationGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationGetResponsePredefinedEntry{}),
+ Type: reflect.TypeOf(DLPEntryIntegrationGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationGetResponseIntegrationEntry{}),
+ Type: reflect.TypeOf(DLPEntryIntegrationGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationGetResponseExactDataEntry{}),
+ Type: reflect.TypeOf(DLPEntryIntegrationGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationGetResponseDocumentFingerprintEntry{}),
+ Type: reflect.TypeOf(DLPEntryIntegrationGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryIntegrationGetResponseWordListEntry{}),
+ Type: reflect.TypeOf(DLPEntryIntegrationGetResponseObject{}),
},
)
}
-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:"-"`
-}
-
-// dlpEntryIntegrationGetResponseCustomEntryJSON contains the JSON metadata for the
-// struct [DLPEntryIntegrationGetResponseCustomEntry]
-type dlpEntryIntegrationGetResponseCustomEntryJSON 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
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryIntegrationGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) {
+type DLPEntryIntegrationGetResponseObject 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 DLPEntryIntegrationGetResponseObjectType `json:"type,required"`
+ UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ ProfileID string `json:"profile_id,nullable" format:"uuid"`
+ Profiles []DLPEntryIntegrationGetResponseObjectProfile `json:"profiles"`
+ UploadStatus DLPEntryIntegrationGetResponseObjectUploadStatus `json:"upload_status"`
+ JSON dlpEntryIntegrationGetResponseObjectJSON `json:"-"`
+}
+
+// dlpEntryIntegrationGetResponseObjectJSON contains the JSON metadata for the
+// struct [DLPEntryIntegrationGetResponseObject]
+type dlpEntryIntegrationGetResponseObjectJSON 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
+ Profiles apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryIntegrationGetResponseObject) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryIntegrationGetResponseCustomEntryJSON) RawJSON() string {
+func (r dlpEntryIntegrationGetResponseObjectJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryIntegrationGetResponseCustomEntry) implementsDLPEntryIntegrationGetResponse() {}
+func (r DLPEntryIntegrationGetResponseObject) implementsDLPEntryIntegrationGetResponse() {}
-type DLPEntryIntegrationGetResponseCustomEntryType string
+type DLPEntryIntegrationGetResponseObjectType string
const (
- DLPEntryIntegrationGetResponseCustomEntryTypeCustom DLPEntryIntegrationGetResponseCustomEntryType = "custom"
+ DLPEntryIntegrationGetResponseObjectTypeCustom DLPEntryIntegrationGetResponseObjectType = "custom"
)
-func (r DLPEntryIntegrationGetResponseCustomEntryType) IsKnown() bool {
+func (r DLPEntryIntegrationGetResponseObjectType) IsKnown() bool {
switch r {
- case DLPEntryIntegrationGetResponseCustomEntryTypeCustom:
+ case DLPEntryIntegrationGetResponseObjectTypeCustom:
return true
}
return false
}
// 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:"-"`
-}
-
-// 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
+type DLPEntryIntegrationGetResponseObjectProfile struct {
+ ID string `json:"id,required" format:"uuid"`
+ Name string `json:"name,required"`
+ JSON dlpEntryIntegrationGetResponseObjectProfileJSON `json:"-"`
}
-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 {
+// dlpEntryIntegrationGetResponseObjectProfileJSON contains the JSON metadata for
+// the struct [DLPEntryIntegrationGetResponseObjectProfile]
+type dlpEntryIntegrationGetResponseObjectProfileJSON 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 *DLPEntryIntegrationGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryIntegrationGetResponseObjectProfile) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryIntegrationGetResponsePredefinedEntryJSON) RawJSON() string {
+func (r dlpEntryIntegrationGetResponseObjectProfileJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryIntegrationGetResponsePredefinedEntry) implementsDLPEntryIntegrationGetResponse() {}
-
-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 dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON `json:"-"`
-}
-
-// 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 *DLPEntryIntegrationGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryIntegrationGetResponsePredefinedEntryConfidenceJSON) RawJSON() string {
- return r.raw
-}
-
-type DLPEntryIntegrationGetResponsePredefinedEntryType string
+type DLPEntryIntegrationGetResponseObjectUploadStatus string
const (
- DLPEntryIntegrationGetResponsePredefinedEntryTypePredefined DLPEntryIntegrationGetResponsePredefinedEntryType = "predefined"
+ DLPEntryIntegrationGetResponseObjectUploadStatusEmpty DLPEntryIntegrationGetResponseObjectUploadStatus = "empty"
+ DLPEntryIntegrationGetResponseObjectUploadStatusUploading DLPEntryIntegrationGetResponseObjectUploadStatus = "uploading"
+ DLPEntryIntegrationGetResponseObjectUploadStatusPending DLPEntryIntegrationGetResponseObjectUploadStatus = "pending"
+ DLPEntryIntegrationGetResponseObjectUploadStatusProcessing DLPEntryIntegrationGetResponseObjectUploadStatus = "processing"
+ DLPEntryIntegrationGetResponseObjectUploadStatusFailed DLPEntryIntegrationGetResponseObjectUploadStatus = "failed"
+ DLPEntryIntegrationGetResponseObjectUploadStatusComplete DLPEntryIntegrationGetResponseObjectUploadStatus = "complete"
)
-func (r DLPEntryIntegrationGetResponsePredefinedEntryType) IsKnown() bool {
+func (r DLPEntryIntegrationGetResponseObjectUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryIntegrationGetResponsePredefinedEntryTypePredefined:
+ case DLPEntryIntegrationGetResponseObjectUploadStatusEmpty, DLPEntryIntegrationGetResponseObjectUploadStatusUploading, DLPEntryIntegrationGetResponseObjectUploadStatusPending, DLPEntryIntegrationGetResponseObjectUploadStatusProcessing, DLPEntryIntegrationGetResponseObjectUploadStatusFailed, DLPEntryIntegrationGetResponseObjectUploadStatusComplete:
return true
}
return false
}
-// 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:"-"`
-}
-
-// 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
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryIntegrationGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryIntegrationGetResponsePredefinedEntryVariantJSON) RawJSON() string {
- return r.raw
-}
-
-type DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType string
-
-const (
- DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType = "Intent"
- DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType = "Content"
-)
-
-func (r DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicType) IsKnown() bool {
- switch r {
- case DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryIntegrationGetResponsePredefinedEntryVariantTopicTypeContent:
- return true
- }
- return false
-}
-
-type DLPEntryIntegrationGetResponsePredefinedEntryVariantType string
-
-const (
- DLPEntryIntegrationGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryIntegrationGetResponsePredefinedEntryVariantType = "PromptTopic"
-)
-
-func (r DLPEntryIntegrationGetResponsePredefinedEntryVariantType) IsKnown() bool {
- switch r {
- case DLPEntryIntegrationGetResponsePredefinedEntryVariantTypePromptTopic:
- 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"`
- Profiles []DLPEntryIntegrationGetResponseIntegrationEntryProfile `json:"profiles"`
- JSON dlpEntryIntegrationGetResponseIntegrationEntryJSON `json:"-"`
-}
-
-// dlpEntryIntegrationGetResponseIntegrationEntryJSON contains the JSON metadata
-// for the struct [DLPEntryIntegrationGetResponseIntegrationEntry]
-type dlpEntryIntegrationGetResponseIntegrationEntryJSON struct {
- ID apijson.Field
- CreatedAt apijson.Field
- Enabled apijson.Field
- Name apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- ProfileID apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryIntegrationGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryIntegrationGetResponseIntegrationEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryIntegrationGetResponseIntegrationEntry) implementsDLPEntryIntegrationGetResponse() {}
-
-type DLPEntryIntegrationGetResponseIntegrationEntryType string
-
-const (
- DLPEntryIntegrationGetResponseIntegrationEntryTypeIntegration DLPEntryIntegrationGetResponseIntegrationEntryType = "integration"
-)
-
-func (r DLPEntryIntegrationGetResponseIntegrationEntryType) IsKnown() bool {
- switch r {
- case DLPEntryIntegrationGetResponseIntegrationEntryTypeIntegration:
- return true
- }
- return false
-}
-
-// 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 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
- Enabled apijson.Field
- Name apijson.Field
- Secret apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryIntegrationGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryIntegrationGetResponseExactDataEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryIntegrationGetResponseExactDataEntry) implementsDLPEntryIntegrationGetResponse() {}
-
-type DLPEntryIntegrationGetResponseExactDataEntryType string
-
-const (
- DLPEntryIntegrationGetResponseExactDataEntryTypeExactData DLPEntryIntegrationGetResponseExactDataEntryType = "exact_data"
-)
-
-func (r DLPEntryIntegrationGetResponseExactDataEntryType) IsKnown() bool {
- switch r {
- case DLPEntryIntegrationGetResponseExactDataEntryTypeExactData:
- return true
- }
- return false
-}
-
-// 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:"-"`
-}
-
-// 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 *DLPEntryIntegrationGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryIntegrationGetResponseDocumentFingerprintEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryIntegrationGetResponseDocumentFingerprintEntry) implementsDLPEntryIntegrationGetResponse() {
-}
-
-type DLPEntryIntegrationGetResponseDocumentFingerprintEntryType string
-
-const (
- DLPEntryIntegrationGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryIntegrationGetResponseDocumentFingerprintEntryType = "document_fingerprint"
-)
-
-func (r DLPEntryIntegrationGetResponseDocumentFingerprintEntryType) IsKnown() bool {
- switch r {
- case DLPEntryIntegrationGetResponseDocumentFingerprintEntryTypeDocumentFingerprint:
- return true
- }
- return false
-}
-
-// 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)
-}
-
-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
- Name apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- WordList apijson.Field
- ProfileID apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryIntegrationGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryIntegrationGetResponseWordListEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryIntegrationGetResponseWordListEntry) implementsDLPEntryIntegrationGetResponse() {}
-
-type DLPEntryIntegrationGetResponseWordListEntryType string
+type DLPEntryIntegrationGetResponseType string
const (
- DLPEntryIntegrationGetResponseWordListEntryTypeWordList DLPEntryIntegrationGetResponseWordListEntryType = "word_list"
+ DLPEntryIntegrationGetResponseTypeCustom DLPEntryIntegrationGetResponseType = "custom"
+ DLPEntryIntegrationGetResponseTypePredefined DLPEntryIntegrationGetResponseType = "predefined"
+ DLPEntryIntegrationGetResponseTypeIntegration DLPEntryIntegrationGetResponseType = "integration"
+ DLPEntryIntegrationGetResponseTypeExactData DLPEntryIntegrationGetResponseType = "exact_data"
+ DLPEntryIntegrationGetResponseTypeDocumentFingerprint DLPEntryIntegrationGetResponseType = "document_fingerprint"
+ DLPEntryIntegrationGetResponseTypeWordList DLPEntryIntegrationGetResponseType = "word_list"
)
-func (r DLPEntryIntegrationGetResponseWordListEntryType) IsKnown() bool {
+func (r DLPEntryIntegrationGetResponseType) IsKnown() bool {
switch r {
- case DLPEntryIntegrationGetResponseWordListEntryTypeWordList:
+ case DLPEntryIntegrationGetResponseTypeCustom, DLPEntryIntegrationGetResponseTypePredefined, DLPEntryIntegrationGetResponseTypeIntegration, DLPEntryIntegrationGetResponseTypeExactData, DLPEntryIntegrationGetResponseTypeDocumentFingerprint, DLPEntryIntegrationGetResponseTypeWordList:
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
+type DLPEntryIntegrationGetResponseUploadStatus string
const (
- DLPEntryIntegrationGetResponseTypeCustom DLPEntryIntegrationGetResponseType = "custom"
- DLPEntryIntegrationGetResponseTypePredefined DLPEntryIntegrationGetResponseType = "predefined"
- DLPEntryIntegrationGetResponseTypeIntegration DLPEntryIntegrationGetResponseType = "integration"
- DLPEntryIntegrationGetResponseTypeExactData DLPEntryIntegrationGetResponseType = "exact_data"
- DLPEntryIntegrationGetResponseTypeDocumentFingerprint DLPEntryIntegrationGetResponseType = "document_fingerprint"
- DLPEntryIntegrationGetResponseTypeWordList DLPEntryIntegrationGetResponseType = "word_list"
+ DLPEntryIntegrationGetResponseUploadStatusEmpty DLPEntryIntegrationGetResponseUploadStatus = "empty"
+ DLPEntryIntegrationGetResponseUploadStatusUploading DLPEntryIntegrationGetResponseUploadStatus = "uploading"
+ DLPEntryIntegrationGetResponseUploadStatusPending DLPEntryIntegrationGetResponseUploadStatus = "pending"
+ DLPEntryIntegrationGetResponseUploadStatusProcessing DLPEntryIntegrationGetResponseUploadStatus = "processing"
+ DLPEntryIntegrationGetResponseUploadStatusFailed DLPEntryIntegrationGetResponseUploadStatus = "failed"
+ DLPEntryIntegrationGetResponseUploadStatusComplete DLPEntryIntegrationGetResponseUploadStatus = "complete"
)
-func (r DLPEntryIntegrationGetResponseType) IsKnown() bool {
+func (r DLPEntryIntegrationGetResponseUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryIntegrationGetResponseTypeCustom, DLPEntryIntegrationGetResponseTypePredefined, DLPEntryIntegrationGetResponseTypeIntegration, DLPEntryIntegrationGetResponseTypeExactData, DLPEntryIntegrationGetResponseTypeDocumentFingerprint, DLPEntryIntegrationGetResponseTypeWordList:
+ case DLPEntryIntegrationGetResponseUploadStatusEmpty, DLPEntryIntegrationGetResponseUploadStatusUploading, DLPEntryIntegrationGetResponseUploadStatusPending, DLPEntryIntegrationGetResponseUploadStatusProcessing, DLPEntryIntegrationGetResponseUploadStatusFailed, DLPEntryIntegrationGetResponseUploadStatusComplete:
return true
}
return false
diff --git a/zero_trust/dlpentrypredefined.go b/zero_trust/dlpentrypredefined.go
index 6057c9ee929..ed52e253536 100644
--- a/zero_trust/dlpentrypredefined.go
+++ b/zero_trust/dlpentrypredefined.go
@@ -378,15 +378,16 @@ 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
- // [DLPEntryPredefinedListResponsePredefinedConfidence].
- 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"`
+ // [DLPEntryPredefinedListResponsePredefinedEntryConfidence].
+ 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"`
+ UploadStatus DLPEntryPredefinedListResponseUploadStatus `json:"upload_status"`
// This field can have the runtime type of
- // [DLPEntryPredefinedListResponsePredefinedVariant].
+ // [DLPEntryPredefinedListResponsePredefinedEntryVariant].
Variant interface{} `json:"variant"`
// This field can have the runtime type of [interface{}].
WordList interface{} `json:"word_list"`
@@ -408,6 +409,7 @@ type dlpEntryPredefinedListResponseJSON struct {
ProfileID apijson.Field
Secret apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
Variant apijson.Field
WordList apijson.Field
raw string
@@ -430,22 +432,23 @@ 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 [DLPEntryPredefinedListResponseCustom],
-// [DLPEntryPredefinedListResponsePredefined],
-// [DLPEntryPredefinedListResponseIntegration],
-// [DLPEntryPredefinedListResponseExactData],
-// [DLPEntryPredefinedListResponseDocumentFingerprint],
-// [DLPEntryPredefinedListResponseWordList].
+// Possible runtime types of the union are
+// [DLPEntryPredefinedListResponseCustomEntry],
+// [DLPEntryPredefinedListResponsePredefinedEntry],
+// [DLPEntryPredefinedListResponseIntegrationEntry],
+// [DLPEntryPredefinedListResponseExactDataEntry],
+// [DLPEntryPredefinedListResponseDocumentFingerprintEntry],
+// [DLPEntryPredefinedListResponseWordListEntry].
func (r DLPEntryPredefinedListResponse) AsUnion() DLPEntryPredefinedListResponseUnion {
return r.union
}
-// Union satisfied by [DLPEntryPredefinedListResponseCustom],
-// [DLPEntryPredefinedListResponsePredefined],
-// [DLPEntryPredefinedListResponseIntegration],
-// [DLPEntryPredefinedListResponseExactData],
-// [DLPEntryPredefinedListResponseDocumentFingerprint] or
-// [DLPEntryPredefinedListResponseWordList].
+// Union satisfied by [DLPEntryPredefinedListResponseCustomEntry],
+// [DLPEntryPredefinedListResponsePredefinedEntry],
+// [DLPEntryPredefinedListResponseIntegrationEntry],
+// [DLPEntryPredefinedListResponseExactDataEntry],
+// [DLPEntryPredefinedListResponseDocumentFingerprintEntry] or
+// [DLPEntryPredefinedListResponseWordListEntry].
type DLPEntryPredefinedListResponseUnion interface {
implementsDLPEntryPredefinedListResponse()
}
@@ -453,176 +456,213 @@ type DLPEntryPredefinedListResponseUnion interface {
func init() {
apijson.RegisterUnion(
reflect.TypeOf((*DLPEntryPredefinedListResponseUnion)(nil)).Elem(),
- "type",
+ "",
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedListResponseCustom{}),
- DiscriminatorValue: "custom",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryPredefinedListResponseCustomEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedListResponsePredefined{}),
- DiscriminatorValue: "predefined",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryPredefinedListResponsePredefinedEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedListResponseIntegration{}),
- DiscriminatorValue: "integration",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryPredefinedListResponseIntegrationEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedListResponseExactData{}),
- DiscriminatorValue: "exact_data",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryPredefinedListResponseExactDataEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedListResponseDocumentFingerprint{}),
- DiscriminatorValue: "document_fingerprint",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryPredefinedListResponseDocumentFingerprintEntry{}),
},
apijson.UnionVariant{
- TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedListResponseWordList{}),
- DiscriminatorValue: "word_list",
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DLPEntryPredefinedListResponseWordListEntry{}),
},
)
}
-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:"-"`
-}
-
-// dlpEntryPredefinedListResponseCustomJSON contains the JSON metadata for the
-// struct [DLPEntryPredefinedListResponseCustom]
-type dlpEntryPredefinedListResponseCustomJSON 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 *DLPEntryPredefinedListResponseCustom) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryPredefinedListResponseCustomEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryPredefinedListResponseCustomEntryJSON `json:"-"`
+}
+
+// dlpEntryPredefinedListResponseCustomEntryJSON contains the JSON metadata for the
+// struct [DLPEntryPredefinedListResponseCustomEntry]
+type dlpEntryPredefinedListResponseCustomEntryJSON 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
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryPredefinedListResponseCustomEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedListResponseCustomJSON) RawJSON() string {
+func (r dlpEntryPredefinedListResponseCustomEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryPredefinedListResponseCustom) implementsDLPEntryPredefinedListResponse() {}
+func (r DLPEntryPredefinedListResponseCustomEntry) implementsDLPEntryPredefinedListResponse() {}
-type DLPEntryPredefinedListResponseCustomType string
+type DLPEntryPredefinedListResponseCustomEntryType string
const (
- DLPEntryPredefinedListResponseCustomTypeCustom DLPEntryPredefinedListResponseCustomType = "custom"
+ DLPEntryPredefinedListResponseCustomEntryTypeCustom DLPEntryPredefinedListResponseCustomEntryType = "custom"
)
-func (r DLPEntryPredefinedListResponseCustomType) IsKnown() bool {
+func (r DLPEntryPredefinedListResponseCustomEntryType) IsKnown() bool {
switch r {
- case DLPEntryPredefinedListResponseCustomTypeCustom:
+ case DLPEntryPredefinedListResponseCustomEntryTypeCustom:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryPredefinedListResponseCustomEntryUploadStatus string
-// dlpEntryPredefinedListResponsePredefinedJSON contains the JSON metadata for the
-// struct [DLPEntryPredefinedListResponsePredefined]
-type dlpEntryPredefinedListResponsePredefinedJSON 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
+const (
+ DLPEntryPredefinedListResponseCustomEntryUploadStatusEmpty DLPEntryPredefinedListResponseCustomEntryUploadStatus = "empty"
+ DLPEntryPredefinedListResponseCustomEntryUploadStatusUploading DLPEntryPredefinedListResponseCustomEntryUploadStatus = "uploading"
+ DLPEntryPredefinedListResponseCustomEntryUploadStatusPending DLPEntryPredefinedListResponseCustomEntryUploadStatus = "pending"
+ DLPEntryPredefinedListResponseCustomEntryUploadStatusProcessing DLPEntryPredefinedListResponseCustomEntryUploadStatus = "processing"
+ DLPEntryPredefinedListResponseCustomEntryUploadStatusFailed DLPEntryPredefinedListResponseCustomEntryUploadStatus = "failed"
+ DLPEntryPredefinedListResponseCustomEntryUploadStatusComplete DLPEntryPredefinedListResponseCustomEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryPredefinedListResponseCustomEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryPredefinedListResponseCustomEntryUploadStatusEmpty, DLPEntryPredefinedListResponseCustomEntryUploadStatusUploading, DLPEntryPredefinedListResponseCustomEntryUploadStatusPending, DLPEntryPredefinedListResponseCustomEntryUploadStatusProcessing, DLPEntryPredefinedListResponseCustomEntryUploadStatusFailed, DLPEntryPredefinedListResponseCustomEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryPredefinedListResponsePredefined) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryPredefinedListResponsePredefinedEntryUploadStatus `json:"upload_status"`
+ Variant DLPEntryPredefinedListResponsePredefinedEntryVariant `json:"variant"`
+ JSON dlpEntryPredefinedListResponsePredefinedEntryJSON `json:"-"`
+}
+
+// dlpEntryPredefinedListResponsePredefinedEntryJSON contains the JSON metadata for
+// the struct [DLPEntryPredefinedListResponsePredefinedEntry]
+type dlpEntryPredefinedListResponsePredefinedEntryJSON struct {
+ ID apijson.Field
+ Confidence apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ ProfileID apijson.Field
+ UploadStatus apijson.Field
+ Variant apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryPredefinedListResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedListResponsePredefinedJSON) RawJSON() string {
+func (r dlpEntryPredefinedListResponsePredefinedEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryPredefinedListResponsePredefined) implementsDLPEntryPredefinedListResponse() {}
+func (r DLPEntryPredefinedListResponsePredefinedEntry) implementsDLPEntryPredefinedListResponse() {}
-type DLPEntryPredefinedListResponsePredefinedConfidence struct {
+type DLPEntryPredefinedListResponsePredefinedEntryConfidence 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 dlpEntryPredefinedListResponsePredefinedConfidenceJSON `json:"-"`
+ Available bool `json:"available,required"`
+ JSON dlpEntryPredefinedListResponsePredefinedEntryConfidenceJSON `json:"-"`
}
-// dlpEntryPredefinedListResponsePredefinedConfidenceJSON contains the JSON
-// metadata for the struct [DLPEntryPredefinedListResponsePredefinedConfidence]
-type dlpEntryPredefinedListResponsePredefinedConfidenceJSON struct {
+// dlpEntryPredefinedListResponsePredefinedEntryConfidenceJSON contains the JSON
+// metadata for the struct
+// [DLPEntryPredefinedListResponsePredefinedEntryConfidence]
+type dlpEntryPredefinedListResponsePredefinedEntryConfidenceJSON struct {
AIContextAvailable apijson.Field
Available apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryPredefinedListResponsePredefinedConfidence) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryPredefinedListResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedListResponsePredefinedConfidenceJSON) RawJSON() string {
+func (r dlpEntryPredefinedListResponsePredefinedEntryConfidenceJSON) RawJSON() string {
return r.raw
}
-type DLPEntryPredefinedListResponsePredefinedType string
+type DLPEntryPredefinedListResponsePredefinedEntryType string
+
+const (
+ DLPEntryPredefinedListResponsePredefinedEntryTypePredefined DLPEntryPredefinedListResponsePredefinedEntryType = "predefined"
+)
+
+func (r DLPEntryPredefinedListResponsePredefinedEntryType) IsKnown() bool {
+ switch r {
+ case DLPEntryPredefinedListResponsePredefinedEntryTypePredefined:
+ return true
+ }
+ return false
+}
+
+type DLPEntryPredefinedListResponsePredefinedEntryUploadStatus string
const (
- DLPEntryPredefinedListResponsePredefinedTypePredefined DLPEntryPredefinedListResponsePredefinedType = "predefined"
+ DLPEntryPredefinedListResponsePredefinedEntryUploadStatusEmpty DLPEntryPredefinedListResponsePredefinedEntryUploadStatus = "empty"
+ DLPEntryPredefinedListResponsePredefinedEntryUploadStatusUploading DLPEntryPredefinedListResponsePredefinedEntryUploadStatus = "uploading"
+ DLPEntryPredefinedListResponsePredefinedEntryUploadStatusPending DLPEntryPredefinedListResponsePredefinedEntryUploadStatus = "pending"
+ DLPEntryPredefinedListResponsePredefinedEntryUploadStatusProcessing DLPEntryPredefinedListResponsePredefinedEntryUploadStatus = "processing"
+ DLPEntryPredefinedListResponsePredefinedEntryUploadStatusFailed DLPEntryPredefinedListResponsePredefinedEntryUploadStatus = "failed"
+ DLPEntryPredefinedListResponsePredefinedEntryUploadStatusComplete DLPEntryPredefinedListResponsePredefinedEntryUploadStatus = "complete"
)
-func (r DLPEntryPredefinedListResponsePredefinedType) IsKnown() bool {
+func (r DLPEntryPredefinedListResponsePredefinedEntryUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryPredefinedListResponsePredefinedTypePredefined:
+ case DLPEntryPredefinedListResponsePredefinedEntryUploadStatusEmpty, DLPEntryPredefinedListResponsePredefinedEntryUploadStatusUploading, DLPEntryPredefinedListResponsePredefinedEntryUploadStatusPending, DLPEntryPredefinedListResponsePredefinedEntryUploadStatusProcessing, DLPEntryPredefinedListResponsePredefinedEntryUploadStatusFailed, DLPEntryPredefinedListResponsePredefinedEntryUploadStatusComplete:
return true
}
return false
}
-type DLPEntryPredefinedListResponsePredefinedVariant struct {
- TopicType DLPEntryPredefinedListResponsePredefinedVariantTopicType `json:"topic_type,required"`
- Type DLPEntryPredefinedListResponsePredefinedVariantType `json:"type,required"`
- Description string `json:"description,nullable"`
- JSON dlpEntryPredefinedListResponsePredefinedVariantJSON `json:"-"`
+type DLPEntryPredefinedListResponsePredefinedEntryVariant struct {
+ TopicType DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType `json:"topic_type,required"`
+ Type DLPEntryPredefinedListResponsePredefinedEntryVariantType `json:"type,required"`
+ Description string `json:"description,nullable"`
+ JSON dlpEntryPredefinedListResponsePredefinedEntryVariantJSON `json:"-"`
}
-// dlpEntryPredefinedListResponsePredefinedVariantJSON contains the JSON metadata
-// for the struct [DLPEntryPredefinedListResponsePredefinedVariant]
-type dlpEntryPredefinedListResponsePredefinedVariantJSON struct {
+// dlpEntryPredefinedListResponsePredefinedEntryVariantJSON contains the JSON
+// metadata for the struct [DLPEntryPredefinedListResponsePredefinedEntryVariant]
+type dlpEntryPredefinedListResponsePredefinedEntryVariantJSON struct {
TopicType apijson.Field
Type apijson.Field
Description apijson.Field
@@ -630,109 +670,131 @@ type dlpEntryPredefinedListResponsePredefinedVariantJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryPredefinedListResponsePredefinedVariant) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryPredefinedListResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedListResponsePredefinedVariantJSON) RawJSON() string {
+func (r dlpEntryPredefinedListResponsePredefinedEntryVariantJSON) RawJSON() string {
return r.raw
}
-type DLPEntryPredefinedListResponsePredefinedVariantTopicType string
+type DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType string
const (
- DLPEntryPredefinedListResponsePredefinedVariantTopicTypeIntent DLPEntryPredefinedListResponsePredefinedVariantTopicType = "Intent"
- DLPEntryPredefinedListResponsePredefinedVariantTopicTypeContent DLPEntryPredefinedListResponsePredefinedVariantTopicType = "Content"
+ DLPEntryPredefinedListResponsePredefinedEntryVariantTopicTypeIntent DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType = "Intent"
+ DLPEntryPredefinedListResponsePredefinedEntryVariantTopicTypeContent DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType = "Content"
)
-func (r DLPEntryPredefinedListResponsePredefinedVariantTopicType) IsKnown() bool {
+func (r DLPEntryPredefinedListResponsePredefinedEntryVariantTopicType) IsKnown() bool {
switch r {
- case DLPEntryPredefinedListResponsePredefinedVariantTopicTypeIntent, DLPEntryPredefinedListResponsePredefinedVariantTopicTypeContent:
+ case DLPEntryPredefinedListResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryPredefinedListResponsePredefinedEntryVariantTopicTypeContent:
return true
}
return false
}
-type DLPEntryPredefinedListResponsePredefinedVariantType string
+type DLPEntryPredefinedListResponsePredefinedEntryVariantType string
const (
- DLPEntryPredefinedListResponsePredefinedVariantTypePromptTopic DLPEntryPredefinedListResponsePredefinedVariantType = "PromptTopic"
+ DLPEntryPredefinedListResponsePredefinedEntryVariantTypePromptTopic DLPEntryPredefinedListResponsePredefinedEntryVariantType = "PromptTopic"
)
-func (r DLPEntryPredefinedListResponsePredefinedVariantType) IsKnown() bool {
+func (r DLPEntryPredefinedListResponsePredefinedEntryVariantType) IsKnown() bool {
switch r {
- case DLPEntryPredefinedListResponsePredefinedVariantTypePromptTopic:
+ case DLPEntryPredefinedListResponsePredefinedEntryVariantTypePromptTopic:
return true
}
return false
}
-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:"-"`
-}
-
-// dlpEntryPredefinedListResponseIntegrationJSON contains the JSON metadata for the
-// struct [DLPEntryPredefinedListResponseIntegration]
-type dlpEntryPredefinedListResponseIntegrationJSON 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 *DLPEntryPredefinedListResponseIntegration) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryPredefinedListResponseIntegrationEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryPredefinedListResponseIntegrationEntryJSON `json:"-"`
+}
+
+// dlpEntryPredefinedListResponseIntegrationEntryJSON contains the JSON metadata
+// for the struct [DLPEntryPredefinedListResponseIntegrationEntry]
+type dlpEntryPredefinedListResponseIntegrationEntryJSON struct {
+ ID apijson.Field
+ CreatedAt apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ UpdatedAt apijson.Field
+ ProfileID apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryPredefinedListResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedListResponseIntegrationJSON) RawJSON() string {
+func (r dlpEntryPredefinedListResponseIntegrationEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryPredefinedListResponseIntegration) implementsDLPEntryPredefinedListResponse() {}
+func (r DLPEntryPredefinedListResponseIntegrationEntry) implementsDLPEntryPredefinedListResponse() {}
+
+type DLPEntryPredefinedListResponseIntegrationEntryType string
+
+const (
+ DLPEntryPredefinedListResponseIntegrationEntryTypeIntegration DLPEntryPredefinedListResponseIntegrationEntryType = "integration"
+)
+
+func (r DLPEntryPredefinedListResponseIntegrationEntryType) IsKnown() bool {
+ switch r {
+ case DLPEntryPredefinedListResponseIntegrationEntryTypeIntegration:
+ return true
+ }
+ return false
+}
-type DLPEntryPredefinedListResponseIntegrationType string
+type DLPEntryPredefinedListResponseIntegrationEntryUploadStatus string
const (
- DLPEntryPredefinedListResponseIntegrationTypeIntegration DLPEntryPredefinedListResponseIntegrationType = "integration"
+ DLPEntryPredefinedListResponseIntegrationEntryUploadStatusEmpty DLPEntryPredefinedListResponseIntegrationEntryUploadStatus = "empty"
+ DLPEntryPredefinedListResponseIntegrationEntryUploadStatusUploading DLPEntryPredefinedListResponseIntegrationEntryUploadStatus = "uploading"
+ DLPEntryPredefinedListResponseIntegrationEntryUploadStatusPending DLPEntryPredefinedListResponseIntegrationEntryUploadStatus = "pending"
+ DLPEntryPredefinedListResponseIntegrationEntryUploadStatusProcessing DLPEntryPredefinedListResponseIntegrationEntryUploadStatus = "processing"
+ DLPEntryPredefinedListResponseIntegrationEntryUploadStatusFailed DLPEntryPredefinedListResponseIntegrationEntryUploadStatus = "failed"
+ DLPEntryPredefinedListResponseIntegrationEntryUploadStatusComplete DLPEntryPredefinedListResponseIntegrationEntryUploadStatus = "complete"
)
-func (r DLPEntryPredefinedListResponseIntegrationType) IsKnown() bool {
+func (r DLPEntryPredefinedListResponseIntegrationEntryUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryPredefinedListResponseIntegrationTypeIntegration:
+ case DLPEntryPredefinedListResponseIntegrationEntryUploadStatusEmpty, DLPEntryPredefinedListResponseIntegrationEntryUploadStatusUploading, DLPEntryPredefinedListResponseIntegrationEntryUploadStatusPending, DLPEntryPredefinedListResponseIntegrationEntryUploadStatusProcessing, DLPEntryPredefinedListResponseIntegrationEntryUploadStatusFailed, DLPEntryPredefinedListResponseIntegrationEntryUploadStatusComplete:
return true
}
return false
}
-type DLPEntryPredefinedListResponseExactData struct {
+type DLPEntryPredefinedListResponseExactDataEntry 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 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 {
+ 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"`
+ UploadStatus DLPEntryPredefinedListResponseExactDataEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryPredefinedListResponseExactDataEntryJSON `json:"-"`
+}
+
+// dlpEntryPredefinedListResponseExactDataEntryJSON contains the JSON metadata for
+// the struct [DLPEntryPredefinedListResponseExactDataEntry]
+type dlpEntryPredefinedListResponseExactDataEntryJSON struct {
ID apijson.Field
CaseSensitive apijson.Field
CreatedAt apijson.Field
@@ -741,128 +803,190 @@ type dlpEntryPredefinedListResponseExactDataJSON struct {
Secret apijson.Field
Type apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryPredefinedListResponseExactData) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryPredefinedListResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedListResponseExactDataJSON) RawJSON() string {
+func (r dlpEntryPredefinedListResponseExactDataEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryPredefinedListResponseExactData) implementsDLPEntryPredefinedListResponse() {}
+func (r DLPEntryPredefinedListResponseExactDataEntry) implementsDLPEntryPredefinedListResponse() {}
-type DLPEntryPredefinedListResponseExactDataType string
+type DLPEntryPredefinedListResponseExactDataEntryType string
const (
- DLPEntryPredefinedListResponseExactDataTypeExactData DLPEntryPredefinedListResponseExactDataType = "exact_data"
+ DLPEntryPredefinedListResponseExactDataEntryTypeExactData DLPEntryPredefinedListResponseExactDataEntryType = "exact_data"
)
-func (r DLPEntryPredefinedListResponseExactDataType) IsKnown() bool {
+func (r DLPEntryPredefinedListResponseExactDataEntryType) IsKnown() bool {
switch r {
- case DLPEntryPredefinedListResponseExactDataTypeExactData:
+ case DLPEntryPredefinedListResponseExactDataEntryTypeExactData:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryPredefinedListResponseExactDataEntryUploadStatus string
-// dlpEntryPredefinedListResponseDocumentFingerprintJSON contains the JSON metadata
-// for the struct [DLPEntryPredefinedListResponseDocumentFingerprint]
-type dlpEntryPredefinedListResponseDocumentFingerprintJSON 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
+const (
+ DLPEntryPredefinedListResponseExactDataEntryUploadStatusEmpty DLPEntryPredefinedListResponseExactDataEntryUploadStatus = "empty"
+ DLPEntryPredefinedListResponseExactDataEntryUploadStatusUploading DLPEntryPredefinedListResponseExactDataEntryUploadStatus = "uploading"
+ DLPEntryPredefinedListResponseExactDataEntryUploadStatusPending DLPEntryPredefinedListResponseExactDataEntryUploadStatus = "pending"
+ DLPEntryPredefinedListResponseExactDataEntryUploadStatusProcessing DLPEntryPredefinedListResponseExactDataEntryUploadStatus = "processing"
+ DLPEntryPredefinedListResponseExactDataEntryUploadStatusFailed DLPEntryPredefinedListResponseExactDataEntryUploadStatus = "failed"
+ DLPEntryPredefinedListResponseExactDataEntryUploadStatusComplete DLPEntryPredefinedListResponseExactDataEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryPredefinedListResponseExactDataEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryPredefinedListResponseExactDataEntryUploadStatusEmpty, DLPEntryPredefinedListResponseExactDataEntryUploadStatusUploading, DLPEntryPredefinedListResponseExactDataEntryUploadStatusPending, DLPEntryPredefinedListResponseExactDataEntryUploadStatusProcessing, DLPEntryPredefinedListResponseExactDataEntryUploadStatusFailed, DLPEntryPredefinedListResponseExactDataEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryPredefinedListResponseDocumentFingerprint) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryPredefinedListResponseDocumentFingerprintEntryJSON `json:"-"`
+}
+
+// dlpEntryPredefinedListResponseDocumentFingerprintEntryJSON contains the JSON
+// metadata for the struct [DLPEntryPredefinedListResponseDocumentFingerprintEntry]
+type dlpEntryPredefinedListResponseDocumentFingerprintEntryJSON struct {
+ ID apijson.Field
+ CreatedAt apijson.Field
+ Enabled apijson.Field
+ Name apijson.Field
+ Type apijson.Field
+ UpdatedAt apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryPredefinedListResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedListResponseDocumentFingerprintJSON) RawJSON() string {
+func (r dlpEntryPredefinedListResponseDocumentFingerprintEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryPredefinedListResponseDocumentFingerprint) implementsDLPEntryPredefinedListResponse() {
+func (r DLPEntryPredefinedListResponseDocumentFingerprintEntry) implementsDLPEntryPredefinedListResponse() {
}
-type DLPEntryPredefinedListResponseDocumentFingerprintType string
+type DLPEntryPredefinedListResponseDocumentFingerprintEntryType string
const (
- DLPEntryPredefinedListResponseDocumentFingerprintTypeDocumentFingerprint DLPEntryPredefinedListResponseDocumentFingerprintType = "document_fingerprint"
+ DLPEntryPredefinedListResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryPredefinedListResponseDocumentFingerprintEntryType = "document_fingerprint"
)
-func (r DLPEntryPredefinedListResponseDocumentFingerprintType) IsKnown() bool {
+func (r DLPEntryPredefinedListResponseDocumentFingerprintEntryType) IsKnown() bool {
switch r {
- case DLPEntryPredefinedListResponseDocumentFingerprintTypeDocumentFingerprint:
+ case DLPEntryPredefinedListResponseDocumentFingerprintEntryTypeDocumentFingerprint:
return true
}
return false
}
-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:"-"`
-}
+type DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatus string
-// dlpEntryPredefinedListResponseWordListJSON contains the JSON metadata for the
-// struct [DLPEntryPredefinedListResponseWordList]
-type dlpEntryPredefinedListResponseWordListJSON 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
+const (
+ DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusEmpty DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatus = "empty"
+ DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusUploading DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatus = "uploading"
+ DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusPending DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatus = "pending"
+ DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusProcessing DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatus = "processing"
+ DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusFailed DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatus = "failed"
+ DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusComplete DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusEmpty, DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusUploading, DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusPending, DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusProcessing, DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusFailed, DLPEntryPredefinedListResponseDocumentFingerprintEntryUploadStatusComplete:
+ return true
+ }
+ return false
}
-func (r *DLPEntryPredefinedListResponseWordList) UnmarshalJSON(data []byte) (err error) {
+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"`
+ UploadStatus DLPEntryPredefinedListResponseWordListEntryUploadStatus `json:"upload_status"`
+ JSON dlpEntryPredefinedListResponseWordListEntryJSON `json:"-"`
+}
+
+// dlpEntryPredefinedListResponseWordListEntryJSON contains the JSON metadata for
+// the struct [DLPEntryPredefinedListResponseWordListEntry]
+type dlpEntryPredefinedListResponseWordListEntryJSON 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
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryPredefinedListResponseWordListEntry) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedListResponseWordListJSON) RawJSON() string {
+func (r dlpEntryPredefinedListResponseWordListEntryJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryPredefinedListResponseWordList) implementsDLPEntryPredefinedListResponse() {}
+func (r DLPEntryPredefinedListResponseWordListEntry) implementsDLPEntryPredefinedListResponse() {}
-type DLPEntryPredefinedListResponseWordListType string
+type DLPEntryPredefinedListResponseWordListEntryType string
const (
- DLPEntryPredefinedListResponseWordListTypeWordList DLPEntryPredefinedListResponseWordListType = "word_list"
+ DLPEntryPredefinedListResponseWordListEntryTypeWordList DLPEntryPredefinedListResponseWordListEntryType = "word_list"
)
-func (r DLPEntryPredefinedListResponseWordListType) IsKnown() bool {
+func (r DLPEntryPredefinedListResponseWordListEntryType) IsKnown() bool {
switch r {
- case DLPEntryPredefinedListResponseWordListTypeWordList:
+ case DLPEntryPredefinedListResponseWordListEntryTypeWordList:
+ return true
+ }
+ return false
+}
+
+type DLPEntryPredefinedListResponseWordListEntryUploadStatus string
+
+const (
+ DLPEntryPredefinedListResponseWordListEntryUploadStatusEmpty DLPEntryPredefinedListResponseWordListEntryUploadStatus = "empty"
+ DLPEntryPredefinedListResponseWordListEntryUploadStatusUploading DLPEntryPredefinedListResponseWordListEntryUploadStatus = "uploading"
+ DLPEntryPredefinedListResponseWordListEntryUploadStatusPending DLPEntryPredefinedListResponseWordListEntryUploadStatus = "pending"
+ DLPEntryPredefinedListResponseWordListEntryUploadStatusProcessing DLPEntryPredefinedListResponseWordListEntryUploadStatus = "processing"
+ DLPEntryPredefinedListResponseWordListEntryUploadStatusFailed DLPEntryPredefinedListResponseWordListEntryUploadStatus = "failed"
+ DLPEntryPredefinedListResponseWordListEntryUploadStatusComplete DLPEntryPredefinedListResponseWordListEntryUploadStatus = "complete"
+)
+
+func (r DLPEntryPredefinedListResponseWordListEntryUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryPredefinedListResponseWordListEntryUploadStatusEmpty, DLPEntryPredefinedListResponseWordListEntryUploadStatusUploading, DLPEntryPredefinedListResponseWordListEntryUploadStatusPending, DLPEntryPredefinedListResponseWordListEntryUploadStatusProcessing, DLPEntryPredefinedListResponseWordListEntryUploadStatusFailed, DLPEntryPredefinedListResponseWordListEntryUploadStatusComplete:
return true
}
return false
@@ -887,6 +1011,25 @@ func (r DLPEntryPredefinedListResponseType) IsKnown() bool {
return false
}
+type DLPEntryPredefinedListResponseUploadStatus string
+
+const (
+ DLPEntryPredefinedListResponseUploadStatusEmpty DLPEntryPredefinedListResponseUploadStatus = "empty"
+ DLPEntryPredefinedListResponseUploadStatusUploading DLPEntryPredefinedListResponseUploadStatus = "uploading"
+ DLPEntryPredefinedListResponseUploadStatusPending DLPEntryPredefinedListResponseUploadStatus = "pending"
+ DLPEntryPredefinedListResponseUploadStatusProcessing DLPEntryPredefinedListResponseUploadStatus = "processing"
+ DLPEntryPredefinedListResponseUploadStatusFailed DLPEntryPredefinedListResponseUploadStatus = "failed"
+ DLPEntryPredefinedListResponseUploadStatusComplete DLPEntryPredefinedListResponseUploadStatus = "complete"
+)
+
+func (r DLPEntryPredefinedListResponseUploadStatus) IsKnown() bool {
+ switch r {
+ case DLPEntryPredefinedListResponseUploadStatusEmpty, DLPEntryPredefinedListResponseUploadStatusUploading, DLPEntryPredefinedListResponseUploadStatusPending, DLPEntryPredefinedListResponseUploadStatusProcessing, DLPEntryPredefinedListResponseUploadStatusFailed, DLPEntryPredefinedListResponseUploadStatusComplete:
+ return true
+ }
+ return false
+}
+
type DLPEntryPredefinedDeleteResponse = interface{}
type DLPEntryPredefinedGetResponse struct {
@@ -898,23 +1041,19 @@ 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].
+ // [DLPEntryPredefinedGetResponseObjectConfidence].
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"`
// This field can have the runtime type of
- // [[]DLPEntryPredefinedGetResponseCustomEntryProfile],
- // [[]DLPEntryPredefinedGetResponsePredefinedEntryProfile],
- // [[]DLPEntryPredefinedGetResponseIntegrationEntryProfile],
- // [[]DLPEntryPredefinedGetResponseExactDataEntryProfile],
- // [[]DLPEntryPredefinedGetResponseDocumentFingerprintEntryProfile],
- // [[]DLPEntryPredefinedGetResponseWordListEntryProfile].
- Profiles interface{} `json:"profiles"`
- Secret bool `json:"secret"`
- UpdatedAt time.Time `json:"updated_at" format:"date-time"`
+ // [[]DLPEntryPredefinedGetResponseObjectProfile].
+ Profiles interface{} `json:"profiles"`
+ Secret bool `json:"secret"`
+ UpdatedAt time.Time `json:"updated_at" format:"date-time"`
+ UploadStatus DLPEntryPredefinedGetResponseUploadStatus `json:"upload_status"`
// This field can have the runtime type of
- // [DLPEntryPredefinedGetResponsePredefinedEntryVariant].
+ // [DLPEntryPredefinedGetResponseObjectVariant].
Variant interface{} `json:"variant"`
// This field can have the runtime type of [interface{}].
WordList interface{} `json:"word_list"`
@@ -937,6 +1076,7 @@ type dlpEntryPredefinedGetResponseJSON struct {
Profiles apijson.Field
Secret apijson.Field
UpdatedAt apijson.Field
+ UploadStatus apijson.Field
Variant apijson.Field
WordList apijson.Field
raw string
@@ -959,23 +1099,18 @@ 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 [DLPEntryPredefinedGetResponseObject],
+// [DLPEntryPredefinedGetResponseObject], [DLPEntryPredefinedGetResponseObject],
+// [DLPEntryPredefinedGetResponseObject], [DLPEntryPredefinedGetResponseObject],
+// [DLPEntryPredefinedGetResponseObject].
func (r DLPEntryPredefinedGetResponse) AsUnion() DLPEntryPredefinedGetResponseUnion {
return r.union
}
-// Union satisfied by [DLPEntryPredefinedGetResponseCustomEntry],
-// [DLPEntryPredefinedGetResponsePredefinedEntry],
-// [DLPEntryPredefinedGetResponseIntegrationEntry],
-// [DLPEntryPredefinedGetResponseExactDataEntry],
-// [DLPEntryPredefinedGetResponseDocumentFingerprintEntry] or
-// [DLPEntryPredefinedGetResponseWordListEntry].
+// Union satisfied by [DLPEntryPredefinedGetResponseObject],
+// [DLPEntryPredefinedGetResponseObject], [DLPEntryPredefinedGetResponseObject],
+// [DLPEntryPredefinedGetResponseObject], [DLPEntryPredefinedGetResponseObject] or
+// [DLPEntryPredefinedGetResponseObject].
type DLPEntryPredefinedGetResponseUnion interface {
implementsDLPEntryPredefinedGetResponse()
}
@@ -986,583 +1121,162 @@ func init() {
"",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedGetResponseCustomEntry{}),
+ Type: reflect.TypeOf(DLPEntryPredefinedGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedGetResponsePredefinedEntry{}),
+ Type: reflect.TypeOf(DLPEntryPredefinedGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedGetResponseIntegrationEntry{}),
+ Type: reflect.TypeOf(DLPEntryPredefinedGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedGetResponseExactDataEntry{}),
+ Type: reflect.TypeOf(DLPEntryPredefinedGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedGetResponseDocumentFingerprintEntry{}),
+ Type: reflect.TypeOf(DLPEntryPredefinedGetResponseObject{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
- Type: reflect.TypeOf(DLPEntryPredefinedGetResponseWordListEntry{}),
+ Type: reflect.TypeOf(DLPEntryPredefinedGetResponseObject{}),
},
)
}
-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:"-"`
-}
-
-// dlpEntryPredefinedGetResponseCustomEntryJSON contains the JSON metadata for the
-// struct [DLPEntryPredefinedGetResponseCustomEntry]
-type dlpEntryPredefinedGetResponseCustomEntryJSON 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
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryPredefinedGetResponseCustomEntry) UnmarshalJSON(data []byte) (err error) {
+type DLPEntryPredefinedGetResponseObject 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 DLPEntryPredefinedGetResponseObjectType `json:"type,required"`
+ UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
+ ProfileID string `json:"profile_id,nullable" format:"uuid"`
+ Profiles []DLPEntryPredefinedGetResponseObjectProfile `json:"profiles"`
+ UploadStatus DLPEntryPredefinedGetResponseObjectUploadStatus `json:"upload_status"`
+ JSON dlpEntryPredefinedGetResponseObjectJSON `json:"-"`
+}
+
+// dlpEntryPredefinedGetResponseObjectJSON contains the JSON metadata for the
+// struct [DLPEntryPredefinedGetResponseObject]
+type dlpEntryPredefinedGetResponseObjectJSON 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
+ Profiles apijson.Field
+ UploadStatus apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *DLPEntryPredefinedGetResponseObject) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedGetResponseCustomEntryJSON) RawJSON() string {
+func (r dlpEntryPredefinedGetResponseObjectJSON) RawJSON() string {
return r.raw
}
-func (r DLPEntryPredefinedGetResponseCustomEntry) implementsDLPEntryPredefinedGetResponse() {}
+func (r DLPEntryPredefinedGetResponseObject) implementsDLPEntryPredefinedGetResponse() {}
-type DLPEntryPredefinedGetResponseCustomEntryType string
+type DLPEntryPredefinedGetResponseObjectType string
const (
- DLPEntryPredefinedGetResponseCustomEntryTypeCustom DLPEntryPredefinedGetResponseCustomEntryType = "custom"
+ DLPEntryPredefinedGetResponseObjectTypeCustom DLPEntryPredefinedGetResponseObjectType = "custom"
)
-func (r DLPEntryPredefinedGetResponseCustomEntryType) IsKnown() bool {
+func (r DLPEntryPredefinedGetResponseObjectType) IsKnown() bool {
switch r {
- case DLPEntryPredefinedGetResponseCustomEntryTypeCustom:
+ case DLPEntryPredefinedGetResponseObjectTypeCustom:
return true
}
return false
}
// 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:"-"`
+type DLPEntryPredefinedGetResponseObjectProfile struct {
+ ID string `json:"id,required" format:"uuid"`
+ Name string `json:"name,required"`
+ JSON dlpEntryPredefinedGetResponseObjectProfileJSON `json:"-"`
}
-// dlpEntryPredefinedGetResponseCustomEntryProfileJSON contains the JSON metadata
-// for the struct [DLPEntryPredefinedGetResponseCustomEntryProfile]
-type dlpEntryPredefinedGetResponseCustomEntryProfileJSON struct {
+// dlpEntryPredefinedGetResponseObjectProfileJSON contains the JSON metadata for
+// the struct [DLPEntryPredefinedGetResponseObjectProfile]
+type dlpEntryPredefinedGetResponseObjectProfileJSON struct {
ID apijson.Field
Name apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *DLPEntryPredefinedGetResponseCustomEntryProfile) UnmarshalJSON(data []byte) (err error) {
+func (r *DLPEntryPredefinedGetResponseObjectProfile) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r dlpEntryPredefinedGetResponseCustomEntryProfileJSON) RawJSON() string {
+func (r dlpEntryPredefinedGetResponseObjectProfileJSON) 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 *DLPEntryPredefinedGetResponsePredefinedEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryPredefinedGetResponsePredefinedEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryPredefinedGetResponsePredefinedEntry) implementsDLPEntryPredefinedGetResponse() {}
-
-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 dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON `json:"-"`
-}
-
-// 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 *DLPEntryPredefinedGetResponsePredefinedEntryConfidence) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryPredefinedGetResponsePredefinedEntryConfidenceJSON) RawJSON() string {
- return r.raw
-}
-
-type DLPEntryPredefinedGetResponsePredefinedEntryType string
+type DLPEntryPredefinedGetResponseObjectUploadStatus string
const (
- DLPEntryPredefinedGetResponsePredefinedEntryTypePredefined DLPEntryPredefinedGetResponsePredefinedEntryType = "predefined"
+ DLPEntryPredefinedGetResponseObjectUploadStatusEmpty DLPEntryPredefinedGetResponseObjectUploadStatus = "empty"
+ DLPEntryPredefinedGetResponseObjectUploadStatusUploading DLPEntryPredefinedGetResponseObjectUploadStatus = "uploading"
+ DLPEntryPredefinedGetResponseObjectUploadStatusPending DLPEntryPredefinedGetResponseObjectUploadStatus = "pending"
+ DLPEntryPredefinedGetResponseObjectUploadStatusProcessing DLPEntryPredefinedGetResponseObjectUploadStatus = "processing"
+ DLPEntryPredefinedGetResponseObjectUploadStatusFailed DLPEntryPredefinedGetResponseObjectUploadStatus = "failed"
+ DLPEntryPredefinedGetResponseObjectUploadStatusComplete DLPEntryPredefinedGetResponseObjectUploadStatus = "complete"
)
-func (r DLPEntryPredefinedGetResponsePredefinedEntryType) IsKnown() bool {
+func (r DLPEntryPredefinedGetResponseObjectUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryPredefinedGetResponsePredefinedEntryTypePredefined:
+ case DLPEntryPredefinedGetResponseObjectUploadStatusEmpty, DLPEntryPredefinedGetResponseObjectUploadStatusUploading, DLPEntryPredefinedGetResponseObjectUploadStatusPending, DLPEntryPredefinedGetResponseObjectUploadStatusProcessing, DLPEntryPredefinedGetResponseObjectUploadStatusFailed, DLPEntryPredefinedGetResponseObjectUploadStatusComplete:
return true
}
return false
}
-// 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)
-}
-
-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
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryPredefinedGetResponsePredefinedEntryVariant) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryPredefinedGetResponsePredefinedEntryVariantJSON) RawJSON() string {
- return r.raw
-}
-
-type DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType string
-
-const (
- DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeIntent DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType = "Intent"
- DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeContent DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType = "Content"
-)
-
-func (r DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicType) IsKnown() bool {
- switch r {
- case DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeIntent, DLPEntryPredefinedGetResponsePredefinedEntryVariantTopicTypeContent:
- return true
- }
- return false
-}
-
-type DLPEntryPredefinedGetResponsePredefinedEntryVariantType string
-
-const (
- DLPEntryPredefinedGetResponsePredefinedEntryVariantTypePromptTopic DLPEntryPredefinedGetResponsePredefinedEntryVariantType = "PromptTopic"
-)
-
-func (r DLPEntryPredefinedGetResponsePredefinedEntryVariantType) IsKnown() bool {
- switch r {
- case DLPEntryPredefinedGetResponsePredefinedEntryVariantTypePromptTopic:
- 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"`
- Profiles []DLPEntryPredefinedGetResponseIntegrationEntryProfile `json:"profiles"`
- JSON dlpEntryPredefinedGetResponseIntegrationEntryJSON `json:"-"`
-}
-
-// dlpEntryPredefinedGetResponseIntegrationEntryJSON contains the JSON metadata for
-// the struct [DLPEntryPredefinedGetResponseIntegrationEntry]
-type dlpEntryPredefinedGetResponseIntegrationEntryJSON struct {
- ID apijson.Field
- CreatedAt apijson.Field
- Enabled apijson.Field
- Name apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- ProfileID apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryPredefinedGetResponseIntegrationEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryPredefinedGetResponseIntegrationEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryPredefinedGetResponseIntegrationEntry) implementsDLPEntryPredefinedGetResponse() {}
-
-type DLPEntryPredefinedGetResponseIntegrationEntryType string
-
-const (
- DLPEntryPredefinedGetResponseIntegrationEntryTypeIntegration DLPEntryPredefinedGetResponseIntegrationEntryType = "integration"
-)
-
-func (r DLPEntryPredefinedGetResponseIntegrationEntryType) IsKnown() bool {
- switch r {
- case DLPEntryPredefinedGetResponseIntegrationEntryTypeIntegration:
- return true
- }
- return false
-}
-
-// 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 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
- Enabled apijson.Field
- Name apijson.Field
- Secret apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryPredefinedGetResponseExactDataEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryPredefinedGetResponseExactDataEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryPredefinedGetResponseExactDataEntry) implementsDLPEntryPredefinedGetResponse() {}
-
-type DLPEntryPredefinedGetResponseExactDataEntryType string
-
-const (
- DLPEntryPredefinedGetResponseExactDataEntryTypeExactData DLPEntryPredefinedGetResponseExactDataEntryType = "exact_data"
-)
-
-func (r DLPEntryPredefinedGetResponseExactDataEntryType) IsKnown() bool {
- switch r {
- case DLPEntryPredefinedGetResponseExactDataEntryTypeExactData:
- return true
- }
- return false
-}
-
-// 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:"-"`
-}
-
-// 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 *DLPEntryPredefinedGetResponseDocumentFingerprintEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryPredefinedGetResponseDocumentFingerprintEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryPredefinedGetResponseDocumentFingerprintEntry) implementsDLPEntryPredefinedGetResponse() {
-}
-
-type DLPEntryPredefinedGetResponseDocumentFingerprintEntryType string
-
-const (
- DLPEntryPredefinedGetResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryPredefinedGetResponseDocumentFingerprintEntryType = "document_fingerprint"
-)
-
-func (r DLPEntryPredefinedGetResponseDocumentFingerprintEntryType) IsKnown() bool {
- switch r {
- case DLPEntryPredefinedGetResponseDocumentFingerprintEntryTypeDocumentFingerprint:
- return true
- }
- return false
-}
-
-// 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)
-}
-
-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
- Name apijson.Field
- Type apijson.Field
- UpdatedAt apijson.Field
- WordList apijson.Field
- ProfileID apijson.Field
- Profiles apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DLPEntryPredefinedGetResponseWordListEntry) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r dlpEntryPredefinedGetResponseWordListEntryJSON) RawJSON() string {
- return r.raw
-}
-
-func (r DLPEntryPredefinedGetResponseWordListEntry) implementsDLPEntryPredefinedGetResponse() {}
-
-type DLPEntryPredefinedGetResponseWordListEntryType string
+type DLPEntryPredefinedGetResponseType string
const (
- DLPEntryPredefinedGetResponseWordListEntryTypeWordList DLPEntryPredefinedGetResponseWordListEntryType = "word_list"
+ DLPEntryPredefinedGetResponseTypeCustom DLPEntryPredefinedGetResponseType = "custom"
+ DLPEntryPredefinedGetResponseTypePredefined DLPEntryPredefinedGetResponseType = "predefined"
+ DLPEntryPredefinedGetResponseTypeIntegration DLPEntryPredefinedGetResponseType = "integration"
+ DLPEntryPredefinedGetResponseTypeExactData DLPEntryPredefinedGetResponseType = "exact_data"
+ DLPEntryPredefinedGetResponseTypeDocumentFingerprint DLPEntryPredefinedGetResponseType = "document_fingerprint"
+ DLPEntryPredefinedGetResponseTypeWordList DLPEntryPredefinedGetResponseType = "word_list"
)
-func (r DLPEntryPredefinedGetResponseWordListEntryType) IsKnown() bool {
+func (r DLPEntryPredefinedGetResponseType) IsKnown() bool {
switch r {
- case DLPEntryPredefinedGetResponseWordListEntryTypeWordList:
+ case DLPEntryPredefinedGetResponseTypeCustom, DLPEntryPredefinedGetResponseTypePredefined, DLPEntryPredefinedGetResponseTypeIntegration, DLPEntryPredefinedGetResponseTypeExactData, DLPEntryPredefinedGetResponseTypeDocumentFingerprint, DLPEntryPredefinedGetResponseTypeWordList:
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
+type DLPEntryPredefinedGetResponseUploadStatus string
const (
- DLPEntryPredefinedGetResponseTypeCustom DLPEntryPredefinedGetResponseType = "custom"
- DLPEntryPredefinedGetResponseTypePredefined DLPEntryPredefinedGetResponseType = "predefined"
- DLPEntryPredefinedGetResponseTypeIntegration DLPEntryPredefinedGetResponseType = "integration"
- DLPEntryPredefinedGetResponseTypeExactData DLPEntryPredefinedGetResponseType = "exact_data"
- DLPEntryPredefinedGetResponseTypeDocumentFingerprint DLPEntryPredefinedGetResponseType = "document_fingerprint"
- DLPEntryPredefinedGetResponseTypeWordList DLPEntryPredefinedGetResponseType = "word_list"
+ DLPEntryPredefinedGetResponseUploadStatusEmpty DLPEntryPredefinedGetResponseUploadStatus = "empty"
+ DLPEntryPredefinedGetResponseUploadStatusUploading DLPEntryPredefinedGetResponseUploadStatus = "uploading"
+ DLPEntryPredefinedGetResponseUploadStatusPending DLPEntryPredefinedGetResponseUploadStatus = "pending"
+ DLPEntryPredefinedGetResponseUploadStatusProcessing DLPEntryPredefinedGetResponseUploadStatus = "processing"
+ DLPEntryPredefinedGetResponseUploadStatusFailed DLPEntryPredefinedGetResponseUploadStatus = "failed"
+ DLPEntryPredefinedGetResponseUploadStatusComplete DLPEntryPredefinedGetResponseUploadStatus = "complete"
)
-func (r DLPEntryPredefinedGetResponseType) IsKnown() bool {
+func (r DLPEntryPredefinedGetResponseUploadStatus) IsKnown() bool {
switch r {
- case DLPEntryPredefinedGetResponseTypeCustom, DLPEntryPredefinedGetResponseTypePredefined, DLPEntryPredefinedGetResponseTypeIntegration, DLPEntryPredefinedGetResponseTypeExactData, DLPEntryPredefinedGetResponseTypeDocumentFingerprint, DLPEntryPredefinedGetResponseTypeWordList:
+ case DLPEntryPredefinedGetResponseUploadStatusEmpty, DLPEntryPredefinedGetResponseUploadStatusUploading, DLPEntryPredefinedGetResponseUploadStatusPending, DLPEntryPredefinedGetResponseUploadStatusProcessing, DLPEntryPredefinedGetResponseUploadStatusFailed, DLPEntryPredefinedGetResponseUploadStatusComplete:
return true
}
return false
diff --git a/zero_trust/gatewaylist.go b/zero_trust/gatewaylist.go
index c72b4d59fcd..2d735a69ccb 100644
--- a/zero_trust/gatewaylist.go
+++ b/zero_trust/gatewaylist.go
@@ -240,16 +240,19 @@ func (r gatewayListJSON) RawJSON() string {
type GatewayListType string
const (
- GatewayListTypeSerial GatewayListType = "SERIAL"
- GatewayListTypeURL GatewayListType = "URL"
- GatewayListTypeDomain GatewayListType = "DOMAIN"
- GatewayListTypeEmail GatewayListType = "EMAIL"
- GatewayListTypeIP GatewayListType = "IP"
+ GatewayListTypeSerial GatewayListType = "SERIAL"
+ GatewayListTypeURL GatewayListType = "URL"
+ GatewayListTypeDomain GatewayListType = "DOMAIN"
+ GatewayListTypeEmail GatewayListType = "EMAIL"
+ GatewayListTypeIP GatewayListType = "IP"
+ GatewayListTypeCategory GatewayListType = "CATEGORY"
+ GatewayListTypeLocation GatewayListType = "LOCATION"
+ GatewayListTypeDevice GatewayListType = "DEVICE"
)
func (r GatewayListType) IsKnown() bool {
switch r {
- case GatewayListTypeSerial, GatewayListTypeURL, GatewayListTypeDomain, GatewayListTypeEmail, GatewayListTypeIP:
+ case GatewayListTypeSerial, GatewayListTypeURL, GatewayListTypeDomain, GatewayListTypeEmail, GatewayListTypeIP, GatewayListTypeCategory, GatewayListTypeLocation, GatewayListTypeDevice:
return true
}
return false
@@ -297,16 +300,19 @@ func (r gatewayListNewResponseJSON) RawJSON() string {
type GatewayListNewResponseType string
const (
- GatewayListNewResponseTypeSerial GatewayListNewResponseType = "SERIAL"
- GatewayListNewResponseTypeURL GatewayListNewResponseType = "URL"
- GatewayListNewResponseTypeDomain GatewayListNewResponseType = "DOMAIN"
- GatewayListNewResponseTypeEmail GatewayListNewResponseType = "EMAIL"
- GatewayListNewResponseTypeIP GatewayListNewResponseType = "IP"
+ GatewayListNewResponseTypeSerial GatewayListNewResponseType = "SERIAL"
+ GatewayListNewResponseTypeURL GatewayListNewResponseType = "URL"
+ GatewayListNewResponseTypeDomain GatewayListNewResponseType = "DOMAIN"
+ GatewayListNewResponseTypeEmail GatewayListNewResponseType = "EMAIL"
+ GatewayListNewResponseTypeIP GatewayListNewResponseType = "IP"
+ GatewayListNewResponseTypeCategory GatewayListNewResponseType = "CATEGORY"
+ GatewayListNewResponseTypeLocation GatewayListNewResponseType = "LOCATION"
+ GatewayListNewResponseTypeDevice GatewayListNewResponseType = "DEVICE"
)
func (r GatewayListNewResponseType) IsKnown() bool {
switch r {
- case GatewayListNewResponseTypeSerial, GatewayListNewResponseTypeURL, GatewayListNewResponseTypeDomain, GatewayListNewResponseTypeEmail, GatewayListNewResponseTypeIP:
+ case GatewayListNewResponseTypeSerial, GatewayListNewResponseTypeURL, GatewayListNewResponseTypeDomain, GatewayListNewResponseTypeEmail, GatewayListNewResponseTypeIP, GatewayListNewResponseTypeCategory, GatewayListNewResponseTypeLocation, GatewayListNewResponseTypeDevice:
return true
}
return false
@@ -334,16 +340,19 @@ func (r GatewayListNewParams) MarshalJSON() (data []byte, err error) {
type GatewayListNewParamsType string
const (
- GatewayListNewParamsTypeSerial GatewayListNewParamsType = "SERIAL"
- GatewayListNewParamsTypeURL GatewayListNewParamsType = "URL"
- GatewayListNewParamsTypeDomain GatewayListNewParamsType = "DOMAIN"
- GatewayListNewParamsTypeEmail GatewayListNewParamsType = "EMAIL"
- GatewayListNewParamsTypeIP GatewayListNewParamsType = "IP"
+ GatewayListNewParamsTypeSerial GatewayListNewParamsType = "SERIAL"
+ GatewayListNewParamsTypeURL GatewayListNewParamsType = "URL"
+ GatewayListNewParamsTypeDomain GatewayListNewParamsType = "DOMAIN"
+ GatewayListNewParamsTypeEmail GatewayListNewParamsType = "EMAIL"
+ GatewayListNewParamsTypeIP GatewayListNewParamsType = "IP"
+ GatewayListNewParamsTypeCategory GatewayListNewParamsType = "CATEGORY"
+ GatewayListNewParamsTypeLocation GatewayListNewParamsType = "LOCATION"
+ GatewayListNewParamsTypeDevice GatewayListNewParamsType = "DEVICE"
)
func (r GatewayListNewParamsType) IsKnown() bool {
switch r {
- case GatewayListNewParamsTypeSerial, GatewayListNewParamsTypeURL, GatewayListNewParamsTypeDomain, GatewayListNewParamsTypeEmail, GatewayListNewParamsTypeIP:
+ case GatewayListNewParamsTypeSerial, GatewayListNewParamsTypeURL, GatewayListNewParamsTypeDomain, GatewayListNewParamsTypeEmail, GatewayListNewParamsTypeIP, GatewayListNewParamsTypeCategory, GatewayListNewParamsTypeLocation, GatewayListNewParamsTypeDevice:
return true
}
return false
@@ -489,16 +498,19 @@ func (r GatewayListListParams) URLQuery() (v url.Values) {
type GatewayListListParamsType string
const (
- GatewayListListParamsTypeSerial GatewayListListParamsType = "SERIAL"
- GatewayListListParamsTypeURL GatewayListListParamsType = "URL"
- GatewayListListParamsTypeDomain GatewayListListParamsType = "DOMAIN"
- GatewayListListParamsTypeEmail GatewayListListParamsType = "EMAIL"
- GatewayListListParamsTypeIP GatewayListListParamsType = "IP"
+ GatewayListListParamsTypeSerial GatewayListListParamsType = "SERIAL"
+ GatewayListListParamsTypeURL GatewayListListParamsType = "URL"
+ GatewayListListParamsTypeDomain GatewayListListParamsType = "DOMAIN"
+ GatewayListListParamsTypeEmail GatewayListListParamsType = "EMAIL"
+ GatewayListListParamsTypeIP GatewayListListParamsType = "IP"
+ GatewayListListParamsTypeCategory GatewayListListParamsType = "CATEGORY"
+ GatewayListListParamsTypeLocation GatewayListListParamsType = "LOCATION"
+ GatewayListListParamsTypeDevice GatewayListListParamsType = "DEVICE"
)
func (r GatewayListListParamsType) IsKnown() bool {
switch r {
- case GatewayListListParamsTypeSerial, GatewayListListParamsTypeURL, GatewayListListParamsTypeDomain, GatewayListListParamsTypeEmail, GatewayListListParamsTypeIP:
+ case GatewayListListParamsTypeSerial, GatewayListListParamsTypeURL, GatewayListListParamsTypeDomain, GatewayListListParamsTypeEmail, GatewayListListParamsTypeIP, GatewayListListParamsTypeCategory, GatewayListListParamsTypeLocation, GatewayListListParamsTypeDevice:
return true
}
return false
diff --git a/zero_trust/gatewayrule.go b/zero_trust/gatewayrule.go
index 2ded06a0319..3b1b7e1de82 100644
--- a/zero_trust/gatewayrule.go
+++ b/zero_trust/gatewayrule.go
@@ -529,6 +529,9 @@ type RuleSetting struct {
// rules with Egress actions and filters, or omit it to indicate local egress via
// WARP IPs. Settable only for `egress` rules.
Egress RuleSettingEgress `json:"egress,nullable"`
+ // Configure whether a copy of the HTTP request will be sent to storage when the
+ // rule matches.
+ ForensicCopy RuleSettingForensicCopy `json:"forensic_copy,nullable"`
// Ignore category matches at CNAME domains in a response. When off, evaluate
// categories in this rule against all CNAME domain categories in the response.
// Settable only for `dns` and `dns_resolver` rules.
@@ -593,6 +596,7 @@ type ruleSettingJSON struct {
CheckSession apijson.Field
DNSResolvers apijson.Field
Egress apijson.Field
+ ForensicCopy apijson.Field
IgnoreCNAMECategoryMatches apijson.Field
InsecureDisableDNSSECValidation apijson.Field
IPCategories apijson.Field
@@ -946,6 +950,30 @@ func (r ruleSettingEgressJSON) RawJSON() string {
return r.raw
}
+// Configure whether a copy of the HTTP request will be sent to storage when the
+// rule matches.
+type RuleSettingForensicCopy struct {
+ // Enable sending the copy to storage.
+ Enabled bool `json:"enabled"`
+ JSON ruleSettingForensicCopyJSON `json:"-"`
+}
+
+// ruleSettingForensicCopyJSON contains the JSON metadata for the struct
+// [RuleSettingForensicCopy]
+type ruleSettingForensicCopyJSON struct {
+ Enabled apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *RuleSettingForensicCopy) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r ruleSettingForensicCopyJSON) RawJSON() string {
+ return r.raw
+}
+
// Send matching traffic to the supplied destination IP address and port. Settable
// only for `l4` rules with the action set to `l4_override`.
type RuleSettingL4override struct {
@@ -1246,6 +1274,9 @@ type RuleSettingParam struct {
// rules with Egress actions and filters, or omit it to indicate local egress via
// WARP IPs. Settable only for `egress` rules.
Egress param.Field[RuleSettingEgressParam] `json:"egress"`
+ // Configure whether a copy of the HTTP request will be sent to storage when the
+ // rule matches.
+ ForensicCopy param.Field[RuleSettingForensicCopyParam] `json:"forensic_copy"`
// Ignore category matches at CNAME domains in a response. When off, evaluate
// categories in this rule against all CNAME domain categories in the response.
// Settable only for `dns` and `dns_resolver` rules.
@@ -1410,6 +1441,17 @@ func (r RuleSettingEgressParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
+// Configure whether a copy of the HTTP request will be sent to storage when the
+// rule matches.
+type RuleSettingForensicCopyParam struct {
+ // Enable sending the copy to storage.
+ Enabled param.Field[bool] `json:"enabled"`
+}
+
+func (r RuleSettingForensicCopyParam) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
// Send matching traffic to the supplied destination IP address and port. Settable
// only for `l4` rules with the action set to `l4_override`.
type RuleSettingL4overrideParam struct {
diff --git a/zero_trust/gatewayrule_test.go b/zero_trust/gatewayrule_test.go
index 1a84b2d90a7..0242e6087a2 100644
--- a/zero_trust/gatewayrule_test.go
+++ b/zero_trust/gatewayrule_test.go
@@ -95,6 +95,9 @@ func TestGatewayRuleNewWithOptionalParams(t *testing.T) {
IPV4Fallback: cloudflare.F("192.0.2.3"),
IPV6: cloudflare.F("2001:DB8::/64"),
}),
+ ForensicCopy: cloudflare.F(zero_trust.RuleSettingForensicCopyParam{
+ Enabled: cloudflare.F(true),
+ }),
IgnoreCNAMECategoryMatches: cloudflare.F(true),
InsecureDisableDNSSECValidation: cloudflare.F(false),
IPCategories: cloudflare.F(true),
@@ -235,6 +238,9 @@ func TestGatewayRuleUpdateWithOptionalParams(t *testing.T) {
IPV4Fallback: cloudflare.F("192.0.2.3"),
IPV6: cloudflare.F("2001:DB8::/64"),
}),
+ ForensicCopy: cloudflare.F(zero_trust.RuleSettingForensicCopyParam{
+ Enabled: cloudflare.F(true),
+ }),
IgnoreCNAMECategoryMatches: cloudflare.F(true),
InsecureDisableDNSSECValidation: cloudflare.F(false),
IPCategories: cloudflare.F(true),