diff --git a/.stats.yml b/.stats.yml index 5adbfd612b4..4f4ebc61794 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1490 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8e6b8b43d1ad4a62c082c07be4cdb37ded52a2974b972ea6fb8872be689c65d5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-deec6a3026245e9d34c70161312299d938e328e4e8a8a28517fd9930adb7b6f2.yml diff --git a/alerting/availablealert.go b/alerting/availablealert.go index 84e63ab3c0e..f7292a72e04 100644 --- a/alerting/availablealert.go +++ b/alerting/availablealert.go @@ -13,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // AvailableAlertService contains methods and other services that help with @@ -61,7 +60,7 @@ type AvailableAlertListResponseItem struct { DisplayName string `json:"display_name"` // Format of additional configuration options (filters) for the alert type. Data // type of filters during policy creation: Array of strings. - FilterOptions []zones.OriginMaxHTTPVersion `json:"filter_options"` + FilterOptions []interface{} `json:"filter_options"` // Use this value when creating and updating a notification policy. Type string `json:"type"` JSON availableAlertListResponseItemJSON `json:"-"` diff --git a/api.md b/api.md index e21439ac3fd..6c9b7ecd1a4 100644 --- a/api.md +++ b/api.md @@ -346,7 +346,6 @@ Params Types: - zones.OpportunisticOnionParam - zones.OrangeToOrangeParam - zones.OriginErrorPagePassThruParam -- zones.OriginMaxHTTPVersionParam - zones.PolishParam - zones.PrefetchPreloadParam - zones.ProxyReadTimeoutParam @@ -397,7 +396,6 @@ Response Types: - zones.OpportunisticOnion - zones.OrangeToOrange - zones.OriginErrorPagePassThru -- zones.OriginMaxHTTPVersion - zones.Polish - zones.PrefetchPreload - zones.ProxyReadTimeout @@ -1667,11 +1665,12 @@ Methods: Response Types: +- firewall.WAFPackageListResponse - firewall.WAFPackageGetResponse Methods: -- client.Firewall.WAF.Packages.List(ctx context.Context, params firewall.WAFPackageListParams) (pagination.V4PagePaginationArray[zones.OriginMaxHTTPVersion], error) +- client.Firewall.WAF.Packages.List(ctx context.Context, params firewall.WAFPackageListParams) (pagination.V4PagePaginationArray[firewall.WAFPackageListResponse], error) - client.Firewall.WAF.Packages.Get(ctx context.Context, packageID string, query firewall.WAFPackageGetParams) (firewall.WAFPackageGetResponse, error) #### Groups @@ -7413,11 +7412,12 @@ Methods: Response Types: +- iam.PermissionGroupListResponse - iam.PermissionGroupGetResponse Methods: -- client.IAM.PermissionGroups.List(ctx context.Context, params iam.PermissionGroupListParams) (pagination.V4PagePaginationArray[zones.OriginMaxHTTPVersion], error) +- client.IAM.PermissionGroups.List(ctx context.Context, params iam.PermissionGroupListParams) (pagination.V4PagePaginationArray[iam.PermissionGroupListResponse], error) - client.IAM.PermissionGroups.Get(ctx context.Context, permissionGroupID string, query iam.PermissionGroupGetParams) (iam.PermissionGroupGetResponse, error) ## ResourceGroups @@ -7426,6 +7426,7 @@ Response Types: - iam.ResourceGroupNewResponse - iam.ResourceGroupUpdateResponse +- iam.ResourceGroupListResponse - iam.ResourceGroupDeleteResponse - iam.ResourceGroupGetResponse @@ -7433,7 +7434,7 @@ Methods: - client.IAM.ResourceGroups.New(ctx context.Context, params iam.ResourceGroupNewParams) (iam.ResourceGroupNewResponse, error) - client.IAM.ResourceGroups.Update(ctx context.Context, resourceGroupID string, params iam.ResourceGroupUpdateParams) (iam.ResourceGroupUpdateResponse, error) -- client.IAM.ResourceGroups.List(ctx context.Context, params iam.ResourceGroupListParams) (pagination.V4PagePaginationArray[zones.OriginMaxHTTPVersion], error) +- client.IAM.ResourceGroups.List(ctx context.Context, params iam.ResourceGroupListParams) (pagination.V4PagePaginationArray[iam.ResourceGroupListResponse], error) - client.IAM.ResourceGroups.Delete(ctx context.Context, resourceGroupID string, body iam.ResourceGroupDeleteParams) (iam.ResourceGroupDeleteResponse, error) - client.IAM.ResourceGroups.Get(ctx context.Context, resourceGroupID string, query iam.ResourceGroupGetParams) (iam.ResourceGroupGetResponse, error) @@ -7614,20 +7615,26 @@ Response Types: - leaked_credential_checks.DetectionNewResponse - leaked_credential_checks.DetectionUpdateResponse - leaked_credential_checks.DetectionListResponse +- leaked_credential_checks.DetectionDeleteResponse Methods: - client.LeakedCredentialChecks.Detections.New(ctx context.Context, params leaked_credential_checks.DetectionNewParams) (leaked_credential_checks.DetectionNewResponse, error) - 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) (zones.OriginMaxHTTPVersion, error) +- client.LeakedCredentialChecks.Detections.Delete(ctx context.Context, detectionID string, body leaked_credential_checks.DetectionDeleteParams) (leaked_credential_checks.DetectionDeleteResponse, error) # ContentScanning +Response Types: + +- content_scanning.ContentScanningDisableResponse +- content_scanning.ContentScanningEnableResponse + Methods: -- client.ContentScanning.Disable(ctx context.Context, body content_scanning.ContentScanningDisableParams) (zones.OriginMaxHTTPVersion, error) -- client.ContentScanning.Enable(ctx context.Context, body content_scanning.ContentScanningEnableParams) (zones.OriginMaxHTTPVersion, error) +- client.ContentScanning.Disable(ctx context.Context, body content_scanning.ContentScanningDisableParams) (content_scanning.ContentScanningDisableResponse, error) +- client.ContentScanning.Enable(ctx context.Context, body content_scanning.ContentScanningEnableParams) (content_scanning.ContentScanningEnableResponse, error) ## Payloads diff --git a/content_scanning/contentscanning.go b/content_scanning/contentscanning.go index 48d8e5152a5..fbf986e0d63 100644 --- a/content_scanning/contentscanning.go +++ b/content_scanning/contentscanning.go @@ -13,7 +13,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // ContentScanningService contains methods and other services that help with @@ -40,7 +39,7 @@ func NewContentScanningService(opts ...option.RequestOption) (r *ContentScanning } // Disable Content Scanning -func (r *ContentScanningService) Disable(ctx context.Context, body ContentScanningDisableParams, opts ...option.RequestOption) (res *zones.OriginMaxHTTPVersion, err error) { +func (r *ContentScanningService) Disable(ctx context.Context, body ContentScanningDisableParams, opts ...option.RequestOption) (res *ContentScanningDisableResponse, err error) { var env ContentScanningDisableResponseEnvelope opts = append(r.Options[:], opts...) if body.ZoneID.Value == "" { @@ -57,7 +56,7 @@ func (r *ContentScanningService) Disable(ctx context.Context, body ContentScanni } // Enable Content Scanning -func (r *ContentScanningService) Enable(ctx context.Context, body ContentScanningEnableParams, opts ...option.RequestOption) (res *zones.OriginMaxHTTPVersion, err error) { +func (r *ContentScanningService) Enable(ctx context.Context, body ContentScanningEnableParams, opts ...option.RequestOption) (res *ContentScanningEnableResponse, err error) { var env ContentScanningEnableResponseEnvelope opts = append(r.Options[:], opts...) if body.ZoneID.Value == "" { @@ -73,15 +72,19 @@ func (r *ContentScanningService) Enable(ctx context.Context, body ContentScannin return } +type ContentScanningDisableResponse = interface{} + +type ContentScanningEnableResponse = interface{} + type ContentScanningDisableParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` } type ContentScanningDisableResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result zones.OriginMaxHTTPVersion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result ContentScanningDisableResponse `json:"result,required"` // Whether the API call was successful Success ContentScanningDisableResponseEnvelopeSuccess `json:"success,required"` JSON contentScanningDisableResponseEnvelopeJSON `json:"-"` @@ -127,9 +130,9 @@ type ContentScanningEnableParams struct { } type ContentScanningEnableResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result zones.OriginMaxHTTPVersion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result ContentScanningEnableResponse `json:"result,required"` // Whether the API call was successful Success ContentScanningEnableResponseEnvelopeSuccess `json:"success,required"` JSON contentScanningEnableResponseEnvelopeJSON `json:"-"` diff --git a/dns/dns.go b/dns/dns.go index b30832a16cf..391e6041460 100644 --- a/dns/dns.go +++ b/dns/dns.go @@ -7,7 +7,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/apijson" "github.com/cloudflare/cloudflare-go/v3/option" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // DNSService contains methods and other services that help with interacting with @@ -39,7 +38,7 @@ func NewDNSService(opts ...option.RequestOption) (r *DNSService) { return } -type DNSAnalyticsNominalMetric []zones.OriginMaxHTTPVersion +type DNSAnalyticsNominalMetric []interface{} type DNSAnalyticsQuery struct { // Array of dimension names. diff --git a/email_security/investigate.go b/email_security/investigate.go index fcd80eb687f..6e5fdd0e892 100644 --- a/email_security/investigate.go +++ b/email_security/investigate.go @@ -17,7 +17,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // InvestigateService contains methods and other services that help with @@ -102,12 +101,12 @@ func (r *InvestigateService) Get(ctx context.Context, postfixID string, query In } type InvestigateListResponse struct { - ID string `json:"id,required"` - ActionLog zones.OriginMaxHTTPVersion `json:"action_log,required"` - ClientRecipients []string `json:"client_recipients,required"` - DetectionReasons []string `json:"detection_reasons,required"` - IsPhishSubmission bool `json:"is_phish_submission,required"` - IsQuarantined bool `json:"is_quarantined,required"` + ID string `json:"id,required"` + ActionLog interface{} `json:"action_log,required"` + ClientRecipients []string `json:"client_recipients,required"` + DetectionReasons []string `json:"detection_reasons,required"` + IsPhishSubmission bool `json:"is_phish_submission,required"` + IsQuarantined bool `json:"is_quarantined,required"` // The identifier of the message. PostfixID string `json:"postfix_id,required"` Ts string `json:"ts,required"` @@ -292,12 +291,12 @@ func (r InvestigateListResponseValidationSPF) IsKnown() bool { } type InvestigateGetResponse struct { - ID string `json:"id,required"` - ActionLog zones.OriginMaxHTTPVersion `json:"action_log,required"` - ClientRecipients []string `json:"client_recipients,required"` - DetectionReasons []string `json:"detection_reasons,required"` - IsPhishSubmission bool `json:"is_phish_submission,required"` - IsQuarantined bool `json:"is_quarantined,required"` + ID string `json:"id,required"` + ActionLog interface{} `json:"action_log,required"` + ClientRecipients []string `json:"client_recipients,required"` + DetectionReasons []string `json:"detection_reasons,required"` + IsPhishSubmission bool `json:"is_phish_submission,required"` + IsQuarantined bool `json:"is_quarantined,required"` // The identifier of the message. PostfixID string `json:"postfix_id,required"` Ts string `json:"ts,required"` diff --git a/firewall/wafpackage.go b/firewall/wafpackage.go index 808d920343a..2184b1f97ad 100644 --- a/firewall/wafpackage.go +++ b/firewall/wafpackage.go @@ -17,7 +17,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" "github.com/tidwall/gjson" ) @@ -48,7 +47,7 @@ func NewWAFPackageService(opts ...option.RequestOption) (r *WAFPackageService) { // // **Note:** Applies only to the // [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). -func (r *WAFPackageService) List(ctx context.Context, params WAFPackageListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[zones.OriginMaxHTTPVersion], err error) { +func (r *WAFPackageService) List(ctx context.Context, params WAFPackageListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[WAFPackageListResponse], err error) { var raw *http.Response opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) @@ -73,7 +72,7 @@ func (r *WAFPackageService) List(ctx context.Context, params WAFPackageListParam // // **Note:** Applies only to the // [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/). -func (r *WAFPackageService) ListAutoPaging(ctx context.Context, params WAFPackageListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[zones.OriginMaxHTTPVersion] { +func (r *WAFPackageService) ListAutoPaging(ctx context.Context, params WAFPackageListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[WAFPackageListResponse] { return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) } @@ -96,6 +95,8 @@ func (r *WAFPackageService) Get(ctx context.Context, packageID string, query WAF return } +type WAFPackageListResponse = interface{} + type WAFPackageGetResponse struct { // This field can have the runtime type of [[]shared.ResponseInfo]. Errors interface{} `json:"errors"` diff --git a/iam/permissiongroup.go b/iam/permissiongroup.go index 73cd1ffba24..ca603bc053e 100644 --- a/iam/permissiongroup.go +++ b/iam/permissiongroup.go @@ -15,7 +15,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // PermissionGroupService contains methods and other services that help with @@ -38,7 +37,7 @@ func NewPermissionGroupService(opts ...option.RequestOption) (r *PermissionGroup } // List all the permissions groups for an account. -func (r *PermissionGroupService) List(ctx context.Context, params PermissionGroupListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[zones.OriginMaxHTTPVersion], err error) { +func (r *PermissionGroupService) List(ctx context.Context, params PermissionGroupListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[PermissionGroupListResponse], err error) { var raw *http.Response opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) @@ -60,7 +59,7 @@ func (r *PermissionGroupService) List(ctx context.Context, params PermissionGrou } // List all the permissions groups for an account. -func (r *PermissionGroupService) ListAutoPaging(ctx context.Context, params PermissionGroupListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[zones.OriginMaxHTTPVersion] { +func (r *PermissionGroupService) ListAutoPaging(ctx context.Context, params PermissionGroupListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[PermissionGroupListResponse] { return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) } @@ -80,6 +79,8 @@ func (r *PermissionGroupService) Get(ctx context.Context, permissionGroupID stri return } +type PermissionGroupListResponse = interface{} + // A named group of permissions that map to a group of operations against // resources. type PermissionGroupGetResponse struct { diff --git a/iam/resourcegroup.go b/iam/resourcegroup.go index 3dcd0da5c0f..be36c03af74 100644 --- a/iam/resourcegroup.go +++ b/iam/resourcegroup.go @@ -16,7 +16,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // ResourceGroupService contains methods and other services that help with @@ -67,7 +66,7 @@ func (r *ResourceGroupService) Update(ctx context.Context, resourceGroupID strin } // List all the resource groups for an account. -func (r *ResourceGroupService) List(ctx context.Context, params ResourceGroupListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[zones.OriginMaxHTTPVersion], err error) { +func (r *ResourceGroupService) List(ctx context.Context, params ResourceGroupListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[ResourceGroupListResponse], err error) { var raw *http.Response opts = append(r.Options[:], opts...) opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...) @@ -89,7 +88,7 @@ func (r *ResourceGroupService) List(ctx context.Context, params ResourceGroupLis } // List all the resource groups for an account. -func (r *ResourceGroupService) ListAutoPaging(ctx context.Context, params ResourceGroupListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[zones.OriginMaxHTTPVersion] { +func (r *ResourceGroupService) ListAutoPaging(ctx context.Context, params ResourceGroupListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[ResourceGroupListResponse] { return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...)) } @@ -320,6 +319,8 @@ func (r resourceGroupUpdateResponseMetaJSON) RawJSON() string { return r.raw } +type ResourceGroupListResponse = interface{} + type ResourceGroupDeleteResponse struct { // Identifier ID string `json:"id,required"` diff --git a/leaked_credential_checks/detection.go b/leaked_credential_checks/detection.go index 4a558e83b6c..826bda7d2ae 100644 --- a/leaked_credential_checks/detection.go +++ b/leaked_credential_checks/detection.go @@ -14,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // DetectionService contains methods and other services that help with interacting @@ -102,7 +101,7 @@ func (r *DetectionService) ListAutoPaging(ctx context.Context, query DetectionLi } // Remove user-defined detection pattern for Leaked Credential Checks -func (r *DetectionService) Delete(ctx context.Context, detectionID string, body DetectionDeleteParams, opts ...option.RequestOption) (res *zones.OriginMaxHTTPVersion, err error) { +func (r *DetectionService) Delete(ctx context.Context, detectionID string, body DetectionDeleteParams, opts ...option.RequestOption) (res *DetectionDeleteResponse, err error) { var env DetectionDeleteResponseEnvelope opts = append(r.Options[:], opts...) if body.ZoneID.Value == "" { @@ -212,6 +211,8 @@ func (r detectionListResponseJSON) RawJSON() string { return r.raw } +type DetectionDeleteResponse = interface{} + type DetectionNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` @@ -339,9 +340,9 @@ type DetectionDeleteParams struct { } type DetectionDeleteResponseEnvelope struct { - Errors []shared.ResponseInfo `json:"errors,required"` - Messages []shared.ResponseInfo `json:"messages,required"` - Result zones.OriginMaxHTTPVersion `json:"result,required"` + Errors []shared.ResponseInfo `json:"errors,required"` + Messages []shared.ResponseInfo `json:"messages,required"` + Result DetectionDeleteResponse `json:"result,required"` // Whether the API call was successful Success DetectionDeleteResponseEnvelopeSuccess `json:"success,required"` JSON detectionDeleteResponseEnvelopeJSON `json:"-"` diff --git a/managed_transforms/managedtransform.go b/managed_transforms/managedtransform.go index d04393b05d1..1561986c157 100644 --- a/managed_transforms/managedtransform.go +++ b/managed_transforms/managedtransform.go @@ -12,7 +12,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/param" "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // ManagedTransformService contains methods and other services that help with @@ -117,8 +116,8 @@ type ManagedTransformListResponseManagedRequestHeader struct { // Transforms. HasConflict bool `json:"has_conflict,required"` // The Managed Transforms that this Managed Transform conflicts with. - ConflictsWith []zones.OriginMaxHTTPVersion `json:"conflicts_with"` - JSON managedTransformListResponseManagedRequestHeaderJSON `json:"-"` + ConflictsWith []ManagedTransformListResponseManagedRequestHeadersConflictsWith `json:"conflicts_with"` + JSON managedTransformListResponseManagedRequestHeaderJSON `json:"-"` } // managedTransformListResponseManagedRequestHeaderJSON contains the JSON metadata @@ -140,6 +139,27 @@ func (r managedTransformListResponseManagedRequestHeaderJSON) RawJSON() string { return r.raw } +// The human-readable identifier of the Managed Transform. +type ManagedTransformListResponseManagedRequestHeadersConflictsWith struct { + JSON managedTransformListResponseManagedRequestHeadersConflictsWithJSON `json:"-"` +} + +// managedTransformListResponseManagedRequestHeadersConflictsWithJSON contains the +// JSON metadata for the struct +// [ManagedTransformListResponseManagedRequestHeadersConflictsWith] +type managedTransformListResponseManagedRequestHeadersConflictsWithJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ManagedTransformListResponseManagedRequestHeadersConflictsWith) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r managedTransformListResponseManagedRequestHeadersConflictsWithJSON) RawJSON() string { + return r.raw +} + // A Managed Transform object. type ManagedTransformListResponseManagedResponseHeader struct { // The human-readable identifier of the Managed Transform. @@ -150,8 +170,8 @@ type ManagedTransformListResponseManagedResponseHeader struct { // Transforms. HasConflict bool `json:"has_conflict,required"` // The Managed Transforms that this Managed Transform conflicts with. - ConflictsWith []zones.OriginMaxHTTPVersion `json:"conflicts_with"` - JSON managedTransformListResponseManagedResponseHeaderJSON `json:"-"` + ConflictsWith []ManagedTransformListResponseManagedResponseHeadersConflictsWith `json:"conflicts_with"` + JSON managedTransformListResponseManagedResponseHeaderJSON `json:"-"` } // managedTransformListResponseManagedResponseHeaderJSON contains the JSON metadata @@ -173,6 +193,27 @@ func (r managedTransformListResponseManagedResponseHeaderJSON) RawJSON() string return r.raw } +// The human-readable identifier of the Managed Transform. +type ManagedTransformListResponseManagedResponseHeadersConflictsWith struct { + JSON managedTransformListResponseManagedResponseHeadersConflictsWithJSON `json:"-"` +} + +// managedTransformListResponseManagedResponseHeadersConflictsWithJSON contains the +// JSON metadata for the struct +// [ManagedTransformListResponseManagedResponseHeadersConflictsWith] +type managedTransformListResponseManagedResponseHeadersConflictsWithJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ManagedTransformListResponseManagedResponseHeadersConflictsWith) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r managedTransformListResponseManagedResponseHeadersConflictsWithJSON) RawJSON() string { + return r.raw +} + // A result. type ManagedTransformEditResponse struct { // The list of Managed Request Transforms. @@ -209,8 +250,8 @@ type ManagedTransformEditResponseManagedRequestHeader struct { // Transforms. HasConflict bool `json:"has_conflict,required"` // The Managed Transforms that this Managed Transform conflicts with. - ConflictsWith []zones.OriginMaxHTTPVersion `json:"conflicts_with"` - JSON managedTransformEditResponseManagedRequestHeaderJSON `json:"-"` + ConflictsWith []ManagedTransformEditResponseManagedRequestHeadersConflictsWith `json:"conflicts_with"` + JSON managedTransformEditResponseManagedRequestHeaderJSON `json:"-"` } // managedTransformEditResponseManagedRequestHeaderJSON contains the JSON metadata @@ -232,6 +273,27 @@ func (r managedTransformEditResponseManagedRequestHeaderJSON) RawJSON() string { return r.raw } +// The human-readable identifier of the Managed Transform. +type ManagedTransformEditResponseManagedRequestHeadersConflictsWith struct { + JSON managedTransformEditResponseManagedRequestHeadersConflictsWithJSON `json:"-"` +} + +// managedTransformEditResponseManagedRequestHeadersConflictsWithJSON contains the +// JSON metadata for the struct +// [ManagedTransformEditResponseManagedRequestHeadersConflictsWith] +type managedTransformEditResponseManagedRequestHeadersConflictsWithJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ManagedTransformEditResponseManagedRequestHeadersConflictsWith) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r managedTransformEditResponseManagedRequestHeadersConflictsWithJSON) RawJSON() string { + return r.raw +} + // A Managed Transform object. type ManagedTransformEditResponseManagedResponseHeader struct { // The human-readable identifier of the Managed Transform. @@ -242,8 +304,8 @@ type ManagedTransformEditResponseManagedResponseHeader struct { // Transforms. HasConflict bool `json:"has_conflict,required"` // The Managed Transforms that this Managed Transform conflicts with. - ConflictsWith []zones.OriginMaxHTTPVersion `json:"conflicts_with"` - JSON managedTransformEditResponseManagedResponseHeaderJSON `json:"-"` + ConflictsWith []ManagedTransformEditResponseManagedResponseHeadersConflictsWith `json:"conflicts_with"` + JSON managedTransformEditResponseManagedResponseHeaderJSON `json:"-"` } // managedTransformEditResponseManagedResponseHeaderJSON contains the JSON metadata @@ -265,6 +327,27 @@ func (r managedTransformEditResponseManagedResponseHeaderJSON) RawJSON() string return r.raw } +// The human-readable identifier of the Managed Transform. +type ManagedTransformEditResponseManagedResponseHeadersConflictsWith struct { + JSON managedTransformEditResponseManagedResponseHeadersConflictsWithJSON `json:"-"` +} + +// managedTransformEditResponseManagedResponseHeadersConflictsWithJSON contains the +// JSON metadata for the struct +// [ManagedTransformEditResponseManagedResponseHeadersConflictsWith] +type managedTransformEditResponseManagedResponseHeadersConflictsWithJSON struct { + raw string + ExtraFields map[string]apijson.Field +} + +func (r *ManagedTransformEditResponseManagedResponseHeadersConflictsWith) UnmarshalJSON(data []byte) (err error) { + return apijson.UnmarshalRoot(data, r) +} + +func (r managedTransformEditResponseManagedResponseHeadersConflictsWithJSON) RawJSON() string { + return r.raw +} + type ManagedTransformListParams struct { // The unique ID of the zone. ZoneID param.Field[string] `path:"zone_id,required"` @@ -451,6 +534,14 @@ func (r ManagedTransformEditParamsManagedRequestHeader) MarshalJSON() (data []by return apijson.MarshalRoot(r) } +// The human-readable identifier of the Managed Transform. +type ManagedTransformEditParamsManagedRequestHeadersConflictsWith struct { +} + +func (r ManagedTransformEditParamsManagedRequestHeadersConflictsWith) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + // A Managed Transform object. type ManagedTransformEditParamsManagedResponseHeader struct { // The human-readable identifier of the Managed Transform. @@ -463,6 +554,14 @@ func (r ManagedTransformEditParamsManagedResponseHeader) MarshalJSON() (data []b return apijson.MarshalRoot(r) } +// The human-readable identifier of the Managed Transform. +type ManagedTransformEditParamsManagedResponseHeadersConflictsWith struct { +} + +func (r ManagedTransformEditParamsManagedResponseHeadersConflictsWith) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + // A response object. type ManagedTransformEditResponseEnvelope struct { // A list of error messages. diff --git a/rulesets/phase.go b/rulesets/phase.go index da401f54ece..e4031e90b21 100644 --- a/rulesets/phase.go +++ b/rulesets/phase.go @@ -14,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/param" "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" - "github.com/cloudflare/cloudflare-go/v3/zones" "github.com/tidwall/gjson" ) @@ -167,8 +166,8 @@ type PhaseUpdateResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [PhaseUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], @@ -801,8 +800,8 @@ type PhaseGetResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [PhaseGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], @@ -1393,8 +1392,9 @@ type PhaseUpdateParamsRule struct { ActionParameters param.Field[interface{}] `json:"action_parameters"` Categories param.Field[interface{}] `json:"categories"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[interface{}] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` diff --git a/rulesets/phaseversion.go b/rulesets/phaseversion.go index 1ea0707ca03..71f399c7680 100644 --- a/rulesets/phaseversion.go +++ b/rulesets/phaseversion.go @@ -15,7 +15,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" - "github.com/cloudflare/cloudflare-go/v3/zones" "github.com/tidwall/gjson" ) @@ -220,8 +219,8 @@ type PhaseVersionGetResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [PhaseVersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], diff --git a/rulesets/rule.go b/rulesets/rule.go index a4752eb2890..1f7a6e60b4d 100644 --- a/rulesets/rule.go +++ b/rulesets/rule.go @@ -14,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/param" "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" - "github.com/cloudflare/cloudflare-go/v3/zones" "github.com/tidwall/gjson" ) @@ -4633,8 +4632,9 @@ type ScoreRule struct { // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. - Description string `json:"description"` - Enabled zones.OriginMaxHTTPVersion `json:"enabled"` + Description string `json:"description"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck ScoreRuleExposedCredentialCheck `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -4836,8 +4836,9 @@ type ScoreRuleParam struct { // The parameters configuring the rule's action. ActionParameters param.Field[ScoreRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[zones.OriginMaxHTTPVersionParam] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck param.Field[ScoreRuleExposedCredentialCheckParam] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -4931,8 +4932,9 @@ type ServeErrorRule struct { // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. - Description string `json:"description"` - Enabled zones.OriginMaxHTTPVersion `json:"enabled"` + Description string `json:"description"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck ServeErrorRuleExposedCredentialCheck `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -5157,8 +5159,9 @@ type ServeErrorRuleParam struct { // The parameters configuring the rule's action. ActionParameters param.Field[ServeErrorRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[zones.OriginMaxHTTPVersionParam] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck param.Field[ServeErrorRuleExposedCredentialCheckParam] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -5255,8 +5258,9 @@ type SetCacheSettingsRule struct { // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. - Description string `json:"description"` - Enabled zones.OriginMaxHTTPVersion `json:"enabled"` + Description string `json:"description"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck SetCacheSettingsRuleExposedCredentialCheck `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -5992,8 +5996,9 @@ type SetCacheSettingsRuleParam struct { // The parameters configuring the rule's action. ActionParameters param.Field[SetCacheSettingsRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[zones.OriginMaxHTTPVersionParam] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck param.Field[SetCacheSettingsRuleExposedCredentialCheckParam] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -6349,8 +6354,9 @@ type SetConfigRule struct { // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. - Description string `json:"description"` - Enabled zones.OriginMaxHTTPVersion `json:"enabled"` + Description string `json:"description"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck SetConfigRuleExposedCredentialCheck `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -6729,8 +6735,9 @@ type SetConfigRuleParam struct { // The parameters configuring the rule's action. ActionParameters param.Field[SetConfigRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[zones.OriginMaxHTTPVersionParam] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck param.Field[SetConfigRuleExposedCredentialCheckParam] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -6869,8 +6876,9 @@ type SkipRule struct { // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. - Description string `json:"description"` - Enabled zones.OriginMaxHTTPVersion `json:"enabled"` + Description string `json:"description"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck SkipRuleExposedCredentialCheck `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -7124,8 +7132,9 @@ type SkipRuleParam struct { // The parameters configuring the rule's action. ActionParameters param.Field[SkipRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[zones.OriginMaxHTTPVersionParam] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` // Configure checks for exposed credentials. ExposedCredentialCheck param.Field[SkipRuleExposedCredentialCheckParam] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. @@ -7280,8 +7289,8 @@ type RuleNewResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [RuleNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], @@ -7912,8 +7921,8 @@ type RuleDeleteResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [RuleDeleteResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], @@ -8545,8 +8554,8 @@ type RuleEditResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [RuleEditResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], @@ -9132,8 +9141,9 @@ type RuleNewParamsBody struct { ActionParameters param.Field[interface{}] `json:"action_parameters"` Categories param.Field[interface{}] `json:"categories"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[interface{}] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` @@ -9734,8 +9744,9 @@ type RuleEditParamsBody struct { ActionParameters param.Field[interface{}] `json:"action_parameters"` Categories param.Field[interface{}] `json:"categories"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[interface{}] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` diff --git a/rulesets/ruleset.go b/rulesets/ruleset.go index dfa78eba4af..428a6d3208b 100644 --- a/rulesets/ruleset.go +++ b/rulesets/ruleset.go @@ -15,7 +15,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" - "github.com/cloudflare/cloudflare-go/v3/zones" "github.com/tidwall/gjson" ) @@ -337,8 +336,8 @@ type RulesetNewResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [RulesetNewResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], @@ -970,8 +969,8 @@ type RulesetUpdateResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [RulesetUpdateResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], @@ -1647,8 +1646,8 @@ type RulesetGetResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [RulesetGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], @@ -2244,8 +2243,9 @@ type RulesetNewParamsRule struct { ActionParameters param.Field[interface{}] `json:"action_parameters"` Categories param.Field[interface{}] `json:"categories"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[interface{}] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` @@ -2697,8 +2697,9 @@ type RulesetUpdateParamsRule struct { ActionParameters param.Field[interface{}] `json:"action_parameters"` Categories param.Field[interface{}] `json:"categories"` // An informative description of the rule. - Description param.Field[string] `json:"description"` - Enabled param.Field[interface{}] `json:"enabled"` + Description param.Field[string] `json:"description"` + // Whether the rule should be executed. + Enabled param.Field[bool] `json:"enabled"` ExposedCredentialCheck param.Field[interface{}] `json:"exposed_credential_check"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` diff --git a/rulesets/version.go b/rulesets/version.go index cf6dd23dbd1..f364e81399e 100644 --- a/rulesets/version.go +++ b/rulesets/version.go @@ -15,7 +15,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" - "github.com/cloudflare/cloudflare-go/v3/zones" "github.com/tidwall/gjson" ) @@ -263,8 +262,8 @@ type VersionGetResponseRule struct { Categories interface{} `json:"categories"` // An informative description of the rule. Description string `json:"description"` - // This field can have the runtime type of [bool], [zones.OriginMaxHTTPVersion]. - Enabled interface{} `json:"enabled"` + // Whether the rule should be executed. + Enabled bool `json:"enabled"` // This field can have the runtime type of [BlockRuleExposedCredentialCheck], // [VersionGetResponseRulesRulesetsChallengeRuleExposedCredentialCheck], // [CompressResponseRuleExposedCredentialCheck], diff --git a/shared/union.go b/shared/union.go index 392c8c783ba..12ff1aabc89 100644 --- a/shared/union.go +++ b/shared/union.go @@ -45,28 +45,54 @@ func (UnionString) ImplementsMagicTransitIPSECTunnelNewParamsHealthCheckTargetUn func (UnionString) ImplementsMagicTransitIPSECTunnelUpdateParamsHealthCheckTargetUnion() {} func (UnionString) ImplementsRulesListItemListResponseUnion() {} func (UnionString) ImplementsRulesListItemGetResponseUnion() {} -func (UnionString) ImplementsRadarRankingTimeseriesGroupsResponseSerie0Union() {} -func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} -func (UnionString) ImplementsHostnamesSettingValueUnion() {} -func (UnionString) ImplementsAIGatewayLogListParamsFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayLogDeleteParamsFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayLogEditParamsMetadataUnion() {} -func (UnionString) ImplementsAIGatewayDatasetNewResponseFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayDatasetUpdateResponseFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayDatasetListResponseFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayDatasetDeleteResponseFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayDatasetGetResponseFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayDatasetNewParamsFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayDatasetUpdateParamsFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayEvaluationNewResponseDatasetsFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayEvaluationListResponseDatasetsFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayEvaluationDeleteResponseDatasetsFiltersValueUnion() {} -func (UnionString) ImplementsAIGatewayEvaluationGetResponseDatasetsFiltersValueUnion() {} -func (UnionString) ImplementsWorkflowsInstanceGetResponseOutputUnion() {} -func (UnionString) ImplementsWorkflowsInstanceGetResponseStepsObjectConfigRetriesDelayUnion() {} -func (UnionString) ImplementsWorkflowsInstanceGetResponseStepsObjectConfigTimeoutUnion() {} -func (UnionString) ImplementsAIAIRunResponseUnion() {} -func (UnionString) ImplementsAIAIRunParamsBodyTextEmbeddingsTextUnion() {} +func (UnionString) ImplementsZeroTrustAccessApplicationNewParamsBodySelfHostedApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationNewParamsBodySaaSApplicationPolicyUnion() {} +func (UnionString) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserSSHApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserVNCApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationNewParamsBodyAppLauncherApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationUpdateParamsBodySelfHostedApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationUpdateParamsBodySaaSApplicationPolicyUnion() {} +func (UnionString) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationUpdateParamsBodyAppLauncherApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() { +} +func (UnionString) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() { +} +func (UnionString) ImplementsRadarRankingTimeseriesGroupsResponseSerie0Union() {} +func (UnionString) ImplementsHostnamesSettingValueUnionParam() {} +func (UnionString) ImplementsHostnamesSettingValueUnion() {} +func (UnionString) ImplementsAIGatewayLogListParamsFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayLogDeleteParamsFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayLogEditParamsMetadataUnion() {} +func (UnionString) ImplementsAIGatewayDatasetNewResponseFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayDatasetUpdateResponseFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayDatasetListResponseFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayDatasetDeleteResponseFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayDatasetGetResponseFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayDatasetNewParamsFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayDatasetUpdateParamsFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayEvaluationNewResponseDatasetsFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayEvaluationListResponseDatasetsFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayEvaluationDeleteResponseDatasetsFiltersValueUnion() {} +func (UnionString) ImplementsAIGatewayEvaluationGetResponseDatasetsFiltersValueUnion() {} +func (UnionString) ImplementsWorkflowsInstanceGetResponseOutputUnion() {} +func (UnionString) ImplementsWorkflowsInstanceGetResponseStepsObjectConfigRetriesDelayUnion() {} +func (UnionString) ImplementsWorkflowsInstanceGetResponseStepsObjectConfigTimeoutUnion() {} +func (UnionString) ImplementsAIAIRunResponseUnion() {} +func (UnionString) ImplementsAIAIRunParamsBodyTextEmbeddingsTextUnion() {} type UnionBool bool diff --git a/workers/script.go b/workers/script.go index 8d1d6a1813b..5f23be03245 100644 --- a/workers/script.go +++ b/workers/script.go @@ -21,7 +21,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // ScriptService contains methods and other services that help with interacting @@ -535,8 +534,8 @@ type ScriptUpdateParamsBodyMetadataMetadataBinding struct { Name param.Field[string] `json:"name"` // Type of binding. You can find more about bindings on our docs: // https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. - Type param.Field[string] `json:"type"` - ExtraFields map[string]zones.OriginMaxHTTPVersionParam `json:"-,extras"` + Type param.Field[string] `json:"type"` + ExtraFields map[string]interface{} `json:"-,extras"` } func (r ScriptUpdateParamsBodyMetadataMetadataBinding) MarshalJSON() (data []byte, err error) { diff --git a/workers/script_test.go b/workers/script_test.go index e855b2db04b..6dc2da24977 100644 --- a/workers/script_test.go +++ b/workers/script_test.go @@ -36,8 +36,63 @@ func TestScriptUpdateWithOptionalParams(t *testing.T) { context.TODO(), "this-is_my_script-01", workers.ScriptUpdateParams{ - AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: workers.ScriptUpdateParamsBodyMessage{}, + AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), + Body: workers.ScriptUpdateParamsBodyMetadata{ + Metadata: cloudflare.F(workers.ScriptUpdateParamsBodyMetadataMetadata{ + Assets: cloudflare.F(workers.ScriptUpdateParamsBodyMetadataMetadataAssets{ + Config: cloudflare.F(workers.ScriptUpdateParamsBodyMetadataMetadataAssetsConfig{ + HTMLHandling: cloudflare.F(workers.ScriptUpdateParamsBodyMetadataMetadataAssetsConfigHTMLHandlingAutoTrailingSlash), + NotFoundHandling: cloudflare.F(workers.ScriptUpdateParamsBodyMetadataMetadataAssetsConfigNotFoundHandlingNone), + ServeDirectly: cloudflare.F(true), + }), + JWT: cloudflare.F("jwt"), + }), + Bindings: cloudflare.F([]workers.ScriptUpdateParamsBodyMetadataMetadataBinding{{ + Name: cloudflare.F("MY_ENV_VAR"), + Type: cloudflare.F("plain_text"), + }}), + BodyPart: cloudflare.F("worker.js"), + CompatibilityDate: cloudflare.F("2021-01-01"), + CompatibilityFlags: cloudflare.F([]string{"nodejs_compat"}), + KeepAssets: cloudflare.F(false), + KeepBindings: cloudflare.F([]string{"string"}), + Logpush: cloudflare.F(false), + MainModule: cloudflare.F("worker.js"), + Migrations: cloudflare.F[workers.ScriptUpdateParamsBodyMetadataMetadataMigrationsUnion](workers.SingleStepMigrationParam{ + DeletedClasses: cloudflare.F([]string{"string"}), + NewClasses: cloudflare.F([]string{"string"}), + NewSqliteClasses: cloudflare.F([]string{"string"}), + NewTag: cloudflare.F("v2"), + OldTag: cloudflare.F("v1"), + RenamedClasses: cloudflare.F([]workers.SingleStepMigrationRenamedClassParam{{ + From: cloudflare.F("from"), + To: cloudflare.F("to"), + }}), + TransferredClasses: cloudflare.F([]workers.SingleStepMigrationTransferredClassParam{{ + From: cloudflare.F("from"), + FromScript: cloudflare.F("from_script"), + To: cloudflare.F("to"), + }}), + }), + Observability: cloudflare.F(workers.ScriptUpdateParamsBodyMetadataMetadataObservability{ + Enabled: cloudflare.F(true), + HeadSamplingRate: cloudflare.F(0.100000), + }), + Placement: cloudflare.F(workers.PlacementConfigurationParam{ + Mode: cloudflare.F(workers.PlacementConfigurationModeSmart), + }), + Tags: cloudflare.F([]string{"string"}), + TailConsumers: cloudflare.F([]workers.ConsumerScriptParam{{ + Service: cloudflare.F("my-log-consumer"), + Environment: cloudflare.F("production"), + Namespace: cloudflare.F("my-namespace"), + }}), + UsageModel: cloudflare.F(workers.ScriptUpdateParamsBodyMetadataMetadataUsageModelBundled), + VersionTags: cloudflare.F(map[string]string{ + "foo": "string", + }), + }), + }, RollbackTo: cloudflare.F("f174e90a-fafe-4643-bbbc-4a0ed4fc8415"), }, ) diff --git a/workers_for_platforms/dispatchnamespacescript.go b/workers_for_platforms/dispatchnamespacescript.go index 0d081bad80f..8c91deee916 100644 --- a/workers_for_platforms/dispatchnamespacescript.go +++ b/workers_for_platforms/dispatchnamespacescript.go @@ -21,7 +21,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/shared" "github.com/cloudflare/cloudflare-go/v3/workers" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // DispatchNamespaceScriptService contains methods and other services that help @@ -398,8 +397,8 @@ type DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataBinding struct { Name param.Field[string] `json:"name"` // Type of binding. You can find more about bindings on our docs: // https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. - Type param.Field[string] `json:"type"` - ExtraFields map[string]zones.OriginMaxHTTPVersionParam `json:"-,extras"` + Type param.Field[string] `json:"type"` + ExtraFields map[string]interface{} `json:"-,extras"` } func (r DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataBinding) MarshalJSON() (data []byte, err error) { diff --git a/workers_for_platforms/dispatchnamespacescript_test.go b/workers_for_platforms/dispatchnamespacescript_test.go index 59834837ded..4462d7730d9 100644 --- a/workers_for_platforms/dispatchnamespacescript_test.go +++ b/workers_for_platforms/dispatchnamespacescript_test.go @@ -11,6 +11,7 @@ import ( "github.com/cloudflare/cloudflare-go/v3" "github.com/cloudflare/cloudflare-go/v3/internal/testutil" "github.com/cloudflare/cloudflare-go/v3/option" + "github.com/cloudflare/cloudflare-go/v3/workers" "github.com/cloudflare/cloudflare-go/v3/workers_for_platforms" ) @@ -34,7 +35,62 @@ func TestDispatchNamespaceScriptUpdateWithOptionalParams(t *testing.T) { "this-is_my_script-01", workers_for_platforms.DispatchNamespaceScriptUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), - Body: workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMessage{}, + Body: workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadata{ + Metadata: cloudflare.F(workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadataMetadata{ + Assets: cloudflare.F(workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataAssets{ + Config: cloudflare.F(workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataAssetsConfig{ + HTMLHandling: cloudflare.F(workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataAssetsConfigHTMLHandlingAutoTrailingSlash), + NotFoundHandling: cloudflare.F(workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataAssetsConfigNotFoundHandlingNone), + ServeDirectly: cloudflare.F(true), + }), + JWT: cloudflare.F("jwt"), + }), + Bindings: cloudflare.F([]workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataBinding{{ + Name: cloudflare.F("MY_ENV_VAR"), + Type: cloudflare.F("plain_text"), + }}), + BodyPart: cloudflare.F("worker.js"), + CompatibilityDate: cloudflare.F("2021-01-01"), + CompatibilityFlags: cloudflare.F([]string{"nodejs_compat"}), + KeepAssets: cloudflare.F(false), + KeepBindings: cloudflare.F([]string{"string"}), + Logpush: cloudflare.F(false), + MainModule: cloudflare.F("worker.js"), + Migrations: cloudflare.F[workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataMigrationsUnion](workers.SingleStepMigrationParam{ + DeletedClasses: cloudflare.F([]string{"string"}), + NewClasses: cloudflare.F([]string{"string"}), + NewSqliteClasses: cloudflare.F([]string{"string"}), + NewTag: cloudflare.F("v2"), + OldTag: cloudflare.F("v1"), + RenamedClasses: cloudflare.F([]workers.SingleStepMigrationRenamedClassParam{{ + From: cloudflare.F("from"), + To: cloudflare.F("to"), + }}), + TransferredClasses: cloudflare.F([]workers.SingleStepMigrationTransferredClassParam{{ + From: cloudflare.F("from"), + FromScript: cloudflare.F("from_script"), + To: cloudflare.F("to"), + }}), + }), + Observability: cloudflare.F(workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataObservability{ + Enabled: cloudflare.F(true), + HeadSamplingRate: cloudflare.F(0.100000), + }), + Placement: cloudflare.F(workers.PlacementConfigurationParam{ + Mode: cloudflare.F(workers.PlacementConfigurationModeSmart), + }), + Tags: cloudflare.F([]string{"string"}), + TailConsumers: cloudflare.F([]workers.ConsumerScriptParam{{ + Service: cloudflare.F("my-log-consumer"), + Environment: cloudflare.F("production"), + Namespace: cloudflare.F("my-namespace"), + }}), + UsageModel: cloudflare.F(workers_for_platforms.DispatchNamespaceScriptUpdateParamsBodyMetadataMetadataUsageModelBundled), + VersionTags: cloudflare.F(map[string]string{ + "foo": "string", + }), + }), + }, }, ) if err != nil { diff --git a/zero_trust/accessapplication.go b/zero_trust/accessapplication.go index 1f580fb909b..b56107584c4 100644 --- a/zero_trust/accessapplication.go +++ b/zero_trust/accessapplication.go @@ -20296,7 +20296,7 @@ type AccessApplicationNewParamsBodySelfHostedApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationNewParamsBodySelfHostedApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationNewParamsBodySelfHostedApplicationPolicyUnion] `json:"policies"` // Sets the SameSite cookie setting, which provides increased security against CSRF // attacks. SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` @@ -20358,18 +20358,96 @@ func (r AccessApplicationNewParamsBodySelfHostedApplicationDestinationsType) IsK } // A JSON that links a reusable policy to an application. -type AccessApplicationNewParamsBodySelfHostedApplicationPolicies struct { +type AccessApplicationNewParamsBodySelfHostedApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodySelfHostedApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodySelfHostedApplicationPolicy) ImplementsZeroTrustAccessApplicationNewParamsBodySelfHostedApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationPoliciesObject], +// [AccessApplicationNewParamsBodySelfHostedApplicationPolicy]. +type AccessApplicationNewParamsBodySelfHostedApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationNewParamsBodySelfHostedApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationNewParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` +} + +func (r AccessApplicationNewParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationNewParamsBodySelfHostedApplicationPolicyUnion() { +} + +type AccessApplicationNewParamsBodySelfHostedApplicationPoliciesObject struct { // The UUID of the policy ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` // The order of execution for this policy. Must be unique for each policy within an // app. Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` } -func (r AccessApplicationNewParamsBodySelfHostedApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationNewParamsBodySelfHostedApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationNewParamsBodySelfHostedApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationNewParamsBodySelfHostedApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationNewParamsBodySelfHostedApplicationSCIMConfig struct { @@ -20596,8 +20674,8 @@ type AccessApplicationNewParamsBodySaaSApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationNewParamsBodySaaSApplicationPolicies] `json:"policies"` - SaaSApp param.Field[AccessApplicationNewParamsBodySaaSApplicationSaaSAppUnion] `json:"saas_app"` + Policies param.Field[[]AccessApplicationNewParamsBodySaaSApplicationPolicyUnion] `json:"policies"` + SaaSApp param.Field[AccessApplicationNewParamsBodySaaSApplicationSaaSAppUnion] `json:"saas_app"` // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. SCIMConfig param.Field[AccessApplicationNewParamsBodySaaSApplicationSCIMConfig] `json:"scim_config"` @@ -20616,18 +20694,96 @@ func (r AccessApplicationNewParamsBodySaaSApplication) implementsZeroTrustAccess } // A JSON that links a reusable policy to an application. -type AccessApplicationNewParamsBodySaaSApplicationPolicies struct { +type AccessApplicationNewParamsBodySaaSApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodySaaSApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodySaaSApplicationPolicy) ImplementsZeroTrustAccessApplicationNewParamsBodySaaSApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationNewParamsBodySaaSApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationNewParamsBodySaaSApplicationPoliciesObject], +// [AccessApplicationNewParamsBodySaaSApplicationPolicy]. +type AccessApplicationNewParamsBodySaaSApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationNewParamsBodySaaSApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationNewParamsBodySaaSApplicationPoliciesAccessAppPolicyLink struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` +} + +func (r AccessApplicationNewParamsBodySaaSApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodySaaSApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationNewParamsBodySaaSApplicationPolicyUnion() { +} + +type AccessApplicationNewParamsBodySaaSApplicationPoliciesObject struct { // The UUID of the policy ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` // The order of execution for this policy. Must be unique for each policy within an // app. Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` } -func (r AccessApplicationNewParamsBodySaaSApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationNewParamsBodySaaSApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationNewParamsBodySaaSApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationNewParamsBodySaaSApplicationPolicyUnion() { +} + type AccessApplicationNewParamsBodySaaSApplicationSaaSApp struct { // The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must // be greater than or equal to 1m and less than or equal to 24h. @@ -20974,7 +21130,7 @@ type AccessApplicationNewParamsBodyBrowserSSHApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationNewParamsBodyBrowserSSHApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationNewParamsBodyBrowserSSHApplicationPolicyUnion] `json:"policies"` // Sets the SameSite cookie setting, which provides increased security against CSRF // attacks. SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` @@ -21036,18 +21192,96 @@ func (r AccessApplicationNewParamsBodyBrowserSSHApplicationDestinationsType) IsK } // A JSON that links a reusable policy to an application. -type AccessApplicationNewParamsBodyBrowserSSHApplicationPolicies struct { +type AccessApplicationNewParamsBodyBrowserSSHApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodyBrowserSSHApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyBrowserSSHApplicationPolicy) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserSSHApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationNewParamsBodyBrowserSSHApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationNewParamsBodyBrowserSSHApplicationPoliciesObject], +// [AccessApplicationNewParamsBodyBrowserSSHApplicationPolicy]. +type AccessApplicationNewParamsBodyBrowserSSHApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserSSHApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationNewParamsBodyBrowserSSHApplicationPoliciesAccessAppPolicyLink struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` +} + +func (r AccessApplicationNewParamsBodyBrowserSSHApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyBrowserSSHApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserSSHApplicationPolicyUnion() { +} + +type AccessApplicationNewParamsBodyBrowserSSHApplicationPoliciesObject struct { // The UUID of the policy ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` // The order of execution for this policy. Must be unique for each policy within an // app. Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` } -func (r AccessApplicationNewParamsBodyBrowserSSHApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationNewParamsBodyBrowserSSHApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationNewParamsBodyBrowserSSHApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserSSHApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationNewParamsBodyBrowserSSHApplicationSCIMConfig struct { @@ -21310,7 +21544,7 @@ type AccessApplicationNewParamsBodyBrowserVNCApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationNewParamsBodyBrowserVNCApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationNewParamsBodyBrowserVNCApplicationPolicyUnion] `json:"policies"` // Sets the SameSite cookie setting, which provides increased security against CSRF // attacks. SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` @@ -21372,7 +21606,50 @@ func (r AccessApplicationNewParamsBodyBrowserVNCApplicationDestinationsType) IsK } // A JSON that links a reusable policy to an application. -type AccessApplicationNewParamsBodyBrowserVNCApplicationPolicies struct { +type AccessApplicationNewParamsBodyBrowserVNCApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodyBrowserVNCApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyBrowserVNCApplicationPolicy) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserVNCApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationNewParamsBodyBrowserVNCApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationNewParamsBodyBrowserVNCApplicationPoliciesObject], +// [AccessApplicationNewParamsBodyBrowserVNCApplicationPolicy]. +type AccessApplicationNewParamsBodyBrowserVNCApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserVNCApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationNewParamsBodyBrowserVNCApplicationPoliciesAccessAppPolicyLink struct { // The UUID of the policy ID param.Field[string] `json:"id"` // The order of execution for this policy. Must be unique for each policy within an @@ -21380,10 +21657,45 @@ type AccessApplicationNewParamsBodyBrowserVNCApplicationPolicies struct { Precedence param.Field[int64] `json:"precedence"` } -func (r AccessApplicationNewParamsBodyBrowserVNCApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationNewParamsBodyBrowserVNCApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationNewParamsBodyBrowserVNCApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserVNCApplicationPolicyUnion() { +} + +type AccessApplicationNewParamsBodyBrowserVNCApplicationPoliciesObject struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodyBrowserVNCApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyBrowserVNCApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserVNCApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationNewParamsBodyBrowserVNCApplicationSCIMConfig struct { @@ -21614,7 +21926,7 @@ type AccessApplicationNewParamsBodyAppLauncherApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationNewParamsBodyAppLauncherApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationNewParamsBodyAppLauncherApplicationPolicyUnion] `json:"policies"` // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. SCIMConfig param.Field[AccessApplicationNewParamsBodyAppLauncherApplicationSCIMConfig] `json:"scim_config"` @@ -21663,7 +21975,50 @@ func (r AccessApplicationNewParamsBodyAppLauncherApplicationLandingPageDesign) M } // A JSON that links a reusable policy to an application. -type AccessApplicationNewParamsBodyAppLauncherApplicationPolicies struct { +type AccessApplicationNewParamsBodyAppLauncherApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodyAppLauncherApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyAppLauncherApplicationPolicy) ImplementsZeroTrustAccessApplicationNewParamsBodyAppLauncherApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationNewParamsBodyAppLauncherApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationNewParamsBodyAppLauncherApplicationPoliciesObject], +// [AccessApplicationNewParamsBodyAppLauncherApplicationPolicy]. +type AccessApplicationNewParamsBodyAppLauncherApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationNewParamsBodyAppLauncherApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationNewParamsBodyAppLauncherApplicationPoliciesAccessAppPolicyLink struct { // The UUID of the policy ID param.Field[string] `json:"id"` // The order of execution for this policy. Must be unique for each policy within an @@ -21671,10 +22026,45 @@ type AccessApplicationNewParamsBodyAppLauncherApplicationPolicies struct { Precedence param.Field[int64] `json:"precedence"` } -func (r AccessApplicationNewParamsBodyAppLauncherApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationNewParamsBodyAppLauncherApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationNewParamsBodyAppLauncherApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationNewParamsBodyAppLauncherApplicationPolicyUnion() { +} + +type AccessApplicationNewParamsBodyAppLauncherApplicationPoliciesObject struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodyAppLauncherApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyAppLauncherApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationNewParamsBodyAppLauncherApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationNewParamsBodyAppLauncherApplicationSCIMConfig struct { @@ -21905,7 +22295,7 @@ type AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplication struct // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion] `json:"policies"` // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. SCIMConfig param.Field[AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationSCIMConfig] `json:"scim_config"` @@ -21954,7 +22344,50 @@ func (r AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationLand } // A JSON that links a reusable policy to an application. -type AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicies struct { +type AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicy) ImplementsZeroTrustAccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesObject], +// [AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicy]. +type AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesAccessAppPolicyLink struct { // The UUID of the policy ID param.Field[string] `json:"id"` // The order of execution for this policy. Must be unique for each policy within an @@ -21962,10 +22395,45 @@ type AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicie Precedence param.Field[int64] `json:"precedence"` } -func (r AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() { +} + +type AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesObject struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationNewParamsBodyDeviceEnrollmentPermissionsApplicationSCIMConfig struct { @@ -22196,7 +22664,7 @@ type AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplication struct // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion] `json:"policies"` // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. SCIMConfig param.Field[AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationSCIMConfig] `json:"scim_config"` @@ -22245,18 +22713,96 @@ func (r AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationLand } // A JSON that links a reusable policy to an application. -type AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicies struct { +type AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicy) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPoliciesObject], +// [AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicy]. +type AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPoliciesAccessAppPolicyLink struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` +} + +func (r AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() { +} + +type AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPoliciesObject struct { // The UUID of the policy ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` // The order of execution for this policy. Must be unique for each policy within an // app. Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` } -func (r AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationNewParamsBodyBrowserIsolationPermissionsApplicationSCIMConfig struct { @@ -22971,7 +23517,7 @@ type AccessApplicationUpdateParamsBodySelfHostedApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationUpdateParamsBodySelfHostedApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationUpdateParamsBodySelfHostedApplicationPolicyUnion] `json:"policies"` // Sets the SameSite cookie setting, which provides increased security against CSRF // attacks. SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` @@ -23033,18 +23579,96 @@ func (r AccessApplicationUpdateParamsBodySelfHostedApplicationDestinationsType) } // A JSON that links a reusable policy to an application. -type AccessApplicationUpdateParamsBodySelfHostedApplicationPolicies struct { +type AccessApplicationUpdateParamsBodySelfHostedApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodySelfHostedApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodySelfHostedApplicationPolicy) ImplementsZeroTrustAccessApplicationUpdateParamsBodySelfHostedApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationPoliciesObject], +// [AccessApplicationUpdateParamsBodySelfHostedApplicationPolicy]. +type AccessApplicationUpdateParamsBodySelfHostedApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationUpdateParamsBodySelfHostedApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationUpdateParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` +} + +func (r AccessApplicationUpdateParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationUpdateParamsBodySelfHostedApplicationPolicyUnion() { +} + +type AccessApplicationUpdateParamsBodySelfHostedApplicationPoliciesObject struct { // The UUID of the policy ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` // The order of execution for this policy. Must be unique for each policy within an // app. Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` } -func (r AccessApplicationUpdateParamsBodySelfHostedApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationUpdateParamsBodySelfHostedApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationUpdateParamsBodySelfHostedApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationUpdateParamsBodySelfHostedApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationUpdateParamsBodySelfHostedApplicationSCIMConfig struct { @@ -23271,8 +23895,8 @@ type AccessApplicationUpdateParamsBodySaaSApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationUpdateParamsBodySaaSApplicationPolicies] `json:"policies"` - SaaSApp param.Field[AccessApplicationUpdateParamsBodySaaSApplicationSaaSAppUnion] `json:"saas_app"` + Policies param.Field[[]AccessApplicationUpdateParamsBodySaaSApplicationPolicyUnion] `json:"policies"` + SaaSApp param.Field[AccessApplicationUpdateParamsBodySaaSApplicationSaaSAppUnion] `json:"saas_app"` // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. SCIMConfig param.Field[AccessApplicationUpdateParamsBodySaaSApplicationSCIMConfig] `json:"scim_config"` @@ -23291,18 +23915,96 @@ func (r AccessApplicationUpdateParamsBodySaaSApplication) implementsZeroTrustAcc } // A JSON that links a reusable policy to an application. -type AccessApplicationUpdateParamsBodySaaSApplicationPolicies struct { +type AccessApplicationUpdateParamsBodySaaSApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodySaaSApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodySaaSApplicationPolicy) ImplementsZeroTrustAccessApplicationUpdateParamsBodySaaSApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationUpdateParamsBodySaaSApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationUpdateParamsBodySaaSApplicationPoliciesObject], +// [AccessApplicationUpdateParamsBodySaaSApplicationPolicy]. +type AccessApplicationUpdateParamsBodySaaSApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationUpdateParamsBodySaaSApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationUpdateParamsBodySaaSApplicationPoliciesAccessAppPolicyLink struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` +} + +func (r AccessApplicationUpdateParamsBodySaaSApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodySaaSApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationUpdateParamsBodySaaSApplicationPolicyUnion() { +} + +type AccessApplicationUpdateParamsBodySaaSApplicationPoliciesObject struct { // The UUID of the policy ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` // The order of execution for this policy. Must be unique for each policy within an // app. Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` } -func (r AccessApplicationUpdateParamsBodySaaSApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationUpdateParamsBodySaaSApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationUpdateParamsBodySaaSApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationUpdateParamsBodySaaSApplicationPolicyUnion() { +} + type AccessApplicationUpdateParamsBodySaaSApplicationSaaSApp struct { // The lifetime of the OIDC Access Token after creation. Valid units are m,h. Must // be greater than or equal to 1m and less than or equal to 24h. @@ -23649,7 +24351,7 @@ type AccessApplicationUpdateParamsBodyBrowserSSHApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicyUnion] `json:"policies"` // Sets the SameSite cookie setting, which provides increased security against CSRF // attacks. SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` @@ -23711,18 +24413,96 @@ func (r AccessApplicationUpdateParamsBodyBrowserSSHApplicationDestinationsType) } // A JSON that links a reusable policy to an application. -type AccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicies struct { +type AccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicy) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationUpdateParamsBodyBrowserSSHApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationUpdateParamsBodyBrowserSSHApplicationPoliciesObject], +// [AccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicy]. +type AccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationUpdateParamsBodyBrowserSSHApplicationPoliciesAccessAppPolicyLink struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` +} + +func (r AccessApplicationUpdateParamsBodyBrowserSSHApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyBrowserSSHApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicyUnion() { +} + +type AccessApplicationUpdateParamsBodyBrowserSSHApplicationPoliciesObject struct { // The UUID of the policy ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` // The order of execution for this policy. Must be unique for each policy within an // app. Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` } -func (r AccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationUpdateParamsBodyBrowserSSHApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationUpdateParamsBodyBrowserSSHApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserSSHApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationUpdateParamsBodyBrowserSSHApplicationSCIMConfig struct { @@ -23985,7 +24765,7 @@ type AccessApplicationUpdateParamsBodyBrowserVNCApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicyUnion] `json:"policies"` // Sets the SameSite cookie setting, which provides increased security against CSRF // attacks. SameSiteCookieAttribute param.Field[string] `json:"same_site_cookie_attribute"` @@ -24047,7 +24827,50 @@ func (r AccessApplicationUpdateParamsBodyBrowserVNCApplicationDestinationsType) } // A JSON that links a reusable policy to an application. -type AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicies struct { +type AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicy) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationUpdateParamsBodyBrowserVNCApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationUpdateParamsBodyBrowserVNCApplicationPoliciesObject], +// [AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicy]. +type AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationUpdateParamsBodyBrowserVNCApplicationPoliciesAccessAppPolicyLink struct { // The UUID of the policy ID param.Field[string] `json:"id"` // The order of execution for this policy. Must be unique for each policy within an @@ -24055,10 +24878,45 @@ type AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicies struct { Precedence param.Field[int64] `json:"precedence"` } -func (r AccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationUpdateParamsBodyBrowserVNCApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationUpdateParamsBodyBrowserVNCApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicyUnion() { +} + +type AccessApplicationUpdateParamsBodyBrowserVNCApplicationPoliciesObject struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodyBrowserVNCApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyBrowserVNCApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserVNCApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationUpdateParamsBodyBrowserVNCApplicationSCIMConfig struct { @@ -24289,7 +25147,7 @@ type AccessApplicationUpdateParamsBodyAppLauncherApplication struct { // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicyUnion] `json:"policies"` // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. SCIMConfig param.Field[AccessApplicationUpdateParamsBodyAppLauncherApplicationSCIMConfig] `json:"scim_config"` @@ -24338,7 +25196,50 @@ func (r AccessApplicationUpdateParamsBodyAppLauncherApplicationLandingPageDesign } // A JSON that links a reusable policy to an application. -type AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicies struct { +type AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicy) ImplementsZeroTrustAccessApplicationUpdateParamsBodyAppLauncherApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationUpdateParamsBodyAppLauncherApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationUpdateParamsBodyAppLauncherApplicationPoliciesObject], +// [AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicy]. +type AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationUpdateParamsBodyAppLauncherApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationUpdateParamsBodyAppLauncherApplicationPoliciesAccessAppPolicyLink struct { // The UUID of the policy ID param.Field[string] `json:"id"` // The order of execution for this policy. Must be unique for each policy within an @@ -24346,10 +25247,45 @@ type AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicies struct { Precedence param.Field[int64] `json:"precedence"` } -func (r AccessApplicationUpdateParamsBodyAppLauncherApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationUpdateParamsBodyAppLauncherApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationUpdateParamsBodyAppLauncherApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationUpdateParamsBodyAppLauncherApplicationPolicyUnion() { +} + +type AccessApplicationUpdateParamsBodyAppLauncherApplicationPoliciesObject struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodyAppLauncherApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyAppLauncherApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationUpdateParamsBodyAppLauncherApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationUpdateParamsBodyAppLauncherApplicationSCIMConfig struct { @@ -24580,7 +25516,7 @@ type AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplication str // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion] `json:"policies"` // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. SCIMConfig param.Field[AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationSCIMConfig] `json:"scim_config"` @@ -24629,7 +25565,50 @@ func (r AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationL } // A JSON that links a reusable policy to an application. -type AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicies struct { +type AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicy) ImplementsZeroTrustAccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesObject], +// [AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicy]. +type AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesAccessAppPolicyLink struct { // The UUID of the policy ID param.Field[string] `json:"id"` // The order of execution for this policy. Must be unique for each policy within an @@ -24637,10 +25616,45 @@ type AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPoli Precedence param.Field[int64] `json:"precedence"` } -func (r AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() { +} + +type AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesObject struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationUpdateParamsBodyDeviceEnrollmentPermissionsApplicationSCIMConfig struct { @@ -24871,7 +25885,7 @@ type AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplication str // The policies that Access applies to the application, in ascending order of // precedence. Items can reference existing policies or create new policies // exclusive to the application. - Policies param.Field[[]AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicies] `json:"policies"` + Policies param.Field[[]AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion] `json:"policies"` // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. SCIMConfig param.Field[AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationSCIMConfig] `json:"scim_config"` @@ -24920,18 +25934,96 @@ func (r AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationL } // A JSON that links a reusable policy to an application. -type AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicies struct { +type AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicy struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + ApprovalGroups param.Field[interface{}] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` +} + +func (r AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicy) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicy) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() { +} + +// A JSON that links a reusable policy to an application. +// +// Satisfied by +// [zero_trust.AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPoliciesAccessAppPolicyLink], +// [shared.UnionString], +// [zero_trust.AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPoliciesObject], +// [AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicy]. +type AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion interface { + ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() +} + +// A JSON that links a reusable policy to an application. +type AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPoliciesAccessAppPolicyLink struct { + // The UUID of the policy + ID param.Field[string] `json:"id"` + // The order of execution for this policy. Must be unique for each policy within an + // app. + Precedence param.Field[int64] `json:"precedence"` +} + +func (r AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPoliciesAccessAppPolicyLink) MarshalJSON() (data []byte, err error) { + return apijson.MarshalRoot(r) +} + +func (r AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPoliciesAccessAppPolicyLink) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() { +} + +type AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPoliciesObject struct { // The UUID of the policy ID param.Field[string] `json:"id"` + // Administrators who can approve a temporary authentication request. + ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"` + // Requires the user to request access from an administrator at the start of each + // session. + ApprovalRequired param.Field[bool] `json:"approval_required"` + // Require this application to be served in an isolated browser for users matching + // this policy. 'Client Web Isolation' must be on for the account in order to use + // this feature. + IsolationRequired param.Field[bool] `json:"isolation_required"` // The order of execution for this policy. Must be unique for each policy within an // app. Precedence param.Field[int64] `json:"precedence"` + // A custom message that will appear on the purpose justification screen. + PurposeJustificationPrompt param.Field[string] `json:"purpose_justification_prompt"` + // Require users to enter a justification when they log in to the application. + PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"` + // The amount of time that tokens issued for the application will be valid. Must be + // in the format `300ms` or `2h45m`. Valid time units are: ns, us (or µs), ms, s, + // m, h. + SessionDuration param.Field[string] `json:"session_duration"` } -func (r AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicies) MarshalJSON() (data []byte, err error) { +func (r AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPoliciesObject) MarshalJSON() (data []byte, err error) { return apijson.MarshalRoot(r) } +func (r AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPoliciesObject) ImplementsZeroTrustAccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationPolicyUnion() { +} + // Configuration for provisioning to this application via SCIM. This is currently // in closed beta. type AccessApplicationUpdateParamsBodyBrowserIsolationPermissionsApplicationSCIMConfig struct { diff --git a/zero_trust/accessapplication_test.go b/zero_trust/accessapplication_test.go index dcd124e6148..41c42c7115a 100644 --- a/zero_trust/accessapplication_test.go +++ b/zero_trust/accessapplication_test.go @@ -29,16 +29,58 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) { option.WithAPIEmail("user@example.com"), ) _, err := client.ZeroTrust.Access.Applications.New(context.TODO(), zero_trust.AccessApplicationNewParams{ - Body: zero_trust.AccessApplicationNewParamsBodyBookmarkApplication{ - Domain: cloudflare.F("test.example.com/admin"), - Type: cloudflare.F("self_hosted"), - AppLauncherVisible: cloudflare.F(true), - LogoURL: cloudflare.F("https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg"), - Name: cloudflare.F("Admin Site"), - SCIMConfig: cloudflare.F(zero_trust.AccessApplicationNewParamsBodyBookmarkApplicationSCIMConfig{ + Body: zero_trust.AccessApplicationNewParamsBodySelfHostedApplication{ + Domain: cloudflare.F("test.example.com/admin"), + Type: cloudflare.F("self_hosted"), + AllowAuthenticateViaWARP: cloudflare.F(true), + AllowedIdPs: cloudflare.F([]zero_trust.AllowedIdPsParam{"699d98642c564d2e855e9661899b7252"}), + AppLauncherVisible: cloudflare.F(true), + AutoRedirectToIdentity: cloudflare.F(true), + CORSHeaders: cloudflare.F(zero_trust.CORSHeadersParam{ + AllowAllHeaders: cloudflare.F(true), + AllowAllMethods: cloudflare.F(true), + AllowAllOrigins: cloudflare.F(true), + AllowCredentials: cloudflare.F(true), + AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadersParam{"string"}), + AllowedMethods: cloudflare.F([]zero_trust.AllowedMethods{zero_trust.AllowedMethodsGet}), + AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginsParam{"https://example.com"}), + MaxAge: cloudflare.F(-1.000000), + }), + CustomDenyMessage: cloudflare.F("custom_deny_message"), + CustomDenyURL: cloudflare.F("custom_deny_url"), + CustomNonIdentityDenyURL: cloudflare.F("custom_non_identity_deny_url"), + CustomPages: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252"}), + Destinations: cloudflare.F([]zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationDestination{{ + Type: cloudflare.F(zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("test.example.com/admin"), + }, { + Type: cloudflare.F(zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("test.anotherexample.com/staff"), + }, { + Type: cloudflare.F(zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("10.5.0.2"), + }, { + Type: cloudflare.F(zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("10.5.0.3/32:1234-4321"), + }, { + Type: cloudflare.F(zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("private-sni.example.com"), + }}), + EnableBindingCookie: cloudflare.F(true), + HTTPOnlyCookieAttribute: cloudflare.F(true), + LogoURL: cloudflare.F("https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg"), + Name: cloudflare.F("Admin Site"), + OptionsPreflightBypass: cloudflare.F(true), + PathCookieAttribute: cloudflare.F(true), + Policies: cloudflare.F([]zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationPolicyUnion{zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink{ + ID: cloudflare.F("f174e90a-fafe-4643-bbbc-4a0ed4fc8415"), + Precedence: cloudflare.F(int64(0)), + }}), + SameSiteCookieAttribute: cloudflare.F("strict"), + SCIMConfig: cloudflare.F(zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationSCIMConfig{ IdPUID: cloudflare.F("idp_uid"), RemoteURI: cloudflare.F("remote_uri"), - Authentication: cloudflare.F[zero_trust.AccessApplicationNewParamsBodyBookmarkApplicationSCIMConfigAuthenticationUnion](zero_trust.SCIMConfigAuthenticationHTTPBasicParam{ + Authentication: cloudflare.F[zero_trust.AccessApplicationNewParamsBodySelfHostedApplicationSCIMConfigAuthenticationUnion](zero_trust.SCIMConfigAuthenticationHTTPBasicParam{ Password: cloudflare.F("password"), Scheme: cloudflare.F(zero_trust.SCIMConfigAuthenticationHTTPBasicSchemeHttpbasic), User: cloudflare.F("user"), @@ -58,7 +100,11 @@ func TestAccessApplicationNewWithOptionalParams(t *testing.T) { TransformJsonata: cloudflare.F("$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])"), }}), }), - Tags: cloudflare.F([]string{"engineers"}), + SelfHostedDomains: cloudflare.F([]zero_trust.SelfHostedDomainsParam{"test.example.com/admin", "test.anotherexample.com/staff"}), + ServiceAuth401Redirect: cloudflare.F(true), + SessionDuration: cloudflare.F("24h"), + SkipInterstitial: cloudflare.F(true), + Tags: cloudflare.F([]string{"engineers"}), }, AccountID: cloudflare.F("account_id"), }) @@ -89,16 +135,58 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { context.TODO(), "023e105f4ecef8ad9ca31a8372d0c353", zero_trust.AccessApplicationUpdateParams{ - Body: zero_trust.AccessApplicationUpdateParamsBodyBookmarkApplication{ - Domain: cloudflare.F("test.example.com/admin"), - Type: cloudflare.F("self_hosted"), - AppLauncherVisible: cloudflare.F(true), - LogoURL: cloudflare.F("https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg"), - Name: cloudflare.F("Admin Site"), - SCIMConfig: cloudflare.F(zero_trust.AccessApplicationUpdateParamsBodyBookmarkApplicationSCIMConfig{ + Body: zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplication{ + Domain: cloudflare.F("test.example.com/admin"), + Type: cloudflare.F("self_hosted"), + AllowAuthenticateViaWARP: cloudflare.F(true), + AllowedIdPs: cloudflare.F([]zero_trust.AllowedIdPsParam{"699d98642c564d2e855e9661899b7252"}), + AppLauncherVisible: cloudflare.F(true), + AutoRedirectToIdentity: cloudflare.F(true), + CORSHeaders: cloudflare.F(zero_trust.CORSHeadersParam{ + AllowAllHeaders: cloudflare.F(true), + AllowAllMethods: cloudflare.F(true), + AllowAllOrigins: cloudflare.F(true), + AllowCredentials: cloudflare.F(true), + AllowedHeaders: cloudflare.F([]zero_trust.AllowedHeadersParam{"string"}), + AllowedMethods: cloudflare.F([]zero_trust.AllowedMethods{zero_trust.AllowedMethodsGet}), + AllowedOrigins: cloudflare.F([]zero_trust.AllowedOriginsParam{"https://example.com"}), + MaxAge: cloudflare.F(-1.000000), + }), + CustomDenyMessage: cloudflare.F("custom_deny_message"), + CustomDenyURL: cloudflare.F("custom_deny_url"), + CustomNonIdentityDenyURL: cloudflare.F("custom_non_identity_deny_url"), + CustomPages: cloudflare.F([]string{"699d98642c564d2e855e9661899b7252"}), + Destinations: cloudflare.F([]zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationDestination{{ + Type: cloudflare.F(zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("test.example.com/admin"), + }, { + Type: cloudflare.F(zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("test.anotherexample.com/staff"), + }, { + Type: cloudflare.F(zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("10.5.0.2"), + }, { + Type: cloudflare.F(zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("10.5.0.3/32:1234-4321"), + }, { + Type: cloudflare.F(zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationDestinationsTypePublic), + URI: cloudflare.F("private-sni.example.com"), + }}), + EnableBindingCookie: cloudflare.F(true), + HTTPOnlyCookieAttribute: cloudflare.F(true), + LogoURL: cloudflare.F("https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg"), + Name: cloudflare.F("Admin Site"), + OptionsPreflightBypass: cloudflare.F(true), + PathCookieAttribute: cloudflare.F(true), + Policies: cloudflare.F([]zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationPolicyUnion{zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationPoliciesAccessAppPolicyLink{ + ID: cloudflare.F("f174e90a-fafe-4643-bbbc-4a0ed4fc8415"), + Precedence: cloudflare.F(int64(0)), + }}), + SameSiteCookieAttribute: cloudflare.F("strict"), + SCIMConfig: cloudflare.F(zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationSCIMConfig{ IdPUID: cloudflare.F("idp_uid"), RemoteURI: cloudflare.F("remote_uri"), - Authentication: cloudflare.F[zero_trust.AccessApplicationUpdateParamsBodyBookmarkApplicationSCIMConfigAuthenticationUnion](zero_trust.SCIMConfigAuthenticationHTTPBasicParam{ + Authentication: cloudflare.F[zero_trust.AccessApplicationUpdateParamsBodySelfHostedApplicationSCIMConfigAuthenticationUnion](zero_trust.SCIMConfigAuthenticationHTTPBasicParam{ Password: cloudflare.F("password"), Scheme: cloudflare.F(zero_trust.SCIMConfigAuthenticationHTTPBasicSchemeHttpbasic), User: cloudflare.F("user"), @@ -118,7 +206,11 @@ func TestAccessApplicationUpdateWithOptionalParams(t *testing.T) { TransformJsonata: cloudflare.F("$merge([$, {'userName': $substringBefore($.userName, '@') & '+test@' & $substringAfter($.userName, '@')}])"), }}), }), - Tags: cloudflare.F([]string{"engineers"}), + SelfHostedDomains: cloudflare.F([]zero_trust.SelfHostedDomainsParam{"test.example.com/admin", "test.anotherexample.com/staff"}), + ServiceAuth401Redirect: cloudflare.F(true), + SessionDuration: cloudflare.F("24h"), + SkipInterstitial: cloudflare.F(true), + Tags: cloudflare.F([]string{"engineers"}), }, AccountID: cloudflare.F("account_id"), }, diff --git a/zero_trust/dlpemailrule.go b/zero_trust/dlpemailrule.go index 8bce4745dde..30a1557602b 100644 --- a/zero_trust/dlpemailrule.go +++ b/zero_trust/dlpemailrule.go @@ -15,7 +15,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // DLPEmailRuleService contains methods and other services that help with @@ -239,7 +238,7 @@ func (r DLPEmailRuleNewResponseActionAction) IsKnown() bool { type DLPEmailRuleNewResponseCondition struct { Operator DLPEmailRuleNewResponseConditionsOperator `json:"operator,required"` Selector DLPEmailRuleNewResponseConditionsSelector `json:"selector,required"` - Value zones.OriginMaxHTTPVersion `json:"value,required"` + Value interface{} `json:"value,required"` JSON dlpEmailRuleNewResponseConditionJSON `json:"-"` } @@ -372,7 +371,7 @@ func (r DLPEmailRuleUpdateResponseActionAction) IsKnown() bool { type DLPEmailRuleUpdateResponseCondition struct { Operator DLPEmailRuleUpdateResponseConditionsOperator `json:"operator,required"` Selector DLPEmailRuleUpdateResponseConditionsSelector `json:"selector,required"` - Value zones.OriginMaxHTTPVersion `json:"value,required"` + Value interface{} `json:"value,required"` JSON dlpEmailRuleUpdateResponseConditionJSON `json:"-"` } @@ -505,7 +504,7 @@ func (r DLPEmailRuleListResponseActionAction) IsKnown() bool { type DLPEmailRuleListResponseCondition struct { Operator DLPEmailRuleListResponseConditionsOperator `json:"operator,required"` Selector DLPEmailRuleListResponseConditionsSelector `json:"selector,required"` - Value zones.OriginMaxHTTPVersion `json:"value,required"` + Value interface{} `json:"value,required"` JSON dlpEmailRuleListResponseConditionJSON `json:"-"` } @@ -638,7 +637,7 @@ func (r DLPEmailRuleDeleteResponseActionAction) IsKnown() bool { type DLPEmailRuleDeleteResponseCondition struct { Operator DLPEmailRuleDeleteResponseConditionsOperator `json:"operator,required"` Selector DLPEmailRuleDeleteResponseConditionsSelector `json:"selector,required"` - Value zones.OriginMaxHTTPVersion `json:"value,required"` + Value interface{} `json:"value,required"` JSON dlpEmailRuleDeleteResponseConditionJSON `json:"-"` } @@ -771,7 +770,7 @@ func (r DLPEmailRuleBulkEditResponseActionAction) IsKnown() bool { type DLPEmailRuleBulkEditResponseCondition struct { Operator DLPEmailRuleBulkEditResponseConditionsOperator `json:"operator,required"` Selector DLPEmailRuleBulkEditResponseConditionsSelector `json:"selector,required"` - Value zones.OriginMaxHTTPVersion `json:"value,required"` + Value interface{} `json:"value,required"` JSON dlpEmailRuleBulkEditResponseConditionJSON `json:"-"` } @@ -904,7 +903,7 @@ func (r DLPEmailRuleGetResponseActionAction) IsKnown() bool { type DLPEmailRuleGetResponseCondition struct { Operator DLPEmailRuleGetResponseConditionsOperator `json:"operator,required"` Selector DLPEmailRuleGetResponseConditionsSelector `json:"selector,required"` - Value zones.OriginMaxHTTPVersion `json:"value,required"` + Value interface{} `json:"value,required"` JSON dlpEmailRuleGetResponseConditionJSON `json:"-"` } @@ -999,7 +998,7 @@ func (r DLPEmailRuleNewParamsActionAction) IsKnown() bool { type DLPEmailRuleNewParamsCondition struct { Operator param.Field[DLPEmailRuleNewParamsConditionsOperator] `json:"operator,required"` Selector param.Field[DLPEmailRuleNewParamsConditionsSelector] `json:"selector,required"` - Value param.Field[zones.OriginMaxHTTPVersionParam] `json:"value,required"` + Value param.Field[interface{}] `json:"value,required"` } func (r DLPEmailRuleNewParamsCondition) MarshalJSON() (data []byte, err error) { @@ -1122,7 +1121,7 @@ func (r DLPEmailRuleUpdateParamsActionAction) IsKnown() bool { type DLPEmailRuleUpdateParamsCondition struct { Operator param.Field[DLPEmailRuleUpdateParamsConditionsOperator] `json:"operator,required"` Selector param.Field[DLPEmailRuleUpdateParamsConditionsSelector] `json:"selector,required"` - Value param.Field[zones.OriginMaxHTTPVersionParam] `json:"value,required"` + Value param.Field[interface{}] `json:"value,required"` } func (r DLPEmailRuleUpdateParamsCondition) MarshalJSON() (data []byte, err error) { diff --git a/zero_trust/dlpentry.go b/zero_trust/dlpentry.go index 0f41a89c4e0..8f8b459aa51 100644 --- a/zero_trust/dlpentry.go +++ b/zero_trust/dlpentry.go @@ -16,7 +16,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" "github.com/tidwall/gjson" ) @@ -192,8 +191,8 @@ type DLPEntryUpdateResponse struct { 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 [zones.OriginMaxHTTPVersion]. - WordList zones.OriginMaxHTTPVersion `json:"word_list"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` JSON dlpEntryUpdateResponseJSON `json:"-"` union DLPEntryUpdateResponseUnion } @@ -505,7 +504,7 @@ type DLPEntryUpdateResponseWordListEntry struct { Name string `json:"name,required"` Type DLPEntryUpdateResponseWordListEntryType `json:"type,required"` UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList zones.OriginMaxHTTPVersion `json:"word_list,required"` + WordList interface{} `json:"word_list,required"` ProfileID string `json:"profile_id,nullable" format:"uuid"` JSON dlpEntryUpdateResponseWordListEntryJSON `json:"-"` } @@ -580,9 +579,9 @@ type DLPEntryListResponse struct { 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 [zones.OriginMaxHTTPVersion]. - WordList zones.OriginMaxHTTPVersion `json:"word_list"` - JSON dlpEntryListResponseJSON `json:"-"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpEntryListResponseJSON `json:"-"` union DLPEntryListResponseUnion } @@ -893,7 +892,7 @@ type DLPEntryListResponseWordListEntry struct { Name string `json:"name,required"` Type DLPEntryListResponseWordListEntryType `json:"type,required"` UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList zones.OriginMaxHTTPVersion `json:"word_list,required"` + WordList interface{} `json:"word_list,required"` ProfileID string `json:"profile_id,nullable" format:"uuid"` JSON dlpEntryListResponseWordListEntryJSON `json:"-"` } @@ -970,9 +969,9 @@ type DLPEntryGetResponse struct { 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 [zones.OriginMaxHTTPVersion]. - WordList zones.OriginMaxHTTPVersion `json:"word_list"` - JSON dlpEntryGetResponseJSON `json:"-"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` + JSON dlpEntryGetResponseJSON `json:"-"` union DLPEntryGetResponseUnion } @@ -1283,7 +1282,7 @@ type DLPEntryGetResponseWordListEntry struct { Name string `json:"name,required"` Type DLPEntryGetResponseWordListEntryType `json:"type,required"` UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList zones.OriginMaxHTTPVersion `json:"word_list,required"` + WordList interface{} `json:"word_list,required"` ProfileID string `json:"profile_id,nullable" format:"uuid"` JSON dlpEntryGetResponseWordListEntryJSON `json:"-"` } diff --git a/zero_trust/dlpprofile.go b/zero_trust/dlpprofile.go index abd40155d79..34a7467e885 100644 --- a/zero_trust/dlpprofile.go +++ b/zero_trust/dlpprofile.go @@ -18,7 +18,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/packages/pagination" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" "github.com/tidwall/gjson" ) @@ -292,8 +291,8 @@ type ProfileCustomProfileEntry struct { 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 [zones.OriginMaxHTTPVersion]. - WordList zones.OriginMaxHTTPVersion `json:"word_list"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` JSON profileCustomProfileEntryJSON `json:"-"` union ProfileCustomProfileEntriesUnion } @@ -605,7 +604,7 @@ type ProfileCustomProfileEntriesWordListEntry struct { Name string `json:"name,required"` Type ProfileCustomProfileEntriesWordListEntryType `json:"type,required"` UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList zones.OriginMaxHTTPVersion `json:"word_list,required"` + WordList interface{} `json:"word_list,required"` ProfileID string `json:"profile_id,nullable" format:"uuid"` JSON profileCustomProfileEntriesWordListEntryJSON `json:"-"` } @@ -755,8 +754,8 @@ type ProfilePredefinedProfileEntry struct { 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 [zones.OriginMaxHTTPVersion]. - WordList zones.OriginMaxHTTPVersion `json:"word_list"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` JSON profilePredefinedProfileEntryJSON `json:"-"` union ProfilePredefinedProfileEntriesUnion } @@ -1073,7 +1072,7 @@ type ProfilePredefinedProfileEntriesWordListEntry struct { Name string `json:"name,required"` Type ProfilePredefinedProfileEntriesWordListEntryType `json:"type,required"` UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList zones.OriginMaxHTTPVersion `json:"word_list,required"` + WordList interface{} `json:"word_list,required"` ProfileID string `json:"profile_id,nullable" format:"uuid"` JSON profilePredefinedProfileEntriesWordListEntryJSON `json:"-"` } @@ -1216,8 +1215,8 @@ type ProfileIntegrationProfileEntry struct { 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 [zones.OriginMaxHTTPVersion]. - WordList zones.OriginMaxHTTPVersion `json:"word_list"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` JSON profileIntegrationProfileEntryJSON `json:"-"` union ProfileIntegrationProfileEntriesUnion } @@ -1534,7 +1533,7 @@ type ProfileIntegrationProfileEntriesWordListEntry struct { Name string `json:"name,required"` Type ProfileIntegrationProfileEntriesWordListEntryType `json:"type,required"` UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList zones.OriginMaxHTTPVersion `json:"word_list,required"` + WordList interface{} `json:"word_list,required"` ProfileID string `json:"profile_id,nullable" format:"uuid"` JSON profileIntegrationProfileEntriesWordListEntryJSON `json:"-"` } diff --git a/zero_trust/dlpprofilecustom.go b/zero_trust/dlpprofilecustom.go index 1209a50272e..cd0f09b9fa2 100644 --- a/zero_trust/dlpprofilecustom.go +++ b/zero_trust/dlpprofilecustom.go @@ -15,7 +15,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" "github.com/tidwall/gjson" ) @@ -259,8 +258,8 @@ type DLPProfileCustomNewResponseCustomProfileEntry struct { 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 [zones.OriginMaxHTTPVersion]. - WordList zones.OriginMaxHTTPVersion `json:"word_list"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` JSON dlpProfileCustomNewResponseCustomProfileEntryJSON `json:"-"` union DLPProfileCustomNewResponseCustomProfileEntriesUnion } @@ -582,7 +581,7 @@ type DLPProfileCustomNewResponseCustomProfileEntriesWordListEntry struct { Name string `json:"name,required"` Type DLPProfileCustomNewResponseCustomProfileEntriesWordListEntryType `json:"type,required"` UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList zones.OriginMaxHTTPVersion `json:"word_list,required"` + WordList interface{} `json:"word_list,required"` ProfileID string `json:"profile_id,nullable" format:"uuid"` JSON dlpProfileCustomNewResponseCustomProfileEntriesWordListEntryJSON `json:"-"` } @@ -735,8 +734,8 @@ type DLPProfileCustomNewResponsePredefinedProfileEntry struct { 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 [zones.OriginMaxHTTPVersion]. - WordList zones.OriginMaxHTTPVersion `json:"word_list"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` JSON dlpProfileCustomNewResponsePredefinedProfileEntryJSON `json:"-"` union DLPProfileCustomNewResponsePredefinedProfileEntriesUnion } @@ -1059,7 +1058,7 @@ type DLPProfileCustomNewResponsePredefinedProfileEntriesWordListEntry struct { Name string `json:"name,required"` Type DLPProfileCustomNewResponsePredefinedProfileEntriesWordListEntryType `json:"type,required"` UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList zones.OriginMaxHTTPVersion `json:"word_list,required"` + WordList interface{} `json:"word_list,required"` ProfileID string `json:"profile_id,nullable" format:"uuid"` JSON dlpProfileCustomNewResponsePredefinedProfileEntriesWordListEntryJSON `json:"-"` } @@ -1204,8 +1203,8 @@ type DLPProfileCustomNewResponseIntegrationProfileEntry struct { 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 [zones.OriginMaxHTTPVersion]. - WordList zones.OriginMaxHTTPVersion `json:"word_list"` + // This field can have the runtime type of [interface{}]. + WordList interface{} `json:"word_list"` JSON dlpProfileCustomNewResponseIntegrationProfileEntryJSON `json:"-"` union DLPProfileCustomNewResponseIntegrationProfileEntriesUnion } @@ -1528,7 +1527,7 @@ type DLPProfileCustomNewResponseIntegrationProfileEntriesWordListEntry struct { Name string `json:"name,required"` Type DLPProfileCustomNewResponseIntegrationProfileEntriesWordListEntryType `json:"type,required"` UpdatedAt time.Time `json:"updated_at,required" format:"date-time"` - WordList zones.OriginMaxHTTPVersion `json:"word_list,required"` + WordList interface{} `json:"word_list,required"` ProfileID string `json:"profile_id,nullable" format:"uuid"` JSON dlpProfileCustomNewResponseIntegrationProfileEntriesWordListEntryJSON `json:"-"` } diff --git a/zero_trust/riskscoring.go b/zero_trust/riskscoring.go index acb3a3e0a34..61742cae231 100644 --- a/zero_trust/riskscoring.go +++ b/zero_trust/riskscoring.go @@ -14,7 +14,6 @@ import ( "github.com/cloudflare/cloudflare-go/v3/internal/requestconfig" "github.com/cloudflare/cloudflare-go/v3/option" "github.com/cloudflare/cloudflare-go/v3/shared" - "github.com/cloudflare/cloudflare-go/v3/zones" ) // RiskScoringService contains methods and other services that help with @@ -118,7 +117,7 @@ type RiskScoringGetResponseEvent struct { Name string `json:"name,required"` RiskLevel RiskScoringGetResponseEventsRiskLevel `json:"risk_level,required"` Timestamp time.Time `json:"timestamp,required" format:"date-time"` - EventDetails zones.OriginMaxHTTPVersion `json:"event_details"` + EventDetails interface{} `json:"event_details"` JSON riskScoringGetResponseEventJSON `json:"-"` } diff --git a/zones/setting.go b/zones/setting.go index e746b996647..03bc081da27 100644 --- a/zones/setting.go +++ b/zones/setting.go @@ -2662,8 +2662,6 @@ func (r OriginErrorPagePassThruParam) ImplementsPageRulesPageRuleUpdateParamsAct func (r OriginErrorPagePassThruParam) ImplementsPageRulesPageRuleEditParamsActionUnion() {} -type OriginMaxHTTPVersion = interface{} - type Polish struct { // Apply options from the Polish feature of the Cloudflare Speed app. ID PolishID `json:"id"`