diff --git a/accounts/role.go b/accounts/role.go
index bafaf1f31e6..9d61010a1ce 100644
--- a/accounts/role.go
+++ b/accounts/role.go
@@ -13,6 +13,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/internal/requestconfig"
"github.com/cloudflare/cloudflare-go/v2/internal/shared"
"github.com/cloudflare/cloudflare-go/v2/option"
+ "github.com/cloudflare/cloudflare-go/v2/user"
)
// RoleService contains methods and other services that help with interacting with
@@ -107,8 +108,8 @@ type Role struct {
// Role Name.
Name string `json:"name,required"`
// Access permissions for this User.
- Permissions []string `json:"permissions,required"`
- JSON roleJSON `json:"-"`
+ Permissions []user.PermissionItem `json:"permissions,required"`
+ JSON roleJSON `json:"-"`
}
// roleJSON contains the JSON metadata for the struct [Role]
diff --git a/api.md b/api.md
index 0800d5f21a4..3dc1eb14821 100644
--- a/api.md
+++ b/api.md
@@ -260,15 +260,15 @@ Methods:
Response Types:
+- user.Subscription
- user.SubscriptionDeleteResponse
-- user.SubscriptionGetResponse
Methods:
- client.User.Subscriptions.Update(ctx context.Context, identifier string, body user.SubscriptionUpdateParams) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
- client.User.Subscriptions.Delete(ctx context.Context, identifier string, body user.SubscriptionDeleteParams) (user.SubscriptionDeleteResponse, error)
- client.User.Subscriptions.Edit(ctx context.Context, identifier string, body user.SubscriptionEditParams) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
-- client.User.Subscriptions.Get(ctx context.Context) ([]user.SubscriptionGetResponse, error)
+- client.User.Subscriptions.Get(ctx context.Context) ([]user.Subscription, error)
## Tokens
@@ -303,6 +303,7 @@ Params Types:
Response Types:
- user.Permission
+- user.PermissionItem
- user.TokenPermissionGroupListResponse
Methods:
@@ -991,14 +992,10 @@ Methods:
## Subscriptions
-Response Types:
-
-- zones.SubscriptionListResponse
-
Methods:
- client.Zones.Subscriptions.New(ctx context.Context, identifier string, body zones.SubscriptionNewParams) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
-- client.Zones.Subscriptions.List(ctx context.Context, accountIdentifier string) (pagination.SinglePage[zones.SubscriptionListResponse], error)
+- client.Zones.Subscriptions.List(ctx context.Context, accountIdentifier string) (pagination.SinglePage[user.Subscription], error)
- client.Zones.Subscriptions.Get(ctx context.Context, identifier string) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
# LoadBalancers
@@ -1014,7 +1011,6 @@ Params Types:
- load_balancers.LoadSheddingParam
- load_balancers.LocationStrategyParam
- load_balancers.NotificationFilterParam
-- load_balancers.OriginParam
- load_balancers.OriginItemParam
- load_balancers.OriginSteeringParam
- load_balancers.RandomSteeringParam
@@ -1033,7 +1029,6 @@ Response Types:
- load_balancers.LoadShedding
- load_balancers.LocationStrategy
- load_balancers.NotificationFilter
-- load_balancers.Origin
- load_balancers.OriginItem
- load_balancers.OriginSteering
- load_balancers.RandomSteering
@@ -1299,14 +1294,13 @@ Methods:
Response Types:
-- subscriptions.SubscriptionListResponse
- subscriptions.SubscriptionDeleteResponse
Methods:
- client.Subscriptions.New(ctx context.Context, identifier string, body subscriptions.SubscriptionNewParams) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
- client.Subscriptions.Update(ctx context.Context, accountIdentifier string, subscriptionIdentifier string, body subscriptions.SubscriptionUpdateParams) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
-- client.Subscriptions.List(ctx context.Context, accountIdentifier string) (pagination.SinglePage[subscriptions.SubscriptionListResponse], error)
+- client.Subscriptions.List(ctx context.Context, accountIdentifier string) (pagination.SinglePage[user.Subscription], error)
- client.Subscriptions.Delete(ctx context.Context, accountIdentifier string, subscriptionIdentifier string, body subscriptions.SubscriptionDeleteParams) (subscriptions.SubscriptionDeleteResponse, error)
- client.Subscriptions.Get(ctx context.Context, identifier string) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
@@ -1356,11 +1350,11 @@ Methods:
Response Types:
- rate_plans.Component
-- rate_plans.RatePlanGetResponse
+- rate_plans.RatePlan
Methods:
-- client.RatePlans.Get(ctx context.Context, zoneIdentifier string) ([]rate_plans.RatePlanGetResponse, error)
+- client.RatePlans.Get(ctx context.Context, zoneIdentifier string) ([]rate_plans.RatePlan, error)
# CertificateAuthorities
@@ -1430,22 +1424,19 @@ Params Types:
Response Types:
+- custom_hostnames.CustomHostname
- custom_hostnames.SSL
- custom_hostnames.UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1
- custom_hostnames.UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510
- custom_hostnames.UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1
-- custom_hostnames.CustomHostnameNewResponse
-- custom_hostnames.CustomHostnameListResponse
-- custom_hostnames.CustomHostnameEditResponse
-- custom_hostnames.CustomHostnameGetResponse
Methods:
-- client.CustomHostnames.New(ctx context.Context, params custom_hostnames.CustomHostnameNewParams) (custom_hostnames.CustomHostnameNewResponse, error)
-- client.CustomHostnames.List(ctx context.Context, params custom_hostnames.CustomHostnameListParams) (pagination.V4PagePaginationArray[custom_hostnames.CustomHostnameListResponse], error)
+- client.CustomHostnames.New(ctx context.Context, params custom_hostnames.CustomHostnameNewParams) (custom_hostnames.CustomHostname, error)
+- client.CustomHostnames.List(ctx context.Context, params custom_hostnames.CustomHostnameListParams) (pagination.V4PagePaginationArray[custom_hostnames.CustomHostname], error)
- client.CustomHostnames.Delete(ctx context.Context, customHostnameID string, params custom_hostnames.CustomHostnameDeleteParams) (shared.UnnamedSchemaRef8900f4cb9dca9b9ed0ac41ad571e6837, error)
-- client.CustomHostnames.Edit(ctx context.Context, customHostnameID string, params custom_hostnames.CustomHostnameEditParams) (custom_hostnames.CustomHostnameEditResponse, error)
-- client.CustomHostnames.Get(ctx context.Context, customHostnameID string, query custom_hostnames.CustomHostnameGetParams) (custom_hostnames.CustomHostnameGetResponse, error)
+- client.CustomHostnames.Edit(ctx context.Context, customHostnameID string, params custom_hostnames.CustomHostnameEditParams) (custom_hostnames.CustomHostname, error)
+- client.CustomHostnames.Get(ctx context.Context, customHostnameID string, query custom_hostnames.CustomHostnameGetParams) (custom_hostnames.CustomHostname, error)
## FallbackOrigin
@@ -1642,15 +1633,14 @@ Response Types:
- email_routing.EmailRule
- email_routing.Matcher
- email_routing.MatcherItem
-- email_routing.Properties
Methods:
-- client.EmailRouting.Rules.New(ctx context.Context, zoneIdentifier string, body email_routing.RuleNewParams) (email_routing.Properties, error)
-- client.EmailRouting.Rules.Update(ctx context.Context, zoneIdentifier string, ruleIdentifier string, body email_routing.RuleUpdateParams) (email_routing.Properties, error)
-- client.EmailRouting.Rules.List(ctx context.Context, zoneIdentifier string, query email_routing.RuleListParams) (pagination.V4PagePaginationArray[email_routing.Properties], error)
-- client.EmailRouting.Rules.Delete(ctx context.Context, zoneIdentifier string, ruleIdentifier string) (email_routing.Properties, error)
-- client.EmailRouting.Rules.Get(ctx context.Context, zoneIdentifier string, ruleIdentifier string) (email_routing.Properties, error)
+- client.EmailRouting.Rules.New(ctx context.Context, zoneIdentifier string, body email_routing.RuleNewParams) (email_routing.EmailRule, error)
+- client.EmailRouting.Rules.Update(ctx context.Context, zoneIdentifier string, ruleIdentifier string, body email_routing.RuleUpdateParams) (email_routing.EmailRule, error)
+- client.EmailRouting.Rules.List(ctx context.Context, zoneIdentifier string, query email_routing.RuleListParams) (pagination.V4PagePaginationArray[email_routing.EmailRule], error)
+- client.EmailRouting.Rules.Delete(ctx context.Context, zoneIdentifier string, ruleIdentifier string) (email_routing.EmailRule, error)
+- client.EmailRouting.Rules.Get(ctx context.Context, zoneIdentifier string, ruleIdentifier string) (email_routing.EmailRule, error)
### CatchAlls
@@ -1674,14 +1664,14 @@ Methods:
Response Types:
-- email_routing.DestinationAddress
+- email_routing.Address
Methods:
-- client.EmailRouting.Addresses.New(ctx context.Context, accountIdentifier string, body email_routing.AddressNewParams) (email_routing.DestinationAddress, error)
-- client.EmailRouting.Addresses.List(ctx context.Context, accountIdentifier string, query email_routing.AddressListParams) (pagination.V4PagePaginationArray[email_routing.DestinationAddress], error)
-- client.EmailRouting.Addresses.Delete(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string) (email_routing.DestinationAddress, error)
-- client.EmailRouting.Addresses.Get(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string) (email_routing.DestinationAddress, error)
+- client.EmailRouting.Addresses.New(ctx context.Context, accountIdentifier string, body email_routing.AddressNewParams) (email_routing.Address, error)
+- client.EmailRouting.Addresses.List(ctx context.Context, accountIdentifier string, query email_routing.AddressListParams) (pagination.V4PagePaginationArray[email_routing.Address], error)
+- client.EmailRouting.Addresses.Delete(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string) (email_routing.Address, error)
+- client.EmailRouting.Addresses.Get(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string) (email_routing.Address, error)
# Filters
@@ -1881,12 +1871,13 @@ Params Types:
Response Types:
- keyless_certificates.Hostname
+- keyless_certificates.KeylessCertificate
- keyless_certificates.Tunnel
Methods:
- client.KeylessCertificates.New(ctx context.Context, params keyless_certificates.KeylessCertificateNewParams) (keyless_certificates.Hostname, error)
-- client.KeylessCertificates.List(ctx context.Context, query keyless_certificates.KeylessCertificateListParams) (pagination.SinglePage[keyless_certificates.Hostname], error)
+- client.KeylessCertificates.List(ctx context.Context, query keyless_certificates.KeylessCertificateListParams) (pagination.SinglePage[keyless_certificates.KeylessCertificate], error)
- client.KeylessCertificates.Delete(ctx context.Context, keylessCertificateID string, params keyless_certificates.KeylessCertificateDeleteParams) (shared.UnnamedSchemaRef8900f4cb9dca9b9ed0ac41ad571e6837, error)
- client.KeylessCertificates.Edit(ctx context.Context, keylessCertificateID string, params keyless_certificates.KeylessCertificateEditParams) (keyless_certificates.Hostname, error)
- client.KeylessCertificates.Get(ctx context.Context, keylessCertificateID string, query keyless_certificates.KeylessCertificateGetParams) (keyless_certificates.Hostname, error)
@@ -2022,12 +2013,12 @@ Methods:
Response Types:
-- origin_tls_client_auth.OriginTLSClientAuthListResponse
+- origin_tls_client_auth.ZoneAuthenticatedOriginPull
Methods:
- client.OriginTLSClientAuth.New(ctx context.Context, params origin_tls_client_auth.OriginTLSClientAuthNewParams) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
-- client.OriginTLSClientAuth.List(ctx context.Context, query origin_tls_client_auth.OriginTLSClientAuthListParams) (pagination.SinglePage[origin_tls_client_auth.OriginTLSClientAuthListResponse], error)
+- client.OriginTLSClientAuth.List(ctx context.Context, query origin_tls_client_auth.OriginTLSClientAuthListParams) (pagination.SinglePage[origin_tls_client_auth.ZoneAuthenticatedOriginPull], error)
- client.OriginTLSClientAuth.Delete(ctx context.Context, certificateID string, params origin_tls_client_auth.OriginTLSClientAuthDeleteParams) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
- client.OriginTLSClientAuth.Get(ctx context.Context, certificateID string, query origin_tls_client_auth.OriginTLSClientAuthGetParams) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
@@ -2035,11 +2026,12 @@ Methods:
Response Types:
+- origin_tls_client_auth.AuthenticatedOriginPull
- origin_tls_client_auth.ID
Methods:
-- client.OriginTLSClientAuth.Hostnames.Update(ctx context.Context, params origin_tls_client_auth.HostnameUpdateParams) ([]origin_tls_client_auth.ID, error)
+- client.OriginTLSClientAuth.Hostnames.Update(ctx context.Context, params origin_tls_client_auth.HostnameUpdateParams) ([]origin_tls_client_auth.AuthenticatedOriginPull, error)
- client.OriginTLSClientAuth.Hostnames.Get(ctx context.Context, hostname string, query origin_tls_client_auth.HostnameGetParams) (origin_tls_client_auth.ID, error)
### Certificates
@@ -2051,7 +2043,7 @@ Response Types:
Methods:
- client.OriginTLSClientAuth.Hostnames.Certificates.New(ctx context.Context, params origin_tls_client_auth.HostnameCertificateNewParams) (origin_tls_client_auth.Certificate, error)
-- client.OriginTLSClientAuth.Hostnames.Certificates.List(ctx context.Context, query origin_tls_client_auth.HostnameCertificateListParams) (pagination.SinglePage[origin_tls_client_auth.ID], error)
+- client.OriginTLSClientAuth.Hostnames.Certificates.List(ctx context.Context, query origin_tls_client_auth.HostnameCertificateListParams) (pagination.SinglePage[origin_tls_client_auth.AuthenticatedOriginPull], error)
- client.OriginTLSClientAuth.Hostnames.Certificates.Delete(ctx context.Context, certificateID string, params origin_tls_client_auth.HostnameCertificateDeleteParams) (origin_tls_client_auth.Certificate, error)
- client.OriginTLSClientAuth.Hostnames.Certificates.Get(ctx context.Context, certificateID string, query origin_tls_client_auth.HostnameCertificateGetParams) (origin_tls_client_auth.Certificate, error)
@@ -2079,7 +2071,7 @@ Response Types:
- pagerules.ActionItem
- pagerules.PageRule
- pagerules.Route
-- pagerules.URLTarget
+- pagerules.TargesItem
- pagerules.PageruleDeleteResponse
Methods:
@@ -2469,11 +2461,11 @@ Methods:
Params Types:
-- workers.ConsumerScriptParam
+- workers.ConsumerScriptItemParam
Response Types:
-- workers.ConsumerScript
+- workers.ConsumerScriptItem
- workers.ScriptTailNewResponse
- workers.ScriptTailGetResponse
@@ -2552,12 +2544,14 @@ Params Types:
- workers.BindingItemUnionParam
- workers.CompatibilityFlagsItemParam
- workers.SettingsItemParam
+- workers.TagsItemParam
Response Types:
- workers.BindingItem
- workers.CompatibilityFlagsItem
- workers.SettingsItem
+- workers.TagsItem
Methods:
@@ -3682,6 +3676,10 @@ Methods:
## Configs
+Params Types:
+
+- magic_network_monitoring.ConfigurationParam
+
Response Types:
- magic_network_monitoring.Configuration
@@ -3863,12 +3861,11 @@ Methods:
Response Types:
- registrar.Domain
-- registrar.DomainListResponse
Methods:
- client.Registrar.Domains.Update(ctx context.Context, domainName string, params registrar.DomainUpdateParams) (shared.UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1Union, error)
-- client.Registrar.Domains.List(ctx context.Context, query registrar.DomainListParams) (pagination.SinglePage[registrar.DomainListResponse], error)
+- client.Registrar.Domains.List(ctx context.Context, query registrar.DomainListParams) (pagination.SinglePage[registrar.Domain], error)
- client.Registrar.Domains.Get(ctx context.Context, domainName string, query registrar.DomainGetParams) (shared.UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1Union, error)
# RequestTracers
@@ -4708,7 +4705,9 @@ Params Types:
Response Types:
- zero_trust.ApprovalGroupItem
+- zero_trust.ExcludeItem
- zero_trust.Policy
+- zero_trust.RequireItem
- zero_trust.AccessApplicationPolicyDeleteResponse
Methods:
@@ -4763,6 +4762,8 @@ Params Types:
Response Types:
+- zero_trust.ExcludeItem
+- zero_trust.RequireItem
- zero_trust.ZeroTrustGroup
- zero_trust.AccessGroupDeleteResponse
@@ -5285,6 +5286,10 @@ Methods:
#### Items
+Params Types:
+
+- zero_trust.ListsItemParam
+
Response Types:
- zero_trust.ListsItem
@@ -5303,6 +5308,7 @@ Response Types:
- zero_trust.Location
- zero_trust.Network
+- zero_trust.NetworkItem
Methods:
@@ -5443,28 +5449,25 @@ Methods:
# Hyperdrive
+Params Types:
+
+- hyperdrive.ConfigurationParam
+
Response Types:
- hyperdrive.Configuration
+- hyperdrive.Hyperdrive
## Configs
-Response Types:
-
-- hyperdrive.ConfigNewResponse
-- hyperdrive.ConfigUpdateResponse
-- hyperdrive.ConfigListResponse
-- hyperdrive.ConfigEditResponse
-- hyperdrive.ConfigGetResponse
-
Methods:
-- client.Hyperdrive.Configs.New(ctx context.Context, params hyperdrive.ConfigNewParams) (hyperdrive.ConfigNewResponse, error)
-- client.Hyperdrive.Configs.Update(ctx context.Context, hyperdriveID string, params hyperdrive.ConfigUpdateParams) (hyperdrive.ConfigUpdateResponse, error)
-- client.Hyperdrive.Configs.List(ctx context.Context, query hyperdrive.ConfigListParams) (pagination.SinglePage[hyperdrive.ConfigListResponse], error)
+- client.Hyperdrive.Configs.New(ctx context.Context, params hyperdrive.ConfigNewParams) (hyperdrive.Hyperdrive, error)
+- client.Hyperdrive.Configs.Update(ctx context.Context, hyperdriveID string, params hyperdrive.ConfigUpdateParams) (hyperdrive.Hyperdrive, error)
+- client.Hyperdrive.Configs.List(ctx context.Context, query hyperdrive.ConfigListParams) (pagination.SinglePage[hyperdrive.Hyperdrive], error)
- client.Hyperdrive.Configs.Delete(ctx context.Context, hyperdriveID string, body hyperdrive.ConfigDeleteParams) (shared.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716aUnion, error)
-- client.Hyperdrive.Configs.Edit(ctx context.Context, hyperdriveID string, params hyperdrive.ConfigEditParams) (hyperdrive.ConfigEditResponse, error)
-- client.Hyperdrive.Configs.Get(ctx context.Context, hyperdriveID string, query hyperdrive.ConfigGetParams) (hyperdrive.ConfigGetResponse, error)
+- client.Hyperdrive.Configs.Edit(ctx context.Context, hyperdriveID string, params hyperdrive.ConfigEditParams) (hyperdrive.Hyperdrive, error)
+- client.Hyperdrive.Configs.Get(ctx context.Context, hyperdriveID string, query hyperdrive.ConfigGetParams) (hyperdrive.Hyperdrive, error)
# RUM
diff --git a/challenges/widget.go b/challenges/widget.go
index 761efd11494..fbdef3c9e5f 100644
--- a/challenges/widget.go
+++ b/challenges/widget.go
@@ -135,8 +135,8 @@ type Widget struct {
// challenge clearance, this setting can determine the clearance level to be set
ClearanceLevel WidgetClearanceLevel `json:"clearance_level,required"`
// When the widget was created.
- CreatedOn time.Time `json:"created_on,required" format:"date-time"`
- Domains []string `json:"domains,required"`
+ CreatedOn time.Time `json:"created_on,required" format:"date-time"`
+ Domains []WidgetDomainItem `json:"domains,required"`
// Widget Mode
Mode WidgetMode `json:"mode,required"`
// When the widget was modified.
@@ -241,8 +241,8 @@ type WidgetDomain struct {
// challenge clearance, this setting can determine the clearance level to be set
ClearanceLevel WidgetDomainClearanceLevel `json:"clearance_level,required"`
// When the widget was created.
- CreatedOn time.Time `json:"created_on,required" format:"date-time"`
- Domains []string `json:"domains,required"`
+ CreatedOn time.Time `json:"created_on,required" format:"date-time"`
+ Domains []WidgetDomainItem `json:"domains,required"`
// Widget Mode
Mode WidgetDomainMode `json:"mode,required"`
// When the widget was modified.
diff --git a/cloudforce_one/requestpriority.go b/cloudforce_one/requestpriority.go
index d621a0d5238..79c5d18f104 100644
--- a/cloudforce_one/requestpriority.go
+++ b/cloudforce_one/requestpriority.go
@@ -108,7 +108,7 @@ type Priority struct {
// Priority creation time
Created time.Time `json:"created,required" format:"date-time"`
// List of labels
- Labels []string `json:"labels,required"`
+ Labels []LabelItem `json:"labels,required"`
// Priority
Priority int64 `json:"priority,required"`
// Requirement
diff --git a/custom_certificates/customcertificate.go b/custom_certificates/customcertificate.go
index dfef2c4a298..aa0f9e8d191 100644
--- a/custom_certificates/customcertificate.go
+++ b/custom_certificates/customcertificate.go
@@ -156,8 +156,8 @@ type CustomCertificate struct {
// only to U.S. data centers, only to E.U. data centers, or only to highest
// security data centers. Default distribution is to all Cloudflare datacenters,
// for optimal performance.
- GeoRestrictions GeoRestrictions `json:"geo_restrictions"`
- KeylessServer keyless_certificates.Hostname `json:"keyless_server"`
+ GeoRestrictions GeoRestrictions `json:"geo_restrictions"`
+ KeylessServer keyless_certificates.KeylessCertificate `json:"keyless_server"`
// Specify the policy that determines the region where your private key will be
// held locally. HTTPS connections to any excluded data center will still be fully
// encrypted, but will incur some latency while Keyless SSL is used to complete the
diff --git a/custom_hostnames/customhostname.go b/custom_hostnames/customhostname.go
index a8fe383f22e..f988b0aa703 100644
--- a/custom_hostnames/customhostname.go
+++ b/custom_hostnames/customhostname.go
@@ -45,7 +45,7 @@ func NewCustomHostnameService(opts ...option.RequestOption) (r *CustomHostnameSe
// plus hostmaster, postmaster, webmaster, admin, administrator. If http is used
// and the domain is not already pointing to the Managed CNAME host, the PATCH
// method must be used once it is (to complete validation).
-func (r *CustomHostnameService) New(ctx context.Context, params CustomHostnameNewParams, opts ...option.RequestOption) (res *CustomHostnameNewResponse, err error) {
+func (r *CustomHostnameService) New(ctx context.Context, params CustomHostnameNewParams, opts ...option.RequestOption) (res *CustomHostname, err error) {
opts = append(r.Options[:], opts...)
var env CustomHostnameNewResponseEnvelope
path := fmt.Sprintf("zones/%s/custom_hostnames", params.ZoneID)
@@ -58,7 +58,7 @@ func (r *CustomHostnameService) New(ctx context.Context, params CustomHostnameNe
}
// List, search, sort, and filter all of your custom hostnames.
-func (r *CustomHostnameService) List(ctx context.Context, params CustomHostnameListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[CustomHostnameListResponse], err error) {
+func (r *CustomHostnameService) List(ctx context.Context, params CustomHostnameListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[CustomHostname], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -76,7 +76,7 @@ func (r *CustomHostnameService) List(ctx context.Context, params CustomHostnameL
}
// List, search, sort, and filter all of your custom hostnames.
-func (r *CustomHostnameService) ListAutoPaging(ctx context.Context, params CustomHostnameListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[CustomHostnameListResponse] {
+func (r *CustomHostnameService) ListAutoPaging(ctx context.Context, params CustomHostnameListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[CustomHostname] {
return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, params, opts...))
}
@@ -92,7 +92,7 @@ func (r *CustomHostnameService) Delete(ctx context.Context, customHostnameID str
// matches existing config, used to indicate that hostname should pass domain
// control validation (DCV). Can also be used to change validation type, e.g., from
// 'http' to 'email'.
-func (r *CustomHostnameService) Edit(ctx context.Context, customHostnameID string, params CustomHostnameEditParams, opts ...option.RequestOption) (res *CustomHostnameEditResponse, err error) {
+func (r *CustomHostnameService) Edit(ctx context.Context, customHostnameID string, params CustomHostnameEditParams, opts ...option.RequestOption) (res *CustomHostname, err error) {
opts = append(r.Options[:], opts...)
var env CustomHostnameEditResponseEnvelope
path := fmt.Sprintf("zones/%s/custom_hostnames/%s", params.ZoneID, customHostnameID)
@@ -105,7 +105,7 @@ func (r *CustomHostnameService) Edit(ctx context.Context, customHostnameID strin
}
// Custom Hostname Details
-func (r *CustomHostnameService) Get(ctx context.Context, customHostnameID string, query CustomHostnameGetParams, opts ...option.RequestOption) (res *CustomHostnameGetResponse, err error) {
+func (r *CustomHostnameService) Get(ctx context.Context, customHostnameID string, query CustomHostnameGetParams, opts ...option.RequestOption) (res *CustomHostname, err error) {
opts = append(r.Options[:], opts...)
var env CustomHostnameGetResponseEnvelope
path := fmt.Sprintf("zones/%s/custom_hostnames/%s", query.ZoneID, customHostnameID)
@@ -117,6 +117,33 @@ func (r *CustomHostnameService) Get(ctx context.Context, customHostnameID string
return
}
+type CustomHostname struct {
+ // Identifier
+ ID string `json:"id,required"`
+ // The custom hostname that will point to your hostname via CNAME.
+ Hostname string `json:"hostname,required"`
+ // SSL properties for the custom hostname.
+ SSL SSL `json:"ssl,required"`
+ JSON customHostnameJSON `json:"-"`
+}
+
+// customHostnameJSON contains the JSON metadata for the struct [CustomHostname]
+type customHostnameJSON struct {
+ ID apijson.Field
+ Hostname apijson.Field
+ SSL apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *CustomHostname) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r customHostnameJSON) RawJSON() string {
+ return r.raw
+}
+
// SSL properties for the custom hostname.
type SSL struct {
// Custom hostname SSL identifier tag.
@@ -464,118 +491,6 @@ func (r UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1) IsKnown() bool {
return false
}
-type CustomHostnameNewResponse struct {
- // Identifier
- ID string `json:"id,required"`
- // The custom hostname that will point to your hostname via CNAME.
- Hostname string `json:"hostname,required"`
- // SSL properties for the custom hostname.
- SSL SSL `json:"ssl,required"`
- JSON customHostnameNewResponseJSON `json:"-"`
-}
-
-// customHostnameNewResponseJSON contains the JSON metadata for the struct
-// [CustomHostnameNewResponse]
-type customHostnameNewResponseJSON struct {
- ID apijson.Field
- Hostname apijson.Field
- SSL apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *CustomHostnameNewResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r customHostnameNewResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type CustomHostnameListResponse struct {
- // Identifier
- ID string `json:"id,required"`
- // The custom hostname that will point to your hostname via CNAME.
- Hostname string `json:"hostname,required"`
- // SSL properties for the custom hostname.
- SSL SSL `json:"ssl,required"`
- JSON customHostnameListResponseJSON `json:"-"`
-}
-
-// customHostnameListResponseJSON contains the JSON metadata for the struct
-// [CustomHostnameListResponse]
-type customHostnameListResponseJSON struct {
- ID apijson.Field
- Hostname apijson.Field
- SSL apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *CustomHostnameListResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r customHostnameListResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type CustomHostnameEditResponse struct {
- // Identifier
- ID string `json:"id,required"`
- // The custom hostname that will point to your hostname via CNAME.
- Hostname string `json:"hostname,required"`
- // SSL properties for the custom hostname.
- SSL SSL `json:"ssl,required"`
- JSON customHostnameEditResponseJSON `json:"-"`
-}
-
-// customHostnameEditResponseJSON contains the JSON metadata for the struct
-// [CustomHostnameEditResponse]
-type customHostnameEditResponseJSON struct {
- ID apijson.Field
- Hostname apijson.Field
- SSL apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *CustomHostnameEditResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r customHostnameEditResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type CustomHostnameGetResponse struct {
- // Identifier
- ID string `json:"id,required"`
- // The custom hostname that will point to your hostname via CNAME.
- Hostname string `json:"hostname,required"`
- // SSL properties for the custom hostname.
- SSL SSL `json:"ssl,required"`
- JSON customHostnameGetResponseJSON `json:"-"`
-}
-
-// customHostnameGetResponseJSON contains the JSON metadata for the struct
-// [CustomHostnameGetResponse]
-type customHostnameGetResponseJSON struct {
- ID apijson.Field
- Hostname apijson.Field
- SSL apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *CustomHostnameGetResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r customHostnameGetResponseJSON) RawJSON() string {
- return r.raw
-}
-
type CustomHostnameNewParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
@@ -734,7 +649,7 @@ func (r CustomHostnameNewParamsCustomMetadata) MarshalJSON() (data []byte, err e
type CustomHostnameNewResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result CustomHostnameNewResponse `json:"result,required"`
+ Result CustomHostname `json:"result,required"`
// Whether the API call was successful
Success CustomHostnameNewResponseEnvelopeSuccess `json:"success,required"`
JSON customHostnameNewResponseEnvelopeJSON `json:"-"`
@@ -1028,7 +943,7 @@ func (r CustomHostnameEditParamsSSLSettingsTLS1_3) IsKnown() bool {
type CustomHostnameEditResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result CustomHostnameEditResponse `json:"result,required"`
+ Result CustomHostname `json:"result,required"`
// Whether the API call was successful
Success CustomHostnameEditResponseEnvelopeSuccess `json:"success,required"`
JSON customHostnameEditResponseEnvelopeJSON `json:"-"`
@@ -1076,7 +991,7 @@ type CustomHostnameGetParams struct {
type CustomHostnameGetResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result CustomHostnameGetResponse `json:"result,required"`
+ Result CustomHostname `json:"result,required"`
// Whether the API call was successful
Success CustomHostnameGetResponseEnvelopeSuccess `json:"success,required"`
JSON customHostnameGetResponseEnvelopeJSON `json:"-"`
diff --git a/dns/firewall.go b/dns/firewall.go
index 26009476d20..3a9958ed979 100644
--- a/dns/firewall.go
+++ b/dns/firewall.go
@@ -158,8 +158,8 @@ type Firewall struct {
// Identifier
ID string `json:"id,required"`
// Deprecate the response to ANY requests.
- DeprecateAnyRequests bool `json:"deprecate_any_requests,required"`
- DNSFirewallIPs []FirewallDNSFirewallIPsUnion `json:"dns_firewall_ips,required" format:"ipv4"`
+ DeprecateAnyRequests bool `json:"deprecate_any_requests,required"`
+ DNSFirewallIPs []FirewallIPsItemUnion `json:"dns_firewall_ips,required" format:"ipv4"`
// Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
EcsFallback bool `json:"ecs_fallback,required"`
// Maximum DNS Cache TTL.
@@ -169,8 +169,8 @@ type Firewall struct {
// Last modification of DNS Firewall cluster.
ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
// DNS Firewall Cluster Name.
- Name string `json:"name,required"`
- UpstreamIPs []FirewallUpstreamIPsUnion `json:"upstream_ips,required" format:"ipv4"`
+ Name string `json:"name,required"`
+ UpstreamIPs []UpstreamIPsItemsUnion `json:"upstream_ips,required" format:"ipv4"`
// Attack mitigation settings.
AttackMitigation AttackMitigation `json:"attack_mitigation,nullable"`
// Negative DNS Cache TTL.
@@ -211,50 +211,6 @@ func (r firewallJSON) RawJSON() string {
return r.raw
}
-// Cloudflare-assigned DNS IPv4 Address.
-//
-// Union satisfied by [shared.UnionString] or [shared.UnionString].
-type FirewallDNSFirewallIPsUnion interface {
- ImplementsDNSFirewallDNSFirewallIPsUnion()
-}
-
-func init() {
- apijson.RegisterUnion(
- reflect.TypeOf((*FirewallDNSFirewallIPsUnion)(nil)).Elem(),
- "",
- apijson.UnionVariant{
- TypeFilter: gjson.String,
- Type: reflect.TypeOf(shared.UnionString("")),
- },
- apijson.UnionVariant{
- TypeFilter: gjson.String,
- Type: reflect.TypeOf(shared.UnionString("")),
- },
- )
-}
-
-// Upstream DNS Server IPv4 Address.
-//
-// Union satisfied by [shared.UnionString] or [shared.UnionString].
-type FirewallUpstreamIPsUnion interface {
- ImplementsDNSFirewallUpstreamIPsUnion()
-}
-
-func init() {
- apijson.RegisterUnion(
- reflect.TypeOf((*FirewallUpstreamIPsUnion)(nil)).Elem(),
- "",
- apijson.UnionVariant{
- TypeFilter: gjson.String,
- Type: reflect.TypeOf(shared.UnionString("")),
- },
- apijson.UnionVariant{
- TypeFilter: gjson.String,
- Type: reflect.TypeOf(shared.UnionString("")),
- },
- )
-}
-
// Cloudflare-assigned DNS IPv4 Address.
//
// Union satisfied by [shared.UnionString] or [shared.UnionString].
diff --git a/dns/record.go b/dns/record.go
index 2051aba176f..4eec5ea93d7 100644
--- a/dns/record.go
+++ b/dns/record.go
@@ -218,7 +218,7 @@ type ARecord struct {
// Cloudflare.
Proxied bool `json:"proxied"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -303,7 +303,7 @@ type AAAARecord struct {
// Cloudflare.
Proxied bool `json:"proxied"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -387,7 +387,7 @@ type CAARecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -499,7 +499,7 @@ type CERTRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -615,7 +615,7 @@ type CNAMERecord struct {
// Cloudflare.
Proxied bool `json:"proxied"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -699,7 +699,7 @@ type DNSKEYRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -815,7 +815,7 @@ type DSRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -930,7 +930,7 @@ type HTTPSRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -1042,7 +1042,7 @@ type LOCRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -1214,7 +1214,7 @@ type MXRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -1298,7 +1298,7 @@ type NAPTRRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -1417,7 +1417,7 @@ type NSRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -1498,7 +1498,7 @@ type PTRRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -1817,7 +1817,7 @@ type SMIMEARecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -1936,7 +1936,7 @@ type SRVRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -2067,7 +2067,7 @@ type SSHFPRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -2179,7 +2179,7 @@ type SVCBRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -2291,7 +2291,7 @@ type TLSARecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -2451,7 +2451,7 @@ type TXTRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
@@ -2592,7 +2592,7 @@ type URIRecord struct {
// Whether the record can be proxied by Cloudflare or not.
Proxiable bool `json:"proxiable"`
// Custom tags for the DNS record. This field has no effect on DNS responses.
- Tags []string `json:"tags"`
+ Tags []RecordTagsItem `json:"tags"`
// Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'.
// Value must be between 60 and 86400, with the minimum reduced to 30 for
// Enterprise zones.
diff --git a/email_routing/address.go b/email_routing/address.go
index 799f9125d4b..0bbd57aa326 100644
--- a/email_routing/address.go
+++ b/email_routing/address.go
@@ -37,7 +37,7 @@ func NewAddressService(opts ...option.RequestOption) (r *AddressService) {
// Create a destination address to forward your emails to. Destination addresses
// need to be verified before they can be used.
-func (r *AddressService) New(ctx context.Context, accountIdentifier string, body AddressNewParams, opts ...option.RequestOption) (res *DestinationAddress, err error) {
+func (r *AddressService) New(ctx context.Context, accountIdentifier string, body AddressNewParams, opts ...option.RequestOption) (res *Address, err error) {
opts = append(r.Options[:], opts...)
var env AddressNewResponseEnvelope
path := fmt.Sprintf("accounts/%s/email/routing/addresses", accountIdentifier)
@@ -50,7 +50,7 @@ func (r *AddressService) New(ctx context.Context, accountIdentifier string, body
}
// Lists existing destination addresses.
-func (r *AddressService) List(ctx context.Context, accountIdentifier string, query AddressListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[DestinationAddress], err error) {
+func (r *AddressService) List(ctx context.Context, accountIdentifier string, query AddressListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Address], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -68,12 +68,12 @@ func (r *AddressService) List(ctx context.Context, accountIdentifier string, que
}
// Lists existing destination addresses.
-func (r *AddressService) ListAutoPaging(ctx context.Context, accountIdentifier string, query AddressListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[DestinationAddress] {
+func (r *AddressService) ListAutoPaging(ctx context.Context, accountIdentifier string, query AddressListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Address] {
return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, accountIdentifier, query, opts...))
}
// Deletes a specific destination address.
-func (r *AddressService) Delete(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string, opts ...option.RequestOption) (res *DestinationAddress, err error) {
+func (r *AddressService) Delete(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string, opts ...option.RequestOption) (res *Address, err error) {
opts = append(r.Options[:], opts...)
var env AddressDeleteResponseEnvelope
path := fmt.Sprintf("accounts/%s/email/routing/addresses/%s", accountIdentifier, destinationAddressIdentifier)
@@ -86,7 +86,7 @@ func (r *AddressService) Delete(ctx context.Context, accountIdentifier string, d
}
// Gets information for a specific destination email already created.
-func (r *AddressService) Get(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string, opts ...option.RequestOption) (res *DestinationAddress, err error) {
+func (r *AddressService) Get(ctx context.Context, accountIdentifier string, destinationAddressIdentifier string, opts ...option.RequestOption) (res *Address, err error) {
opts = append(r.Options[:], opts...)
var env AddressGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/email/routing/addresses/%s", accountIdentifier, destinationAddressIdentifier)
@@ -98,7 +98,7 @@ func (r *AddressService) Get(ctx context.Context, accountIdentifier string, dest
return
}
-type DestinationAddress struct {
+type Address struct {
// Destination address identifier.
ID string `json:"id"`
// The date and time the destination address has been created.
@@ -112,13 +112,12 @@ type DestinationAddress struct {
Tag string `json:"tag"`
// The date and time the destination address has been verified. Null means not
// verified yet.
- Verified time.Time `json:"verified" format:"date-time"`
- JSON destinationAddressJSON `json:"-"`
+ Verified time.Time `json:"verified" format:"date-time"`
+ JSON addressJSON `json:"-"`
}
-// destinationAddressJSON contains the JSON metadata for the struct
-// [DestinationAddress]
-type destinationAddressJSON struct {
+// addressJSON contains the JSON metadata for the struct [Address]
+type addressJSON struct {
ID apijson.Field
Created apijson.Field
Email apijson.Field
@@ -129,11 +128,11 @@ type destinationAddressJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *DestinationAddress) UnmarshalJSON(data []byte) (err error) {
+func (r *Address) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r destinationAddressJSON) RawJSON() string {
+func (r addressJSON) RawJSON() string {
return r.raw
}
@@ -149,7 +148,7 @@ func (r AddressNewParams) MarshalJSON() (data []byte, err error) {
type AddressNewResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result DestinationAddress `json:"result,required"`
+ Result Address `json:"result,required"`
// Whether the API call was successful
Success AddressNewResponseEnvelopeSuccess `json:"success,required"`
JSON addressNewResponseEnvelopeJSON `json:"-"`
@@ -243,7 +242,7 @@ func (r AddressListParamsVerified) IsKnown() bool {
type AddressDeleteResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result DestinationAddress `json:"result,required"`
+ Result Address `json:"result,required"`
// Whether the API call was successful
Success AddressDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON addressDeleteResponseEnvelopeJSON `json:"-"`
@@ -286,7 +285,7 @@ func (r AddressDeleteResponseEnvelopeSuccess) IsKnown() bool {
type AddressGetResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result DestinationAddress `json:"result,required"`
+ Result Address `json:"result,required"`
// Whether the API call was successful
Success AddressGetResponseEnvelopeSuccess `json:"success,required"`
JSON addressGetResponseEnvelopeJSON `json:"-"`
diff --git a/email_routing/rule.go b/email_routing/rule.go
index 78f182eeea7..baafa96a4ef 100644
--- a/email_routing/rule.go
+++ b/email_routing/rule.go
@@ -39,7 +39,7 @@ func NewRuleService(opts ...option.RequestOption) (r *RuleService) {
// Rules consist of a set of criteria for matching emails (such as an email being
// sent to a specific custom email address) plus a set of actions to take on the
// email (like forwarding it to a specific destination address).
-func (r *RuleService) New(ctx context.Context, zoneIdentifier string, body RuleNewParams, opts ...option.RequestOption) (res *Properties, err error) {
+func (r *RuleService) New(ctx context.Context, zoneIdentifier string, body RuleNewParams, opts ...option.RequestOption) (res *EmailRule, err error) {
opts = append(r.Options[:], opts...)
var env RuleNewResponseEnvelope
path := fmt.Sprintf("zones/%s/email/routing/rules", zoneIdentifier)
@@ -52,7 +52,7 @@ func (r *RuleService) New(ctx context.Context, zoneIdentifier string, body RuleN
}
// Update actions and matches, or enable/disable specific routing rules.
-func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, ruleIdentifier string, body RuleUpdateParams, opts ...option.RequestOption) (res *Properties, err error) {
+func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, ruleIdentifier string, body RuleUpdateParams, opts ...option.RequestOption) (res *EmailRule, err error) {
opts = append(r.Options[:], opts...)
var env RuleUpdateResponseEnvelope
path := fmt.Sprintf("zones/%s/email/routing/rules/%s", zoneIdentifier, ruleIdentifier)
@@ -65,7 +65,7 @@ func (r *RuleService) Update(ctx context.Context, zoneIdentifier string, ruleIde
}
// Lists existing routing rules.
-func (r *RuleService) List(ctx context.Context, zoneIdentifier string, query RuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Properties], err error) {
+func (r *RuleService) List(ctx context.Context, zoneIdentifier string, query RuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[EmailRule], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -83,12 +83,12 @@ func (r *RuleService) List(ctx context.Context, zoneIdentifier string, query Rul
}
// Lists existing routing rules.
-func (r *RuleService) ListAutoPaging(ctx context.Context, zoneIdentifier string, query RuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Properties] {
+func (r *RuleService) ListAutoPaging(ctx context.Context, zoneIdentifier string, query RuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[EmailRule] {
return pagination.NewV4PagePaginationArrayAutoPager(r.List(ctx, zoneIdentifier, query, opts...))
}
// Delete a specific routing rule.
-func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, ruleIdentifier string, opts ...option.RequestOption) (res *Properties, err error) {
+func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, ruleIdentifier string, opts ...option.RequestOption) (res *EmailRule, err error) {
opts = append(r.Options[:], opts...)
var env RuleDeleteResponseEnvelope
path := fmt.Sprintf("zones/%s/email/routing/rules/%s", zoneIdentifier, ruleIdentifier)
@@ -101,7 +101,7 @@ func (r *RuleService) Delete(ctx context.Context, zoneIdentifier string, ruleIde
}
// Get information for a specific routing rule already created.
-func (r *RuleService) Get(ctx context.Context, zoneIdentifier string, ruleIdentifier string, opts ...option.RequestOption) (res *Properties, err error) {
+func (r *RuleService) Get(ctx context.Context, zoneIdentifier string, ruleIdentifier string, opts ...option.RequestOption) (res *EmailRule, err error) {
opts = append(r.Options[:], opts...)
var env RuleGetResponseEnvelope
path := fmt.Sprintf("zones/%s/email/routing/rules/%s", zoneIdentifier, ruleIdentifier)
@@ -221,11 +221,11 @@ type EmailRule struct {
// Routing rule identifier.
ID string `json:"id"`
// List actions patterns.
- Actions []Action `json:"actions"`
+ Actions []ActionItem `json:"actions"`
// Routing rule status.
Enabled EmailRuleEnabled `json:"enabled"`
// Matching patterns to forward to your actions.
- Matchers []Matcher `json:"matchers"`
+ Matchers []MatcherItem `json:"matchers"`
// Routing rule name.
Name string `json:"name"`
// Priority of the routing rule.
@@ -260,6 +260,10 @@ func (r EmailRule) implementsZeroTrustIncludeItem() {}
func (r EmailRule) implementsZeroTrustRule() {}
+func (r EmailRule) implementsZeroTrustExcludeItem() {}
+
+func (r EmailRule) implementsZeroTrustRequireItem() {}
+
// Routing rule status.
type EmailRuleEnabled bool
@@ -278,11 +282,11 @@ func (r EmailRuleEnabled) IsKnown() bool {
type EmailRuleParam struct {
// List actions patterns.
- Actions param.Field[[]ActionParam] `json:"actions"`
+ Actions param.Field[[]ActionItemParam] `json:"actions"`
// Routing rule status.
Enabled param.Field[EmailRuleEnabled] `json:"enabled"`
// Matching patterns to forward to your actions.
- Matchers param.Field[[]MatcherParam] `json:"matchers"`
+ Matchers param.Field[[]MatcherItemParam] `json:"matchers"`
// Routing rule name.
Name param.Field[string] `json:"name"`
// Priority of the routing rule.
@@ -299,11 +303,11 @@ func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -313,11 +317,11 @@ func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -325,35 +329,35 @@ func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -361,13 +365,13 @@ func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -375,29 +379,29 @@ func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
// Matching pattern to forward your actions.
type Matcher struct {
@@ -543,66 +547,11 @@ func (r MatcherItemParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
-type Properties struct {
- // Routing rule identifier.
- ID string `json:"id"`
- // List actions patterns.
- Actions []ActionItem `json:"actions"`
- // Routing rule status.
- Enabled PropertiesEnabled `json:"enabled"`
- // Matching patterns to forward to your actions.
- Matchers []MatcherItem `json:"matchers"`
- // Routing rule name.
- Name string `json:"name"`
- // Priority of the routing rule.
- Priority float64 `json:"priority"`
- // Routing rule tag. (Deprecated, replaced by routing rule identifier)
- Tag string `json:"tag"`
- JSON propertiesJSON `json:"-"`
-}
-
-// propertiesJSON contains the JSON metadata for the struct [Properties]
-type propertiesJSON struct {
- ID apijson.Field
- Actions apijson.Field
- Enabled apijson.Field
- Matchers apijson.Field
- Name apijson.Field
- Priority apijson.Field
- Tag apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *Properties) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r propertiesJSON) RawJSON() string {
- return r.raw
-}
-
-// Routing rule status.
-type PropertiesEnabled bool
-
-const (
- PropertiesEnabledTrue PropertiesEnabled = true
- PropertiesEnabledFalse PropertiesEnabled = false
-)
-
-func (r PropertiesEnabled) IsKnown() bool {
- switch r {
- case PropertiesEnabledTrue, PropertiesEnabledFalse:
- return true
- }
- return false
-}
-
type RuleNewParams struct {
// List actions patterns.
- Actions param.Field[[]ActionParam] `json:"actions,required"`
+ Actions param.Field[[]ActionItemParam] `json:"actions,required"`
// Matching patterns to forward to your actions.
- Matchers param.Field[[]MatcherParam] `json:"matchers,required"`
+ Matchers param.Field[[]MatcherItemParam] `json:"matchers,required"`
// Routing rule status.
Enabled param.Field[RuleNewParamsEnabled] `json:"enabled"`
// Routing rule name.
@@ -634,7 +583,7 @@ func (r RuleNewParamsEnabled) IsKnown() bool {
type RuleNewResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result Properties `json:"result,required"`
+ Result EmailRule `json:"result,required"`
// Whether the API call was successful
Success RuleNewResponseEnvelopeSuccess `json:"success,required"`
JSON ruleNewResponseEnvelopeJSON `json:"-"`
@@ -710,7 +659,7 @@ func (r RuleUpdateParamsEnabled) IsKnown() bool {
type RuleUpdateResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result Properties `json:"result,required"`
+ Result EmailRule `json:"result,required"`
// Whether the API call was successful
Success RuleUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON ruleUpdateResponseEnvelopeJSON `json:"-"`
@@ -786,7 +735,7 @@ func (r RuleListParamsEnabled) IsKnown() bool {
type RuleDeleteResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result Properties `json:"result,required"`
+ Result EmailRule `json:"result,required"`
// Whether the API call was successful
Success RuleDeleteResponseEnvelopeSuccess `json:"success,required"`
JSON ruleDeleteResponseEnvelopeJSON `json:"-"`
@@ -829,7 +778,7 @@ func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool {
type RuleGetResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result Properties `json:"result,required"`
+ Result EmailRule `json:"result,required"`
// Whether the API call was successful
Success RuleGetResponseEnvelopeSuccess `json:"success,required"`
JSON ruleGetResponseEnvelopeJSON `json:"-"`
diff --git a/email_routing/rule_test.go b/email_routing/rule_test.go
index 8ad7fd30d89..cf3e7705c75 100644
--- a/email_routing/rule_test.go
+++ b/email_routing/rule_test.go
@@ -32,27 +32,27 @@ func TestRuleNewWithOptionalParams(t *testing.T) {
context.TODO(),
"023e105f4ecef8ad9ca31a8372d0c353",
email_routing.RuleNewParams{
- Actions: cloudflare.F([]email_routing.ActionParam{{
- Type: cloudflare.F(email_routing.ActionTypeForward),
+ Actions: cloudflare.F([]email_routing.ActionItemParam{{
+ Type: cloudflare.F(email_routing.ActionItemTypeForward),
Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}),
}, {
- Type: cloudflare.F(email_routing.ActionTypeForward),
+ Type: cloudflare.F(email_routing.ActionItemTypeForward),
Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}),
}, {
- Type: cloudflare.F(email_routing.ActionTypeForward),
+ Type: cloudflare.F(email_routing.ActionItemTypeForward),
Value: cloudflare.F([]string{"destinationaddress@example.net", "destinationaddress@example.net", "destinationaddress@example.net"}),
}}),
- Matchers: cloudflare.F([]email_routing.MatcherParam{{
- Field: cloudflare.F(email_routing.MatcherFieldTo),
- Type: cloudflare.F(email_routing.MatcherTypeLiteral),
+ Matchers: cloudflare.F([]email_routing.MatcherItemParam{{
+ Field: cloudflare.F(email_routing.MatcherItemFieldTo),
+ Type: cloudflare.F(email_routing.MatcherItemTypeLiteral),
Value: cloudflare.F("test@example.com"),
}, {
- Field: cloudflare.F(email_routing.MatcherFieldTo),
- Type: cloudflare.F(email_routing.MatcherTypeLiteral),
+ Field: cloudflare.F(email_routing.MatcherItemFieldTo),
+ Type: cloudflare.F(email_routing.MatcherItemTypeLiteral),
Value: cloudflare.F("test@example.com"),
}, {
- Field: cloudflare.F(email_routing.MatcherFieldTo),
- Type: cloudflare.F(email_routing.MatcherTypeLiteral),
+ Field: cloudflare.F(email_routing.MatcherItemFieldTo),
+ Type: cloudflare.F(email_routing.MatcherItemTypeLiteral),
Value: cloudflare.F("test@example.com"),
}}),
Enabled: cloudflare.F(email_routing.RuleNewParamsEnabledTrue),
diff --git a/firewall/wafpackagerule.go b/firewall/wafpackagerule.go
index fabe618a479..997958ca41a 100644
--- a/firewall/wafpackagerule.go
+++ b/firewall/wafpackagerule.go
@@ -209,7 +209,7 @@ type RuleWAFManagedRulesAnomalyRule struct {
ID string `json:"id,required"`
// Defines the available modes for the current WAF rule. Applies to anomaly
// detection WAF rules.
- AllowedModes []RuleWAFManagedRulesAnomalyRuleAllowedMode `json:"allowed_modes,required"`
+ AllowedModes []AllowedModesAnomalyItem `json:"allowed_modes,required"`
// The public description of the WAF rule.
Description string `json:"description,required"`
// The rule group to which the current WAF rule belongs.
@@ -248,23 +248,6 @@ func (r ruleWAFManagedRulesAnomalyRuleJSON) RawJSON() string {
func (r RuleWAFManagedRulesAnomalyRule) implementsFirewallRule() {}
-// When set to `on`, the current WAF rule will be used when evaluating the request.
-// Applies to anomaly detection WAF rules.
-type RuleWAFManagedRulesAnomalyRuleAllowedMode string
-
-const (
- RuleWAFManagedRulesAnomalyRuleAllowedModeOn RuleWAFManagedRulesAnomalyRuleAllowedMode = "on"
- RuleWAFManagedRulesAnomalyRuleAllowedModeOff RuleWAFManagedRulesAnomalyRuleAllowedMode = "off"
-)
-
-func (r RuleWAFManagedRulesAnomalyRuleAllowedMode) IsKnown() bool {
- switch r {
- case RuleWAFManagedRulesAnomalyRuleAllowedModeOn, RuleWAFManagedRulesAnomalyRuleAllowedModeOff:
- return true
- }
- return false
-}
-
// When set to `on`, the current WAF rule will be used when evaluating the request.
// Applies to anomaly detection WAF rules.
type RuleWAFManagedRulesAnomalyRuleMode string
diff --git a/healthchecks/healthcheck.go b/healthchecks/healthcheck.go
index 573e2b25b92..a85397d1b4d 100644
--- a/healthchecks/healthcheck.go
+++ b/healthchecks/healthcheck.go
@@ -163,7 +163,7 @@ type Healthcheck struct {
Address string `json:"address"`
// A list of regions from which to run health checks. Null means Cloudflare will
// pick a default region.
- CheckRegions []HealthcheckCheckRegion `json:"check_regions,nullable"`
+ CheckRegions []CheckRegionItem `json:"check_regions,nullable"`
// The number of consecutive fails required from a health check before changing the
// health to unhealthy.
ConsecutiveFails int64 `json:"consecutive_fails"`
@@ -234,38 +234,6 @@ func (r healthcheckJSON) RawJSON() string {
return r.raw
}
-// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe,
-// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America,
-// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, IN: India,
-// SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (BUSINESS
-// and ENTERPRISE customers only).
-type HealthcheckCheckRegion string
-
-const (
- HealthcheckCheckRegionWnam HealthcheckCheckRegion = "WNAM"
- HealthcheckCheckRegionEnam HealthcheckCheckRegion = "ENAM"
- HealthcheckCheckRegionWeu HealthcheckCheckRegion = "WEU"
- HealthcheckCheckRegionEeu HealthcheckCheckRegion = "EEU"
- HealthcheckCheckRegionNsam HealthcheckCheckRegion = "NSAM"
- HealthcheckCheckRegionSsam HealthcheckCheckRegion = "SSAM"
- HealthcheckCheckRegionOc HealthcheckCheckRegion = "OC"
- HealthcheckCheckRegionMe HealthcheckCheckRegion = "ME"
- HealthcheckCheckRegionNaf HealthcheckCheckRegion = "NAF"
- HealthcheckCheckRegionSaf HealthcheckCheckRegion = "SAF"
- HealthcheckCheckRegionIn HealthcheckCheckRegion = "IN"
- HealthcheckCheckRegionSeas HealthcheckCheckRegion = "SEAS"
- HealthcheckCheckRegionNeas HealthcheckCheckRegion = "NEAS"
- HealthcheckCheckRegionAllRegions HealthcheckCheckRegion = "ALL_REGIONS"
-)
-
-func (r HealthcheckCheckRegion) IsKnown() bool {
- switch r {
- case HealthcheckCheckRegionWnam, HealthcheckCheckRegionEnam, HealthcheckCheckRegionWeu, HealthcheckCheckRegionEeu, HealthcheckCheckRegionNsam, HealthcheckCheckRegionSsam, HealthcheckCheckRegionOc, HealthcheckCheckRegionMe, HealthcheckCheckRegionNaf, HealthcheckCheckRegionSaf, HealthcheckCheckRegionIn, HealthcheckCheckRegionSeas, HealthcheckCheckRegionNeas, HealthcheckCheckRegionAllRegions:
- return true
- }
- return false
-}
-
// The current status of the origin server according to the health check.
type HealthcheckStatus string
diff --git a/hyperdrive/config.go b/hyperdrive/config.go
index 33bcc2256f7..642df3eaf0a 100644
--- a/hyperdrive/config.go
+++ b/hyperdrive/config.go
@@ -33,7 +33,7 @@ func NewConfigService(opts ...option.RequestOption) (r *ConfigService) {
}
// Creates and returns a new Hyperdrive configuration.
-func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *ConfigNewResponse, err error) {
+func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *Hyperdrive, err error) {
opts = append(r.Options[:], opts...)
var env ConfigNewResponseEnvelope
path := fmt.Sprintf("accounts/%s/hyperdrive/configs", params.AccountID)
@@ -46,7 +46,7 @@ func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ..
}
// Updates and returns the specified Hyperdrive configuration.
-func (r *ConfigService) Update(ctx context.Context, hyperdriveID string, params ConfigUpdateParams, opts ...option.RequestOption) (res *ConfigUpdateResponse, err error) {
+func (r *ConfigService) Update(ctx context.Context, hyperdriveID string, params ConfigUpdateParams, opts ...option.RequestOption) (res *Hyperdrive, err error) {
opts = append(r.Options[:], opts...)
var env ConfigUpdateResponseEnvelope
path := fmt.Sprintf("accounts/%s/hyperdrive/configs/%s", params.AccountID, hyperdriveID)
@@ -59,7 +59,7 @@ func (r *ConfigService) Update(ctx context.Context, hyperdriveID string, params
}
// Returns a list of Hyperdrives
-func (r *ConfigService) List(ctx context.Context, query ConfigListParams, opts ...option.RequestOption) (res *pagination.SinglePage[ConfigListResponse], err error) {
+func (r *ConfigService) List(ctx context.Context, query ConfigListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Hyperdrive], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -77,7 +77,7 @@ func (r *ConfigService) List(ctx context.Context, query ConfigListParams, opts .
}
// Returns a list of Hyperdrives
-func (r *ConfigService) ListAutoPaging(ctx context.Context, query ConfigListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ConfigListResponse] {
+func (r *ConfigService) ListAutoPaging(ctx context.Context, query ConfigListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Hyperdrive] {
return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...))
}
@@ -96,7 +96,7 @@ func (r *ConfigService) Delete(ctx context.Context, hyperdriveID string, body Co
// Patches and returns the specified Hyperdrive configuration. Updates to the
// origin and caching settings are applied with an all-or-nothing approach.
-func (r *ConfigService) Edit(ctx context.Context, hyperdriveID string, params ConfigEditParams, opts ...option.RequestOption) (res *ConfigEditResponse, err error) {
+func (r *ConfigService) Edit(ctx context.Context, hyperdriveID string, params ConfigEditParams, opts ...option.RequestOption) (res *Hyperdrive, err error) {
opts = append(r.Options[:], opts...)
var env ConfigEditResponseEnvelope
path := fmt.Sprintf("accounts/%s/hyperdrive/configs/%s", params.AccountID, hyperdriveID)
@@ -109,7 +109,7 @@ func (r *ConfigService) Edit(ctx context.Context, hyperdriveID string, params Co
}
// Returns the specified Hyperdrive configuration.
-func (r *ConfigService) Get(ctx context.Context, hyperdriveID string, query ConfigGetParams, opts ...option.RequestOption) (res *ConfigGetResponse, err error) {
+func (r *ConfigService) Get(ctx context.Context, hyperdriveID string, query ConfigGetParams, opts ...option.RequestOption) (res *Hyperdrive, err error) {
opts = append(r.Options[:], opts...)
var env ConfigGetResponseEnvelope
path := fmt.Sprintf("accounts/%s/hyperdrive/configs/%s", query.AccountID, hyperdriveID)
@@ -121,141 +121,21 @@ func (r *ConfigService) Get(ctx context.Context, hyperdriveID string, query Conf
return
}
-type ConfigNewResponse struct {
- // Identifier
- ID string `json:"id"`
- JSON configNewResponseJSON `json:"-"`
-}
-
-// configNewResponseJSON contains the JSON metadata for the struct
-// [ConfigNewResponse]
-type configNewResponseJSON struct {
- ID apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *ConfigNewResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r configNewResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type ConfigUpdateResponse struct {
- // Identifier
- ID string `json:"id"`
- JSON configUpdateResponseJSON `json:"-"`
-}
-
-// configUpdateResponseJSON contains the JSON metadata for the struct
-// [ConfigUpdateResponse]
-type configUpdateResponseJSON struct {
- ID apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *ConfigUpdateResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r configUpdateResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type ConfigListResponse struct {
- // Identifier
- ID string `json:"id"`
- JSON configListResponseJSON `json:"-"`
-}
-
-// configListResponseJSON contains the JSON metadata for the struct
-// [ConfigListResponse]
-type configListResponseJSON struct {
- ID apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *ConfigListResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r configListResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type ConfigEditResponse struct {
- // Identifier
- ID string `json:"id"`
- JSON configEditResponseJSON `json:"-"`
-}
-
-// configEditResponseJSON contains the JSON metadata for the struct
-// [ConfigEditResponse]
-type configEditResponseJSON struct {
- ID apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *ConfigEditResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r configEditResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type ConfigGetResponse struct {
- // Identifier
- ID string `json:"id"`
- JSON configGetResponseJSON `json:"-"`
-}
-
-// configGetResponseJSON contains the JSON metadata for the struct
-// [ConfigGetResponse]
-type configGetResponseJSON struct {
- ID apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *ConfigGetResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r configGetResponseJSON) RawJSON() string {
- return r.raw
-}
-
type ConfigNewParams struct {
// Identifier
- AccountID param.Field[string] `path:"account_id,required"`
- Name param.Field[interface{}] `json:"name,required"`
- Origin param.Field[ConfigNewParamsOrigin] `json:"origin,required"`
+ AccountID param.Field[string] `path:"account_id,required"`
+ Name param.Field[interface{}] `json:"name,required"`
+ Origin param.Field[ConfigurationParam] `json:"origin,required"`
}
func (r ConfigNewParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
-type ConfigNewParamsOrigin struct {
- // The password required to access your origin database. This value is write-only
- // and never returned by the API.
- Password param.Field[string] `json:"password,required"`
-}
-
-func (r ConfigNewParamsOrigin) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
type ConfigNewResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result ConfigNewResponse `json:"result,required,nullable"`
+ Result Hyperdrive `json:"result,required,nullable"`
// Whether the API call was successful
Success ConfigNewResponseEnvelopeSuccess `json:"success,required"`
JSON configNewResponseEnvelopeJSON `json:"-"`
@@ -297,29 +177,19 @@ func (r ConfigNewResponseEnvelopeSuccess) IsKnown() bool {
type ConfigUpdateParams struct {
// Identifier
- AccountID param.Field[string] `path:"account_id,required"`
- Name param.Field[interface{}] `json:"name,required"`
- Origin param.Field[ConfigUpdateParamsOrigin] `json:"origin,required"`
+ AccountID param.Field[string] `path:"account_id,required"`
+ Name param.Field[interface{}] `json:"name,required"`
+ Origin param.Field[ConfigurationParam] `json:"origin,required"`
}
func (r ConfigUpdateParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
-type ConfigUpdateParamsOrigin struct {
- // The password required to access your origin database. This value is write-only
- // and never returned by the API.
- Password param.Field[string] `json:"password,required"`
-}
-
-func (r ConfigUpdateParamsOrigin) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
type ConfigUpdateResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result ConfigUpdateResponse `json:"result,required,nullable"`
+ Result Hyperdrive `json:"result,required,nullable"`
// Whether the API call was successful
Success ConfigUpdateResponseEnvelopeSuccess `json:"success,required"`
JSON configUpdateResponseEnvelopeJSON `json:"-"`
@@ -414,28 +284,18 @@ func (r ConfigDeleteResponseEnvelopeSuccess) IsKnown() bool {
type ConfigEditParams struct {
// Identifier
- AccountID param.Field[string] `path:"account_id,required"`
- Origin param.Field[ConfigEditParamsOrigin] `json:"origin"`
+ AccountID param.Field[string] `path:"account_id,required"`
+ Origin param.Field[ConfigurationParam] `json:"origin"`
}
func (r ConfigEditParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
-type ConfigEditParamsOrigin struct {
- // The password required to access your origin database. This value is write-only
- // and never returned by the API.
- Password param.Field[string] `json:"password,required"`
-}
-
-func (r ConfigEditParamsOrigin) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
type ConfigEditResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result ConfigEditResponse `json:"result,required,nullable"`
+ Result Hyperdrive `json:"result,required,nullable"`
// Whether the API call was successful
Success ConfigEditResponseEnvelopeSuccess `json:"success,required"`
JSON configEditResponseEnvelopeJSON `json:"-"`
@@ -483,7 +343,7 @@ type ConfigGetParams struct {
type ConfigGetResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result ConfigGetResponse `json:"result,required,nullable"`
+ Result Hyperdrive `json:"result,required,nullable"`
// Whether the API call was successful
Success ConfigGetResponseEnvelopeSuccess `json:"success,required"`
JSON configGetResponseEnvelopeJSON `json:"-"`
diff --git a/hyperdrive/config_test.go b/hyperdrive/config_test.go
index 54ad13ad473..4117793ded5 100644
--- a/hyperdrive/config_test.go
+++ b/hyperdrive/config_test.go
@@ -31,7 +31,7 @@ func TestConfigNew(t *testing.T) {
_, err := client.Hyperdrive.Configs.New(context.TODO(), hyperdrive.ConfigNewParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Name: cloudflare.F[any](map[string]interface{}{}),
- Origin: cloudflare.F(hyperdrive.ConfigNewParamsOrigin{
+ Origin: cloudflare.F(hyperdrive.ConfigurationParam{
Password: cloudflare.F("password1234!"),
}),
})
@@ -64,7 +64,7 @@ func TestConfigUpdate(t *testing.T) {
hyperdrive.ConfigUpdateParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Name: cloudflare.F[any](map[string]interface{}{}),
- Origin: cloudflare.F(hyperdrive.ConfigUpdateParamsOrigin{
+ Origin: cloudflare.F(hyperdrive.ConfigurationParam{
Password: cloudflare.F("password1234!"),
}),
},
@@ -153,7 +153,7 @@ func TestConfigEditWithOptionalParams(t *testing.T) {
"023e105f4ecef8ad9ca31a8372d0c353",
hyperdrive.ConfigEditParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
- Origin: cloudflare.F(hyperdrive.ConfigEditParamsOrigin{
+ Origin: cloudflare.F(hyperdrive.ConfigurationParam{
Password: cloudflare.F("password1234!"),
}),
},
diff --git a/hyperdrive/hyperdrive.go b/hyperdrive/hyperdrive.go
index 3c8c7c08ba8..f45dfc93e62 100644
--- a/hyperdrive/hyperdrive.go
+++ b/hyperdrive/hyperdrive.go
@@ -4,6 +4,7 @@ package hyperdrive
import (
"github.com/cloudflare/cloudflare-go/v2/internal/apijson"
+ "github.com/cloudflare/cloudflare-go/v2/internal/param"
"github.com/cloudflare/cloudflare-go/v2/option"
)
@@ -47,3 +48,34 @@ func (r *Configuration) UnmarshalJSON(data []byte) (err error) {
func (r configurationJSON) RawJSON() string {
return r.raw
}
+
+type ConfigurationParam struct {
+ // The password required to access your origin database. This value is write-only
+ // and never returned by the API.
+ Password param.Field[string] `json:"password,required"`
+}
+
+func (r ConfigurationParam) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
+type Hyperdrive struct {
+ // Identifier
+ ID string `json:"id"`
+ JSON hyperdriveJSON `json:"-"`
+}
+
+// hyperdriveJSON contains the JSON metadata for the struct [Hyperdrive]
+type hyperdriveJSON struct {
+ ID apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *Hyperdrive) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r hyperdriveJSON) RawJSON() string {
+ return r.raw
+}
diff --git a/internal/shared/union.go b/internal/shared/union.go
index 66f4f2c95b3..ba4619983b9 100644
--- a/internal/shared/union.go
+++ b/internal/shared/union.go
@@ -14,8 +14,6 @@ func (UnionString) ImplementsUserLoadBalancerPoolHealthResponseUnion()
func (UnionString) ImplementsLoadBalancersPoolHealthGetResponseUnion() {}
func (UnionString) ImplementsLoadBalancersRegionGetResponseUnion() {}
func (UnionString) ImplementsCacheCachePurgeParamsCachePurgeFilesFileUnion() {}
-func (UnionString) ImplementsDNSFirewallDNSFirewallIPsUnion() {}
-func (UnionString) ImplementsDNSFirewallUpstreamIPsUnion() {}
func (UnionString) ImplementsDNSFirewallIPsItemUnionParam() {}
func (UnionString) ImplementsDNSFirewallIPsItemUnion() {}
func (UnionString) ImplementsDNSUpstreamIPsItemsUnionParam() {}
diff --git a/keyless_certificates/keylesscertificate.go b/keyless_certificates/keylesscertificate.go
index 061e1ddcf51..fa005333d27 100644
--- a/keyless_certificates/keylesscertificate.go
+++ b/keyless_certificates/keylesscertificate.go
@@ -49,7 +49,7 @@ func (r *KeylessCertificateService) New(ctx context.Context, params KeylessCerti
}
// List all Keyless SSL configurations for a given zone.
-func (r *KeylessCertificateService) List(ctx context.Context, query KeylessCertificateListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Hostname], err error) {
+func (r *KeylessCertificateService) List(ctx context.Context, query KeylessCertificateListParams, opts ...option.RequestOption) (res *pagination.SinglePage[KeylessCertificate], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -67,7 +67,7 @@ func (r *KeylessCertificateService) List(ctx context.Context, query KeylessCerti
}
// List all Keyless SSL configurations for a given zone.
-func (r *KeylessCertificateService) ListAutoPaging(ctx context.Context, query KeylessCertificateListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Hostname] {
+func (r *KeylessCertificateService) ListAutoPaging(ctx context.Context, query KeylessCertificateListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[KeylessCertificate] {
return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...))
}
@@ -193,6 +193,73 @@ func (r HostnameParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
+type KeylessCertificate struct {
+ // Keyless certificate identifier tag.
+ ID string `json:"id,required"`
+ // When the Keyless SSL was created.
+ CreatedOn time.Time `json:"created_on,required" format:"date-time"`
+ // Whether or not the Keyless SSL is on or off.
+ Enabled bool `json:"enabled,required"`
+ // The keyless SSL name.
+ Host string `json:"host,required" format:"hostname"`
+ // When the Keyless SSL was last modified.
+ ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
+ // The keyless SSL name.
+ Name string `json:"name,required"`
+ // Available permissions for the Keyless SSL for the current user requesting the
+ // item.
+ Permissions []interface{} `json:"permissions,required"`
+ // The keyless SSL port used to communicate between Cloudflare and the client's
+ // Keyless SSL server.
+ Port float64 `json:"port,required"`
+ // Status of the Keyless SSL.
+ Status KeylessCertificateStatus `json:"status,required"`
+ // Configuration for using Keyless SSL through a Cloudflare Tunnel
+ Tunnel Tunnel `json:"tunnel"`
+ JSON keylessCertificateJSON `json:"-"`
+}
+
+// keylessCertificateJSON contains the JSON metadata for the struct
+// [KeylessCertificate]
+type keylessCertificateJSON struct {
+ ID apijson.Field
+ CreatedOn apijson.Field
+ Enabled apijson.Field
+ Host apijson.Field
+ ModifiedOn apijson.Field
+ Name apijson.Field
+ Permissions apijson.Field
+ Port apijson.Field
+ Status apijson.Field
+ Tunnel apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *KeylessCertificate) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r keylessCertificateJSON) RawJSON() string {
+ return r.raw
+}
+
+// Status of the Keyless SSL.
+type KeylessCertificateStatus string
+
+const (
+ KeylessCertificateStatusActive KeylessCertificateStatus = "active"
+ KeylessCertificateStatusDeleted KeylessCertificateStatus = "deleted"
+)
+
+func (r KeylessCertificateStatus) IsKnown() bool {
+ switch r {
+ case KeylessCertificateStatusActive, KeylessCertificateStatusDeleted:
+ return true
+ }
+ return false
+}
+
// Configuration for using Keyless SSL through a Cloudflare Tunnel
type Tunnel struct {
// Private IP of the Key Server Host
diff --git a/load_balancers/loadbalancer.go b/load_balancers/loadbalancer.go
index db25e9972f0..fd4738dd8f5 100644
--- a/load_balancers/loadbalancer.go
+++ b/load_balancers/loadbalancer.go
@@ -318,7 +318,7 @@ type LoadBalancer struct {
CreatedOn time.Time `json:"created_on" format:"date-time"`
// A list of pool IDs ordered by their failover priority. Pools defined here are
// used by default, or when region_pools are not configured for a given region.
- DefaultPools []string `json:"default_pools"`
+ DefaultPools []DefaultPoolsItem `json:"default_pools"`
// Object description.
Description string `json:"description"`
// Whether to enable (the default) this load balancer.
@@ -355,7 +355,7 @@ type LoadBalancer struct {
RegionPools interface{} `json:"region_pools"`
// BETA Field Not General Access: A list of rules for this load balancer to
// execute.
- Rules []LoadBalancerRule `json:"rules"`
+ Rules []RulesItem `json:"rules"`
// Specifies the type of session affinity the load balancer should use unless
// specified as `"none"` or "" (default). The supported types are:
//
@@ -457,312 +457,6 @@ func (r loadBalancerJSON) RawJSON() string {
return r.raw
}
-// A rule object containing conditions and overrides for this load balancer to
-// evaluate.
-type LoadBalancerRule struct {
- // The condition expressions to evaluate. If the condition evaluates to true, the
- // overrides or fixed_response in this rule will be applied. An empty condition is
- // always true. For more details on condition expressions, please see
- // https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions.
- Condition string `json:"condition"`
- // Disable this specific rule. It will no longer be evaluated by this load
- // balancer.
- Disabled bool `json:"disabled"`
- // A collection of fields used to directly respond to the eyeball instead of
- // routing to a pool. If a fixed_response is supplied the rule will be marked as
- // terminates.
- FixedResponse LoadBalancerRulesFixedResponse `json:"fixed_response"`
- // Name of this rule. Only used for human readability.
- Name string `json:"name"`
- // A collection of overrides to apply to the load balancer when this rule's
- // condition is true. All fields are optional.
- Overrides LoadBalancerRulesOverrides `json:"overrides"`
- // The order in which rules should be executed in relation to each other. Lower
- // values are executed first. Values do not need to be sequential. If no value is
- // provided for any rule the array order of the rules field will be used to assign
- // a priority.
- Priority int64 `json:"priority"`
- // If this rule's condition is true, this causes rule evaluation to stop after
- // processing this rule.
- Terminates bool `json:"terminates"`
- JSON loadBalancerRuleJSON `json:"-"`
-}
-
-// loadBalancerRuleJSON contains the JSON metadata for the struct
-// [LoadBalancerRule]
-type loadBalancerRuleJSON struct {
- Condition apijson.Field
- Disabled apijson.Field
- FixedResponse apijson.Field
- Name apijson.Field
- Overrides apijson.Field
- Priority apijson.Field
- Terminates apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *LoadBalancerRule) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r loadBalancerRuleJSON) RawJSON() string {
- return r.raw
-}
-
-// A collection of fields used to directly respond to the eyeball instead of
-// routing to a pool. If a fixed_response is supplied the rule will be marked as
-// terminates.
-type LoadBalancerRulesFixedResponse struct {
- // The http 'Content-Type' header to include in the response.
- ContentType string `json:"content_type"`
- // The http 'Location' header to include in the response.
- Location string `json:"location"`
- // Text to include as the http body.
- MessageBody string `json:"message_body"`
- // The http status code to respond with.
- StatusCode int64 `json:"status_code"`
- JSON loadBalancerRulesFixedResponseJSON `json:"-"`
-}
-
-// loadBalancerRulesFixedResponseJSON contains the JSON metadata for the struct
-// [LoadBalancerRulesFixedResponse]
-type loadBalancerRulesFixedResponseJSON struct {
- ContentType apijson.Field
- Location apijson.Field
- MessageBody apijson.Field
- StatusCode apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *LoadBalancerRulesFixedResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r loadBalancerRulesFixedResponseJSON) RawJSON() string {
- return r.raw
-}
-
-// A collection of overrides to apply to the load balancer when this rule's
-// condition is true. All fields are optional.
-type LoadBalancerRulesOverrides struct {
- // Controls features that modify the routing of requests to pools and origins in
- // response to dynamic conditions, such as during the interval between active
- // health monitoring requests. For example, zero-downtime failover occurs
- // immediately when an origin becomes unavailable due to HTTP 521, 522, or 523
- // response codes. If there is another healthy origin in the same pool, the request
- // is retried once against this alternate origin.
- AdaptiveRouting AdaptiveRouting `json:"adaptive_routing"`
- // A mapping of country codes to a list of pool IDs (ordered by their failover
- // priority) for the given country. Any country not explicitly defined will fall
- // back to using the corresponding region_pool mapping if it exists else to
- // default_pools.
- CountryPools interface{} `json:"country_pools"`
- // A list of pool IDs ordered by their failover priority. Pools defined here are
- // used by default, or when region_pools are not configured for a given region.
- DefaultPools []string `json:"default_pools"`
- // The pool ID to use when all other pools are detected as unhealthy.
- FallbackPool interface{} `json:"fallback_pool"`
- // Controls location-based steering for non-proxied requests. See `steering_policy`
- // to learn how steering is affected.
- LocationStrategy LocationStrategy `json:"location_strategy"`
- // (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs
- // (ordered by their failover priority) for the PoP (datacenter). Any PoPs not
- // explicitly defined will fall back to using the corresponding country_pool, then
- // region_pool mapping if it exists else to default_pools.
- PopPools interface{} `json:"pop_pools"`
- // Configures pool weights.
- //
- // - `steering_policy="random"`: A random pool is selected with probability
- // proportional to pool weights.
- // - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each
- // pool's outstanding requests.
- // - `steering_policy="least_connections"`: Use pool weights to scale each pool's
- // open connections.
- RandomSteering RandomSteering `json:"random_steering"`
- // A mapping of region codes to a list of pool IDs (ordered by their failover
- // priority) for the given region. Any regions not explicitly defined will fall
- // back to using default_pools.
- RegionPools interface{} `json:"region_pools"`
- // Specifies the type of session affinity the load balancer should use unless
- // specified as `"none"` or "" (default). The supported types are:
- //
- // - `"cookie"`: On the first request to a proxied load balancer, a cookie is
- // generated, encoding information of which origin the request will be forwarded
- // to. Subsequent requests, by the same client to the same load balancer, will be
- // sent to the origin server the cookie encodes, for the duration of the cookie
- // and as long as the origin server remains healthy. If the cookie has expired or
- // the origin server is unhealthy, then a new origin server is calculated and
- // used.
- // - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin
- // selection is stable and based on the client's ip address.
- // - `"header"`: On the first request to a proxied load balancer, a session key
- // based on the configured HTTP headers (see
- // `session_affinity_attributes.headers`) is generated, encoding the request
- // headers used for storing in the load balancer session state which origin the
- // request will be forwarded to. Subsequent requests to the load balancer with
- // the same headers will be sent to the same origin server, for the duration of
- // the session and as long as the origin server remains healthy. If the session
- // has been idle for the duration of `session_affinity_ttl` seconds or the origin
- // server is unhealthy, then a new origin server is calculated and used. See
- // `headers` in `session_affinity_attributes` for additional required
- // configuration.
- SessionAffinity LoadBalancerRulesOverridesSessionAffinity `json:"session_affinity"`
- // Configures attributes for session affinity.
- SessionAffinityAttributes SessionAffinityAttributes `json:"session_affinity_attributes"`
- // Time, in seconds, until a client's session expires after being created. Once the
- // expiry time has been reached, subsequent requests may get sent to a different
- // origin server. The accepted ranges per `session_affinity` policy are:
- //
- // - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used
- // unless explicitly set. The accepted range of values is between [1800, 604800].
- // - `"header"`: The current default of 1800 seconds will be used unless explicitly
- // set. The accepted range of values is between [30, 3600]. Note: With session
- // affinity by header, sessions only expire after they haven't been used for the
- // number of seconds specified.
- SessionAffinityTTL float64 `json:"session_affinity_ttl"`
- // Steering Policy for this load balancer.
- //
- // - `"off"`: Use `default_pools`.
- // - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied
- // requests, the country for `country_pools` is determined by
- // `location_strategy`.
- // - `"random"`: Select a pool randomly.
- // - `"dynamic_latency"`: Use round trip time to select the closest pool in
- // default_pools (requires pool health checks).
- // - `"proximity"`: Use the pools' latitude and longitude to select the closest
- // pool using the Cloudflare PoP location for proxied requests or the location
- // determined by `location_strategy` for non-proxied requests.
- // - `"least_outstanding_requests"`: Select a pool by taking into consideration
- // `random_steering` weights, as well as each pool's number of outstanding
- // requests. Pools with more pending requests are weighted proportionately less
- // relative to others.
- // - `"least_connections"`: Select a pool by taking into consideration
- // `random_steering` weights, as well as each pool's number of open connections.
- // Pools with more open connections are weighted proportionately less relative to
- // others. Supported for HTTP/1 and HTTP/2 connections.
- // - `""`: Will map to `"geo"` if you use
- // `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
- SteeringPolicy LoadBalancerRulesOverridesSteeringPolicy `json:"steering_policy"`
- // Time to live (TTL) of the DNS entry for the IP address returned by this load
- // balancer. This only applies to gray-clouded (unproxied) load balancers.
- TTL float64 `json:"ttl"`
- JSON loadBalancerRulesOverridesJSON `json:"-"`
-}
-
-// loadBalancerRulesOverridesJSON contains the JSON metadata for the struct
-// [LoadBalancerRulesOverrides]
-type loadBalancerRulesOverridesJSON struct {
- AdaptiveRouting apijson.Field
- CountryPools apijson.Field
- DefaultPools apijson.Field
- FallbackPool apijson.Field
- LocationStrategy apijson.Field
- PopPools apijson.Field
- RandomSteering apijson.Field
- RegionPools apijson.Field
- SessionAffinity apijson.Field
- SessionAffinityAttributes apijson.Field
- SessionAffinityTTL apijson.Field
- SteeringPolicy apijson.Field
- TTL apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *LoadBalancerRulesOverrides) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r loadBalancerRulesOverridesJSON) RawJSON() string {
- return r.raw
-}
-
-// Specifies the type of session affinity the load balancer should use unless
-// specified as `"none"` or "" (default). The supported types are:
-//
-// - `"cookie"`: On the first request to a proxied load balancer, a cookie is
-// generated, encoding information of which origin the request will be forwarded
-// to. Subsequent requests, by the same client to the same load balancer, will be
-// sent to the origin server the cookie encodes, for the duration of the cookie
-// and as long as the origin server remains healthy. If the cookie has expired or
-// the origin server is unhealthy, then a new origin server is calculated and
-// used.
-// - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin
-// selection is stable and based on the client's ip address.
-// - `"header"`: On the first request to a proxied load balancer, a session key
-// based on the configured HTTP headers (see
-// `session_affinity_attributes.headers`) is generated, encoding the request
-// headers used for storing in the load balancer session state which origin the
-// request will be forwarded to. Subsequent requests to the load balancer with
-// the same headers will be sent to the same origin server, for the duration of
-// the session and as long as the origin server remains healthy. If the session
-// has been idle for the duration of `session_affinity_ttl` seconds or the origin
-// server is unhealthy, then a new origin server is calculated and used. See
-// `headers` in `session_affinity_attributes` for additional required
-// configuration.
-type LoadBalancerRulesOverridesSessionAffinity string
-
-const (
- LoadBalancerRulesOverridesSessionAffinityNone LoadBalancerRulesOverridesSessionAffinity = "none"
- LoadBalancerRulesOverridesSessionAffinityCookie LoadBalancerRulesOverridesSessionAffinity = "cookie"
- LoadBalancerRulesOverridesSessionAffinityIPCookie LoadBalancerRulesOverridesSessionAffinity = "ip_cookie"
- LoadBalancerRulesOverridesSessionAffinityHeader LoadBalancerRulesOverridesSessionAffinity = "header"
- LoadBalancerRulesOverridesSessionAffinityEmpty LoadBalancerRulesOverridesSessionAffinity = "\"\""
-)
-
-func (r LoadBalancerRulesOverridesSessionAffinity) IsKnown() bool {
- switch r {
- case LoadBalancerRulesOverridesSessionAffinityNone, LoadBalancerRulesOverridesSessionAffinityCookie, LoadBalancerRulesOverridesSessionAffinityIPCookie, LoadBalancerRulesOverridesSessionAffinityHeader, LoadBalancerRulesOverridesSessionAffinityEmpty:
- return true
- }
- return false
-}
-
-// Steering Policy for this load balancer.
-//
-// - `"off"`: Use `default_pools`.
-// - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied
-// requests, the country for `country_pools` is determined by
-// `location_strategy`.
-// - `"random"`: Select a pool randomly.
-// - `"dynamic_latency"`: Use round trip time to select the closest pool in
-// default_pools (requires pool health checks).
-// - `"proximity"`: Use the pools' latitude and longitude to select the closest
-// pool using the Cloudflare PoP location for proxied requests or the location
-// determined by `location_strategy` for non-proxied requests.
-// - `"least_outstanding_requests"`: Select a pool by taking into consideration
-// `random_steering` weights, as well as each pool's number of outstanding
-// requests. Pools with more pending requests are weighted proportionately less
-// relative to others.
-// - `"least_connections"`: Select a pool by taking into consideration
-// `random_steering` weights, as well as each pool's number of open connections.
-// Pools with more open connections are weighted proportionately less relative to
-// others. Supported for HTTP/1 and HTTP/2 connections.
-// - `""`: Will map to `"geo"` if you use
-// `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.
-type LoadBalancerRulesOverridesSteeringPolicy string
-
-const (
- LoadBalancerRulesOverridesSteeringPolicyOff LoadBalancerRulesOverridesSteeringPolicy = "off"
- LoadBalancerRulesOverridesSteeringPolicyGeo LoadBalancerRulesOverridesSteeringPolicy = "geo"
- LoadBalancerRulesOverridesSteeringPolicyRandom LoadBalancerRulesOverridesSteeringPolicy = "random"
- LoadBalancerRulesOverridesSteeringPolicyDynamicLatency LoadBalancerRulesOverridesSteeringPolicy = "dynamic_latency"
- LoadBalancerRulesOverridesSteeringPolicyProximity LoadBalancerRulesOverridesSteeringPolicy = "proximity"
- LoadBalancerRulesOverridesSteeringPolicyLeastOutstandingRequests LoadBalancerRulesOverridesSteeringPolicy = "least_outstanding_requests"
- LoadBalancerRulesOverridesSteeringPolicyLeastConnections LoadBalancerRulesOverridesSteeringPolicy = "least_connections"
- LoadBalancerRulesOverridesSteeringPolicyEmpty LoadBalancerRulesOverridesSteeringPolicy = "\"\""
-)
-
-func (r LoadBalancerRulesOverridesSteeringPolicy) IsKnown() bool {
- switch r {
- case LoadBalancerRulesOverridesSteeringPolicyOff, LoadBalancerRulesOverridesSteeringPolicyGeo, LoadBalancerRulesOverridesSteeringPolicyRandom, LoadBalancerRulesOverridesSteeringPolicyDynamicLatency, LoadBalancerRulesOverridesSteeringPolicyProximity, LoadBalancerRulesOverridesSteeringPolicyLeastOutstandingRequests, LoadBalancerRulesOverridesSteeringPolicyLeastConnections, LoadBalancerRulesOverridesSteeringPolicyEmpty:
- return true
- }
- return false
-}
-
// Specifies the type of session affinity the load balancer should use unless
// specified as `"none"` or "" (default). The supported types are:
//
@@ -1092,93 +786,6 @@ func (r NotificationFilterParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
-type Origin struct {
- // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable
- // hostname. Hostnames entered here should resolve directly to the origin, and not
- // be a hostname proxied by Cloudflare. To set an internal/reserved address,
- // virtual_network_id must also be set.
- Address string `json:"address"`
- // This field shows up only if the origin is disabled. This field is set with the
- // time the origin was disabled.
- DisabledAt time.Time `json:"disabled_at" format:"date-time"`
- // Whether to enable (the default) this origin within the pool. Disabled origins
- // will not receive traffic and are excluded from health checks. The origin will
- // only be disabled for the current pool.
- Enabled bool `json:"enabled"`
- // The request header is used to pass additional information with an HTTP request.
- // Currently supported header is 'Host'.
- Header Header `json:"header"`
- // A human-identifiable name for the origin.
- Name string `json:"name"`
- // The virtual network subnet ID the origin belongs in. Virtual network must also
- // belong to the account.
- VirtualNetworkID string `json:"virtual_network_id"`
- // The weight of this origin relative to other origins in the pool. Based on the
- // configured weight the total traffic is distributed among origins within the
- // pool.
- //
- // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the
- // origin's outstanding requests.
- // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's
- // open connections.
- Weight float64 `json:"weight"`
- JSON originJSON `json:"-"`
-}
-
-// originJSON contains the JSON metadata for the struct [Origin]
-type originJSON struct {
- Address apijson.Field
- DisabledAt apijson.Field
- Enabled apijson.Field
- Header apijson.Field
- Name apijson.Field
- VirtualNetworkID apijson.Field
- Weight apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *Origin) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r originJSON) RawJSON() string {
- return r.raw
-}
-
-type OriginParam struct {
- // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable
- // hostname. Hostnames entered here should resolve directly to the origin, and not
- // be a hostname proxied by Cloudflare. To set an internal/reserved address,
- // virtual_network_id must also be set.
- Address param.Field[string] `json:"address"`
- // Whether to enable (the default) this origin within the pool. Disabled origins
- // will not receive traffic and are excluded from health checks. The origin will
- // only be disabled for the current pool.
- Enabled param.Field[bool] `json:"enabled"`
- // The request header is used to pass additional information with an HTTP request.
- // Currently supported header is 'Host'.
- Header param.Field[HeaderParam] `json:"header"`
- // A human-identifiable name for the origin.
- Name param.Field[string] `json:"name"`
- // The virtual network subnet ID the origin belongs in. Virtual network must also
- // belong to the account.
- VirtualNetworkID param.Field[string] `json:"virtual_network_id"`
- // The weight of this origin relative to other origins in the pool. Based on the
- // configured weight the total traffic is distributed among origins within the
- // pool.
- //
- // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the
- // origin's outstanding requests.
- // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's
- // open connections.
- Weight param.Field[float64] `json:"weight"`
-}
-
-func (r OriginParam) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
type OriginItem struct {
// The IP address (IPv4 or IPv6) of the origin, or its publicly addressable
// hostname. Hostnames entered here should resolve directly to the origin, and not
diff --git a/magic_network_monitoring/config.go b/magic_network_monitoring/config.go
index 2bec5975c60..86adcb67d43 100644
--- a/magic_network_monitoring/config.go
+++ b/magic_network_monitoring/config.go
@@ -126,6 +126,19 @@ func (r configurationJSON) RawJSON() string {
return r.raw
}
+type ConfigurationParam struct {
+ // Fallback sampling rate of flow messages being sent in packets per second. This
+ // should match the packet sampling rate configured on the router.
+ DefaultSampling param.Field[float64] `json:"default_sampling,required"`
+ // The account name.
+ Name param.Field[string] `json:"name,required"`
+ RouterIPs param.Field[[]string] `json:"router_ips,required"`
+}
+
+func (r ConfigurationParam) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
type ConfigNewParams struct {
AccountID param.Field[string] `path:"account_id,required"`
Body param.Field[interface{}] `json:"body,required"`
diff --git a/origin_tls_client_auth/hostname.go b/origin_tls_client_auth/hostname.go
index 0086dea88aa..352716779b8 100644
--- a/origin_tls_client_auth/hostname.go
+++ b/origin_tls_client_auth/hostname.go
@@ -39,7 +39,7 @@ func NewHostnameService(opts ...option.RequestOption) (r *HostnameService) {
// even if activated at the zone level. 100 maximum associations on a single
// certificate are allowed. Note: Use a null value for parameter _enabled_ to
// invalidate the association.
-func (r *HostnameService) Update(ctx context.Context, params HostnameUpdateParams, opts ...option.RequestOption) (res *[]ID, err error) {
+func (r *HostnameService) Update(ctx context.Context, params HostnameUpdateParams, opts ...option.RequestOption) (res *[]AuthenticatedOriginPull, err error) {
opts = append(r.Options[:], opts...)
var env HostnameUpdateResponseEnvelope
path := fmt.Sprintf("zones/%s/origin_tls_client_auth/hostnames", params.ZoneID)
@@ -64,6 +64,45 @@ func (r *HostnameService) Get(ctx context.Context, hostname string, query Hostna
return
}
+type AuthenticatedOriginPull struct {
+ // Identifier
+ ID string `json:"id"`
+ // Identifier
+ CERTID string `json:"cert_id"`
+ // The hostname certificate.
+ Certificate string `json:"certificate"`
+ // Indicates whether hostname-level authenticated origin pulls is enabled. A null
+ // value voids the association.
+ Enabled bool `json:"enabled,nullable"`
+ // The hostname on the origin for which the client certificate uploaded will be
+ // used.
+ Hostname string `json:"hostname"`
+ // The hostname certificate's private key.
+ PrivateKey string `json:"private_key"`
+ JSON authenticatedOriginPullJSON `json:"-"`
+}
+
+// authenticatedOriginPullJSON contains the JSON metadata for the struct
+// [AuthenticatedOriginPull]
+type authenticatedOriginPullJSON struct {
+ ID apijson.Field
+ CERTID apijson.Field
+ Certificate apijson.Field
+ Enabled apijson.Field
+ Hostname apijson.Field
+ PrivateKey apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *AuthenticatedOriginPull) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r authenticatedOriginPullJSON) RawJSON() string {
+ return r.raw
+}
+
type ID struct {
// Identifier
CERTID string `json:"cert_id"`
@@ -196,7 +235,7 @@ func (r HostnameUpdateParamsConfig) MarshalJSON() (data []byte, err error) {
type HostnameUpdateResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result []ID `json:"result,required,nullable"`
+ Result []AuthenticatedOriginPull `json:"result,required,nullable"`
// Whether the API call was successful
Success HostnameUpdateResponseEnvelopeSuccess `json:"success,required"`
ResultInfo HostnameUpdateResponseEnvelopeResultInfo `json:"result_info"`
diff --git a/origin_tls_client_auth/hostnamecertificate.go b/origin_tls_client_auth/hostnamecertificate.go
index d2260751278..9bbe5f07437 100644
--- a/origin_tls_client_auth/hostnamecertificate.go
+++ b/origin_tls_client_auth/hostnamecertificate.go
@@ -49,7 +49,7 @@ func (r *HostnameCertificateService) New(ctx context.Context, params HostnameCer
}
// List Certificates
-func (r *HostnameCertificateService) List(ctx context.Context, query HostnameCertificateListParams, opts ...option.RequestOption) (res *pagination.SinglePage[ID], err error) {
+func (r *HostnameCertificateService) List(ctx context.Context, query HostnameCertificateListParams, opts ...option.RequestOption) (res *pagination.SinglePage[AuthenticatedOriginPull], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -67,7 +67,7 @@ func (r *HostnameCertificateService) List(ctx context.Context, query HostnameCer
}
// List Certificates
-func (r *HostnameCertificateService) ListAutoPaging(ctx context.Context, query HostnameCertificateListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ID] {
+func (r *HostnameCertificateService) ListAutoPaging(ctx context.Context, query HostnameCertificateListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[AuthenticatedOriginPull] {
return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...))
}
diff --git a/origin_tls_client_auth/origintlsclientauth.go b/origin_tls_client_auth/origintlsclientauth.go
index d3c03eab39e..613fc2b0390 100644
--- a/origin_tls_client_auth/origintlsclientauth.go
+++ b/origin_tls_client_auth/origintlsclientauth.go
@@ -55,7 +55,7 @@ func (r *OriginTLSClientAuthService) New(ctx context.Context, params OriginTLSCl
}
// List Certificates
-func (r *OriginTLSClientAuthService) List(ctx context.Context, query OriginTLSClientAuthListParams, opts ...option.RequestOption) (res *pagination.SinglePage[OriginTLSClientAuthListResponse], err error) {
+func (r *OriginTLSClientAuthService) List(ctx context.Context, query OriginTLSClientAuthListParams, opts ...option.RequestOption) (res *pagination.SinglePage[ZoneAuthenticatedOriginPull], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -73,7 +73,7 @@ func (r *OriginTLSClientAuthService) List(ctx context.Context, query OriginTLSCl
}
// List Certificates
-func (r *OriginTLSClientAuthService) ListAutoPaging(ctx context.Context, query OriginTLSClientAuthListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[OriginTLSClientAuthListResponse] {
+func (r *OriginTLSClientAuthService) ListAutoPaging(ctx context.Context, query OriginTLSClientAuthListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ZoneAuthenticatedOriginPull] {
return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...))
}
@@ -103,7 +103,7 @@ func (r *OriginTLSClientAuthService) Get(ctx context.Context, certificateID stri
return
}
-type OriginTLSClientAuthListResponse struct {
+type ZoneAuthenticatedOriginPull struct {
// Identifier
ID string `json:"id"`
// The zone's leaf certificate.
@@ -111,13 +111,13 @@ type OriginTLSClientAuthListResponse struct {
// Indicates whether zone-level authenticated origin pulls is enabled.
Enabled bool `json:"enabled"`
// The zone's private key.
- PrivateKey string `json:"private_key"`
- JSON originTLSClientAuthListResponseJSON `json:"-"`
+ PrivateKey string `json:"private_key"`
+ JSON zoneAuthenticatedOriginPullJSON `json:"-"`
}
-// originTLSClientAuthListResponseJSON contains the JSON metadata for the struct
-// [OriginTLSClientAuthListResponse]
-type originTLSClientAuthListResponseJSON struct {
+// zoneAuthenticatedOriginPullJSON contains the JSON metadata for the struct
+// [ZoneAuthenticatedOriginPull]
+type zoneAuthenticatedOriginPullJSON struct {
ID apijson.Field
Certificate apijson.Field
Enabled apijson.Field
@@ -126,11 +126,11 @@ type originTLSClientAuthListResponseJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *OriginTLSClientAuthListResponse) UnmarshalJSON(data []byte) (err error) {
+func (r *ZoneAuthenticatedOriginPull) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r originTLSClientAuthListResponseJSON) RawJSON() string {
+func (r zoneAuthenticatedOriginPullJSON) RawJSON() string {
return r.raw
}
diff --git a/pagerules/pagerule.go b/pagerules/pagerule.go
index 6a4339b92ab..f7a809540a9 100644
--- a/pagerules/pagerule.go
+++ b/pagerules/pagerule.go
@@ -224,7 +224,7 @@ type PageRule struct {
ID string `json:"id,required"`
// The set of actions to perform if the targets of this rule match the request.
// Actions can redirect to another URL or override settings, but not both.
- Actions []Route `json:"actions,required"`
+ Actions []ActionItem `json:"actions,required"`
// The timestamp of when the Page Rule was created.
CreatedOn time.Time `json:"created_on,required" format:"date-time"`
// The timestamp of when the Page Rule was last modified.
@@ -238,7 +238,7 @@ type PageRule struct {
// The status of the Page Rule.
Status PageRuleStatus `json:"status,required"`
// The rule targets to evaluate on each request.
- Targets []URLTarget `json:"targets,required"`
+ Targets []TargesItem `json:"targets,required"`
JSON pageRuleJSON `json:"-"`
}
@@ -362,28 +362,55 @@ func (r RouteValueType) IsKnown() bool {
}
// A request condition target.
-type TargesItemParam struct {
+type TargesItem struct {
// String constraint.
- Constraint param.Field[TargesItemConstraintParam] `json:"constraint,required"`
+ Constraint TargesItemConstraint `json:"constraint,required"`
// A target based on the URL of the request.
- Target param.Field[TargesItemTarget] `json:"target,required"`
+ Target TargesItemTarget `json:"target,required"`
+ JSON targesItemJSON `json:"-"`
}
-func (r TargesItemParam) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
+// targesItemJSON contains the JSON metadata for the struct [TargesItem]
+type targesItemJSON struct {
+ Constraint apijson.Field
+ Target apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TargesItem) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r targesItemJSON) RawJSON() string {
+ return r.raw
}
// String constraint.
-type TargesItemConstraintParam struct {
+type TargesItemConstraint struct {
// The matches operator can use asterisks and pipes as wildcard and 'or' operators.
- Operator param.Field[TargesItemConstraintOperator] `json:"operator,required"`
+ Operator TargesItemConstraintOperator `json:"operator,required"`
// The URL pattern to match against the current request. The pattern may contain up
// to four asterisks ('\*') as placeholders.
- Value param.Field[string] `json:"value,required"`
+ Value string `json:"value,required"`
+ JSON targesItemConstraintJSON `json:"-"`
}
-func (r TargesItemConstraintParam) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
+// targesItemConstraintJSON contains the JSON metadata for the struct
+// [TargesItemConstraint]
+type targesItemConstraintJSON struct {
+ Operator apijson.Field
+ Value apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *TargesItemConstraint) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r targesItemConstraintJSON) RawJSON() string {
+ return r.raw
}
// The matches operator can use asterisks and pipes as wildcard and 'or' operators.
@@ -420,90 +447,29 @@ func (r TargesItemTarget) IsKnown() bool {
return false
}
-// URL target.
-type URLTarget struct {
+// A request condition target.
+type TargesItemParam struct {
// String constraint.
- Constraint URLTargetConstraint `json:"constraint"`
+ Constraint param.Field[TargesItemConstraintParam] `json:"constraint,required"`
// A target based on the URL of the request.
- Target URLTargetTarget `json:"target"`
- JSON urlTargetJSON `json:"-"`
-}
-
-// urlTargetJSON contains the JSON metadata for the struct [URLTarget]
-type urlTargetJSON struct {
- Constraint apijson.Field
- Target apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *URLTarget) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
+ Target param.Field[TargesItemTarget] `json:"target,required"`
}
-func (r urlTargetJSON) RawJSON() string {
- return r.raw
+func (r TargesItemParam) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
}
// String constraint.
-type URLTargetConstraint struct {
+type TargesItemConstraintParam struct {
// The matches operator can use asterisks and pipes as wildcard and 'or' operators.
- Operator URLTargetConstraintOperator `json:"operator,required"`
+ Operator param.Field[TargesItemConstraintOperator] `json:"operator,required"`
// The URL pattern to match against the current request. The pattern may contain up
// to four asterisks ('\*') as placeholders.
- Value string `json:"value,required"`
- JSON urlTargetConstraintJSON `json:"-"`
-}
-
-// urlTargetConstraintJSON contains the JSON metadata for the struct
-// [URLTargetConstraint]
-type urlTargetConstraintJSON struct {
- Operator apijson.Field
- Value apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *URLTargetConstraint) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r urlTargetConstraintJSON) RawJSON() string {
- return r.raw
-}
-
-// The matches operator can use asterisks and pipes as wildcard and 'or' operators.
-type URLTargetConstraintOperator string
-
-const (
- URLTargetConstraintOperatorMatches URLTargetConstraintOperator = "matches"
- URLTargetConstraintOperatorContains URLTargetConstraintOperator = "contains"
- URLTargetConstraintOperatorEquals URLTargetConstraintOperator = "equals"
- URLTargetConstraintOperatorNotEqual URLTargetConstraintOperator = "not_equal"
- URLTargetConstraintOperatorNotContain URLTargetConstraintOperator = "not_contain"
-)
-
-func (r URLTargetConstraintOperator) IsKnown() bool {
- switch r {
- case URLTargetConstraintOperatorMatches, URLTargetConstraintOperatorContains, URLTargetConstraintOperatorEquals, URLTargetConstraintOperatorNotEqual, URLTargetConstraintOperatorNotContain:
- return true
- }
- return false
+ Value param.Field[string] `json:"value,required"`
}
-// A target based on the URL of the request.
-type URLTargetTarget string
-
-const (
- URLTargetTargetURL URLTargetTarget = "url"
-)
-
-func (r URLTargetTarget) IsKnown() bool {
- switch r {
- case URLTargetTargetURL:
- return true
- }
- return false
+func (r TargesItemConstraintParam) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
}
type PageruleDeleteResponse struct {
diff --git a/rate_plans/rateplan.go b/rate_plans/rateplan.go
index 3737a209622..97b0a1a2dfb 100644
--- a/rate_plans/rateplan.go
+++ b/rate_plans/rateplan.go
@@ -31,7 +31,7 @@ func NewRatePlanService(opts ...option.RequestOption) (r *RatePlanService) {
}
// Lists all rate plans the zone can subscribe to.
-func (r *RatePlanService) Get(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *[]RatePlanGetResponse, err error) {
+func (r *RatePlanService) Get(ctx context.Context, zoneIdentifier string, opts ...option.RequestOption) (res *[]RatePlan, err error) {
opts = append(r.Options[:], opts...)
var env RatePlanGetResponseEnvelope
path := fmt.Sprintf("zones/%s/available_rate_plans", zoneIdentifier)
@@ -88,7 +88,7 @@ func (r ComponentName) IsKnown() bool {
return false
}
-type RatePlanGetResponse struct {
+type RatePlan struct {
// Plan identifier tag.
ID string `json:"id"`
// Array of available components values for the plan.
@@ -98,15 +98,14 @@ type RatePlanGetResponse struct {
// The duration of the plan subscription.
Duration float64 `json:"duration"`
// The frequency at which you will be billed for this plan.
- Frequency RatePlanGetResponseFrequency `json:"frequency"`
+ Frequency RatePlanFrequency `json:"frequency"`
// The plan name.
- Name string `json:"name"`
- JSON ratePlanGetResponseJSON `json:"-"`
+ Name string `json:"name"`
+ JSON ratePlanJSON `json:"-"`
}
-// ratePlanGetResponseJSON contains the JSON metadata for the struct
-// [RatePlanGetResponse]
-type ratePlanGetResponseJSON struct {
+// ratePlanJSON contains the JSON metadata for the struct [RatePlan]
+type ratePlanJSON struct {
ID apijson.Field
Components apijson.Field
Currency apijson.Field
@@ -117,27 +116,27 @@ type ratePlanGetResponseJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *RatePlanGetResponse) UnmarshalJSON(data []byte) (err error) {
+func (r *RatePlan) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r ratePlanGetResponseJSON) RawJSON() string {
+func (r ratePlanJSON) RawJSON() string {
return r.raw
}
// The frequency at which you will be billed for this plan.
-type RatePlanGetResponseFrequency string
+type RatePlanFrequency string
const (
- RatePlanGetResponseFrequencyWeekly RatePlanGetResponseFrequency = "weekly"
- RatePlanGetResponseFrequencyMonthly RatePlanGetResponseFrequency = "monthly"
- RatePlanGetResponseFrequencyQuarterly RatePlanGetResponseFrequency = "quarterly"
- RatePlanGetResponseFrequencyYearly RatePlanGetResponseFrequency = "yearly"
+ RatePlanFrequencyWeekly RatePlanFrequency = "weekly"
+ RatePlanFrequencyMonthly RatePlanFrequency = "monthly"
+ RatePlanFrequencyQuarterly RatePlanFrequency = "quarterly"
+ RatePlanFrequencyYearly RatePlanFrequency = "yearly"
)
-func (r RatePlanGetResponseFrequency) IsKnown() bool {
+func (r RatePlanFrequency) IsKnown() bool {
switch r {
- case RatePlanGetResponseFrequencyWeekly, RatePlanGetResponseFrequencyMonthly, RatePlanGetResponseFrequencyQuarterly, RatePlanGetResponseFrequencyYearly:
+ case RatePlanFrequencyWeekly, RatePlanFrequencyMonthly, RatePlanFrequencyQuarterly, RatePlanFrequencyYearly:
return true
}
return false
@@ -146,7 +145,7 @@ func (r RatePlanGetResponseFrequency) IsKnown() bool {
type RatePlanGetResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result []RatePlanGetResponse `json:"result,required,nullable"`
+ Result []RatePlan `json:"result,required,nullable"`
// Whether the API call was successful
Success RatePlanGetResponseEnvelopeSuccess `json:"success,required"`
ResultInfo RatePlanGetResponseEnvelopeResultInfo `json:"result_info"`
diff --git a/registrar/domain.go b/registrar/domain.go
index 4d8272c6078..46ed73bbaf9 100644
--- a/registrar/domain.go
+++ b/registrar/domain.go
@@ -47,7 +47,7 @@ func (r *DomainService) Update(ctx context.Context, domainName string, params Do
}
// List domains handled by Registrar.
-func (r *DomainService) List(ctx context.Context, query DomainListParams, opts ...option.RequestOption) (res *pagination.SinglePage[DomainListResponse], err error) {
+func (r *DomainService) List(ctx context.Context, query DomainListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Domain], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -65,7 +65,7 @@ func (r *DomainService) List(ctx context.Context, query DomainListParams, opts .
}
// List domains handled by Registrar.
-func (r *DomainService) ListAutoPaging(ctx context.Context, query DomainListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[DomainListResponse] {
+func (r *DomainService) ListAutoPaging(ctx context.Context, query DomainListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Domain] {
return pagination.NewSinglePageAutoPager(r.List(ctx, query, opts...))
}
@@ -237,162 +237,6 @@ func (r domainTransferInJSON) RawJSON() string {
return r.raw
}
-type DomainListResponse struct {
- // Domain identifier.
- ID string `json:"id"`
- // Shows if a domain is available for transferring into Cloudflare Registrar.
- Available bool `json:"available"`
- // Indicates if the domain can be registered as a new domain.
- CanRegister bool `json:"can_register"`
- // Shows time of creation.
- CreatedAt time.Time `json:"created_at" format:"date-time"`
- // Shows name of current registrar.
- CurrentRegistrar string `json:"current_registrar"`
- // Shows when domain name registration expires.
- ExpiresAt time.Time `json:"expires_at" format:"date-time"`
- // Shows whether a registrar lock is in place for a domain.
- Locked bool `json:"locked"`
- // Shows contact information for domain registrant.
- RegistrantContact DomainListResponseRegistrantContact `json:"registrant_contact"`
- // A comma-separated list of registry status codes. A full list of status codes can
- // be found at
- // [EPP Status Codes](https://www.icann.org/resources/pages/epp-status-codes-2014-06-16-en).
- RegistryStatuses string `json:"registry_statuses"`
- // Whether a particular TLD is currently supported by Cloudflare Registrar. Refer
- // to [TLD Policies](https://www.cloudflare.com/tld-policies/) for a list of
- // supported TLDs.
- SupportedTld bool `json:"supported_tld"`
- // Statuses for domain transfers into Cloudflare Registrar.
- TransferIn DomainListResponseTransferIn `json:"transfer_in"`
- // Last updated.
- UpdatedAt time.Time `json:"updated_at" format:"date-time"`
- JSON domainListResponseJSON `json:"-"`
-}
-
-// domainListResponseJSON contains the JSON metadata for the struct
-// [DomainListResponse]
-type domainListResponseJSON struct {
- ID apijson.Field
- Available apijson.Field
- CanRegister apijson.Field
- CreatedAt apijson.Field
- CurrentRegistrar apijson.Field
- ExpiresAt apijson.Field
- Locked apijson.Field
- RegistrantContact apijson.Field
- RegistryStatuses apijson.Field
- SupportedTld apijson.Field
- TransferIn apijson.Field
- UpdatedAt apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DomainListResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r domainListResponseJSON) RawJSON() string {
- return r.raw
-}
-
-// Shows contact information for domain registrant.
-type DomainListResponseRegistrantContact struct {
- // Address.
- Address string `json:"address,required"`
- // City.
- City string `json:"city,required"`
- // The country in which the user lives.
- Country string `json:"country,required,nullable"`
- // User's first name
- FirstName string `json:"first_name,required,nullable"`
- // User's last name
- LastName string `json:"last_name,required,nullable"`
- // Name of organization.
- Organization string `json:"organization,required"`
- // User's telephone number
- Phone string `json:"phone,required,nullable"`
- // State.
- State string `json:"state,required"`
- // The zipcode or postal code where the user lives.
- Zip string `json:"zip,required,nullable"`
- // Contact Identifier.
- ID string `json:"id"`
- // Optional address line for unit, floor, suite, etc.
- Address2 string `json:"address2"`
- // The contact email address of the user.
- Email string `json:"email"`
- // Contact fax number.
- Fax string `json:"fax"`
- JSON domainListResponseRegistrantContactJSON `json:"-"`
-}
-
-// domainListResponseRegistrantContactJSON contains the JSON metadata for the
-// struct [DomainListResponseRegistrantContact]
-type domainListResponseRegistrantContactJSON struct {
- Address apijson.Field
- City apijson.Field
- Country apijson.Field
- FirstName apijson.Field
- LastName apijson.Field
- Organization apijson.Field
- Phone apijson.Field
- State apijson.Field
- Zip apijson.Field
- ID apijson.Field
- Address2 apijson.Field
- Email apijson.Field
- Fax apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DomainListResponseRegistrantContact) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r domainListResponseRegistrantContactJSON) RawJSON() string {
- return r.raw
-}
-
-// Statuses for domain transfers into Cloudflare Registrar.
-type DomainListResponseTransferIn struct {
- // Form of authorization has been accepted by the registrant.
- AcceptFoa string `json:"accept_foa"`
- // Shows transfer status with the registry.
- ApproveTransfer string `json:"approve_transfer"`
- // Indicates if cancellation is still possible.
- CanCancelTransfer bool `json:"can_cancel_transfer"`
- // Privacy guards are disabled at the foreign registrar.
- DisablePrivacy interface{} `json:"disable_privacy"`
- // Auth code has been entered and verified.
- EnterAuthCode string `json:"enter_auth_code"`
- // Domain is unlocked at the foreign registrar.
- UnlockDomain interface{} `json:"unlock_domain"`
- JSON domainListResponseTransferInJSON `json:"-"`
-}
-
-// domainListResponseTransferInJSON contains the JSON metadata for the struct
-// [DomainListResponseTransferIn]
-type domainListResponseTransferInJSON struct {
- AcceptFoa apijson.Field
- ApproveTransfer apijson.Field
- CanCancelTransfer apijson.Field
- DisablePrivacy apijson.Field
- EnterAuthCode apijson.Field
- UnlockDomain apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *DomainListResponseTransferIn) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r domainListResponseTransferInJSON) RawJSON() string {
- return r.raw
-}
-
type DomainUpdateParams struct {
// Identifier
AccountID param.Field[string] `path:"account_id,required"`
diff --git a/stream/stream.go b/stream/stream.go
index 9aafcd892f3..c859a1dd4be 100644
--- a/stream/stream.go
+++ b/stream/stream.go
@@ -128,7 +128,7 @@ type Video struct {
// Lists the origins allowed to display the video. Enter allowed origin domains in
// an array and use `*` for wildcard subdomains. Empty arrays allow the video to be
// viewed on any origin.
- AllowedOrigins []string `json:"allowedOrigins"`
+ AllowedOrigins []AllowedOriginsItem `json:"allowedOrigins"`
// The date and time the media item was created.
Created time.Time `json:"created" format:"date-time"`
// A user-defined identifier for the media creator.
diff --git a/subscriptions/subscription.go b/subscriptions/subscription.go
index 1b58c9a4c6f..78402389cda 100644
--- a/subscriptions/subscription.go
+++ b/subscriptions/subscription.go
@@ -6,7 +6,6 @@ import (
"context"
"fmt"
"net/http"
- "time"
"github.com/cloudflare/cloudflare-go/v2/internal/apijson"
"github.com/cloudflare/cloudflare-go/v2/internal/pagination"
@@ -14,6 +13,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/internal/requestconfig"
"github.com/cloudflare/cloudflare-go/v2/internal/shared"
"github.com/cloudflare/cloudflare-go/v2/option"
+ "github.com/cloudflare/cloudflare-go/v2/user"
)
// SubscriptionService contains methods and other services that help with
@@ -61,7 +61,7 @@ func (r *SubscriptionService) Update(ctx context.Context, accountIdentifier stri
}
// Lists all of an account's subscriptions.
-func (r *SubscriptionService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[SubscriptionListResponse], err error) {
+func (r *SubscriptionService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[user.Subscription], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -79,7 +79,7 @@ func (r *SubscriptionService) List(ctx context.Context, accountIdentifier string
}
// Lists all of an account's subscriptions.
-func (r *SubscriptionService) ListAutoPaging(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[SubscriptionListResponse] {
+func (r *SubscriptionService) ListAutoPaging(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[user.Subscription] {
return pagination.NewSinglePageAutoPager(r.List(ctx, accountIdentifier, opts...))
}
@@ -109,218 +109,6 @@ func (r *SubscriptionService) Get(ctx context.Context, identifier string, opts .
return
}
-type SubscriptionListResponse struct {
- // Subscription identifier tag.
- ID string `json:"id"`
- App SubscriptionListResponseApp `json:"app"`
- // The list of add-ons subscribed to.
- ComponentValues []SubscriptionListResponseComponentValue `json:"component_values"`
- // The monetary unit in which pricing information is displayed.
- Currency string `json:"currency"`
- // The end of the current period and also when the next billing is due.
- CurrentPeriodEnd time.Time `json:"current_period_end" format:"date-time"`
- // When the current billing period started. May match initial_period_start if this
- // is the first period.
- CurrentPeriodStart time.Time `json:"current_period_start" format:"date-time"`
- // How often the subscription is renewed automatically.
- Frequency SubscriptionListResponseFrequency `json:"frequency"`
- // The price of the subscription that will be billed, in US dollars.
- Price float64 `json:"price"`
- // The rate plan applied to the subscription.
- RatePlan SubscriptionListResponseRatePlan `json:"rate_plan"`
- // The state that the subscription is in.
- State SubscriptionListResponseState `json:"state"`
- // A simple zone object. May have null properties if not a zone subscription.
- Zone SubscriptionListResponseZone `json:"zone"`
- JSON subscriptionListResponseJSON `json:"-"`
-}
-
-// subscriptionListResponseJSON contains the JSON metadata for the struct
-// [SubscriptionListResponse]
-type subscriptionListResponseJSON struct {
- ID apijson.Field
- App apijson.Field
- ComponentValues apijson.Field
- Currency apijson.Field
- CurrentPeriodEnd apijson.Field
- CurrentPeriodStart apijson.Field
- Frequency apijson.Field
- Price apijson.Field
- RatePlan apijson.Field
- State apijson.Field
- Zone apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type SubscriptionListResponseApp struct {
- // app install id.
- InstallID string `json:"install_id"`
- JSON subscriptionListResponseAppJSON `json:"-"`
-}
-
-// subscriptionListResponseAppJSON contains the JSON metadata for the struct
-// [SubscriptionListResponseApp]
-type subscriptionListResponseAppJSON struct {
- InstallID apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponseApp) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseAppJSON) RawJSON() string {
- return r.raw
-}
-
-// A component value for a subscription.
-type SubscriptionListResponseComponentValue struct {
- // The default amount assigned.
- Default float64 `json:"default"`
- // The name of the component value.
- Name string `json:"name"`
- // The unit price for the component value.
- Price float64 `json:"price"`
- // The amount of the component value assigned.
- Value float64 `json:"value"`
- JSON subscriptionListResponseComponentValueJSON `json:"-"`
-}
-
-// subscriptionListResponseComponentValueJSON contains the JSON metadata for the
-// struct [SubscriptionListResponseComponentValue]
-type subscriptionListResponseComponentValueJSON struct {
- Default apijson.Field
- Name apijson.Field
- Price apijson.Field
- Value apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponseComponentValue) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseComponentValueJSON) RawJSON() string {
- return r.raw
-}
-
-// How often the subscription is renewed automatically.
-type SubscriptionListResponseFrequency string
-
-const (
- SubscriptionListResponseFrequencyWeekly SubscriptionListResponseFrequency = "weekly"
- SubscriptionListResponseFrequencyMonthly SubscriptionListResponseFrequency = "monthly"
- SubscriptionListResponseFrequencyQuarterly SubscriptionListResponseFrequency = "quarterly"
- SubscriptionListResponseFrequencyYearly SubscriptionListResponseFrequency = "yearly"
-)
-
-func (r SubscriptionListResponseFrequency) IsKnown() bool {
- switch r {
- case SubscriptionListResponseFrequencyWeekly, SubscriptionListResponseFrequencyMonthly, SubscriptionListResponseFrequencyQuarterly, SubscriptionListResponseFrequencyYearly:
- return true
- }
- return false
-}
-
-// The rate plan applied to the subscription.
-type SubscriptionListResponseRatePlan struct {
- // The ID of the rate plan.
- ID string `json:"id"`
- // The currency applied to the rate plan subscription.
- Currency string `json:"currency"`
- // Whether this rate plan is managed externally from Cloudflare.
- ExternallyManaged bool `json:"externally_managed"`
- // Whether a rate plan is enterprise-based (or newly adopted term contract).
- IsContract bool `json:"is_contract"`
- // The full name of the rate plan.
- PublicName string `json:"public_name"`
- // The scope that this rate plan applies to.
- Scope string `json:"scope"`
- // The list of sets this rate plan applies to.
- Sets []string `json:"sets"`
- JSON subscriptionListResponseRatePlanJSON `json:"-"`
-}
-
-// subscriptionListResponseRatePlanJSON contains the JSON metadata for the struct
-// [SubscriptionListResponseRatePlan]
-type subscriptionListResponseRatePlanJSON struct {
- ID apijson.Field
- Currency apijson.Field
- ExternallyManaged apijson.Field
- IsContract apijson.Field
- PublicName apijson.Field
- Scope apijson.Field
- Sets apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponseRatePlan) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseRatePlanJSON) RawJSON() string {
- return r.raw
-}
-
-// The state that the subscription is in.
-type SubscriptionListResponseState string
-
-const (
- SubscriptionListResponseStateTrial SubscriptionListResponseState = "Trial"
- SubscriptionListResponseStateProvisioned SubscriptionListResponseState = "Provisioned"
- SubscriptionListResponseStatePaid SubscriptionListResponseState = "Paid"
- SubscriptionListResponseStateAwaitingPayment SubscriptionListResponseState = "AwaitingPayment"
- SubscriptionListResponseStateCancelled SubscriptionListResponseState = "Cancelled"
- SubscriptionListResponseStateFailed SubscriptionListResponseState = "Failed"
- SubscriptionListResponseStateExpired SubscriptionListResponseState = "Expired"
-)
-
-func (r SubscriptionListResponseState) IsKnown() bool {
- switch r {
- case SubscriptionListResponseStateTrial, SubscriptionListResponseStateProvisioned, SubscriptionListResponseStatePaid, SubscriptionListResponseStateAwaitingPayment, SubscriptionListResponseStateCancelled, SubscriptionListResponseStateFailed, SubscriptionListResponseStateExpired:
- return true
- }
- return false
-}
-
-// A simple zone object. May have null properties if not a zone subscription.
-type SubscriptionListResponseZone struct {
- // Identifier
- ID string `json:"id"`
- // The domain name
- Name string `json:"name"`
- JSON subscriptionListResponseZoneJSON `json:"-"`
-}
-
-// subscriptionListResponseZoneJSON contains the JSON metadata for the struct
-// [SubscriptionListResponseZone]
-type subscriptionListResponseZoneJSON struct {
- ID apijson.Field
- Name apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponseZone) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseZoneJSON) RawJSON() string {
- return r.raw
-}
-
type SubscriptionDeleteResponse struct {
// Subscription identifier tag.
SubscriptionID string `json:"subscription_id"`
diff --git a/user/loadbalancerpool.go b/user/loadbalancerpool.go
index c2156812f7d..b4ed95647a9 100644
--- a/user/loadbalancerpool.go
+++ b/user/loadbalancerpool.go
@@ -171,8 +171,8 @@ type Pool struct {
ID string `json:"id"`
// A list of regions from which to run health checks. Null means every Cloudflare
// data center.
- CheckRegions []PoolCheckRegion `json:"check_regions,nullable"`
- CreatedOn time.Time `json:"created_on" format:"date-time"`
+ CheckRegions []load_balancers.CheckRegion `json:"check_regions,nullable"`
+ CreatedOn time.Time `json:"created_on" format:"date-time"`
// A human-readable description of the pool.
Description string `json:"description"`
// This field shows up only if the pool is disabled. This field is set with the
@@ -215,8 +215,8 @@ type Pool struct {
OriginSteering load_balancers.OriginSteering `json:"origin_steering"`
// The list of origins within this pool. Traffic directed at this pool is balanced
// across all currently healthy origins, provided the pool itself is healthy.
- Origins []load_balancers.Origin `json:"origins"`
- JSON poolJSON `json:"-"`
+ Origins []load_balancers.OriginItem `json:"origins"`
+ JSON poolJSON `json:"-"`
}
// poolJSON contains the JSON metadata for the struct [Pool]
@@ -250,38 +250,6 @@ func (r poolJSON) RawJSON() string {
return r.raw
}
-// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe,
-// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America,
-// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS:
-// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all
-// regions (ENTERPRISE customers only).
-type PoolCheckRegion string
-
-const (
- PoolCheckRegionWnam PoolCheckRegion = "WNAM"
- PoolCheckRegionEnam PoolCheckRegion = "ENAM"
- PoolCheckRegionWeu PoolCheckRegion = "WEU"
- PoolCheckRegionEeu PoolCheckRegion = "EEU"
- PoolCheckRegionNsam PoolCheckRegion = "NSAM"
- PoolCheckRegionSsam PoolCheckRegion = "SSAM"
- PoolCheckRegionOc PoolCheckRegion = "OC"
- PoolCheckRegionMe PoolCheckRegion = "ME"
- PoolCheckRegionNaf PoolCheckRegion = "NAF"
- PoolCheckRegionSaf PoolCheckRegion = "SAF"
- PoolCheckRegionSas PoolCheckRegion = "SAS"
- PoolCheckRegionSeas PoolCheckRegion = "SEAS"
- PoolCheckRegionNeas PoolCheckRegion = "NEAS"
- PoolCheckRegionAllRegions PoolCheckRegion = "ALL_REGIONS"
-)
-
-func (r PoolCheckRegion) IsKnown() bool {
- switch r {
- case PoolCheckRegionWnam, PoolCheckRegionEnam, PoolCheckRegionWeu, PoolCheckRegionEeu, PoolCheckRegionNsam, PoolCheckRegionSsam, PoolCheckRegionOc, PoolCheckRegionMe, PoolCheckRegionNaf, PoolCheckRegionSaf, PoolCheckRegionSas, PoolCheckRegionSeas, PoolCheckRegionNeas, PoolCheckRegionAllRegions:
- return true
- }
- return false
-}
-
type LoadBalancerPoolDeleteResponse struct {
ID string `json:"id"`
JSON loadBalancerPoolDeleteResponseJSON `json:"-"`
@@ -380,10 +348,10 @@ type LoadBalancerPoolNewParams struct {
Name param.Field[string] `json:"name,required"`
// The list of origins within this pool. Traffic directed at this pool is balanced
// across all currently healthy origins, provided the pool itself is healthy.
- Origins param.Field[[]load_balancers.OriginParam] `json:"origins,required"`
+ Origins param.Field[[]load_balancers.OriginItemParam] `json:"origins,required"`
// A list of regions from which to run health checks. Null means every Cloudflare
// data center.
- CheckRegions param.Field[[]LoadBalancerPoolNewParamsCheckRegion] `json:"check_regions"`
+ CheckRegions param.Field[[]load_balancers.CheckRegion] `json:"check_regions"`
// A human-readable description of the pool.
Description param.Field[string] `json:"description"`
// Whether to enable (the default) or disable this pool. Disabled pools will not
@@ -423,38 +391,6 @@ func (r LoadBalancerPoolNewParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
-// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe,
-// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America,
-// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS:
-// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all
-// regions (ENTERPRISE customers only).
-type LoadBalancerPoolNewParamsCheckRegion string
-
-const (
- LoadBalancerPoolNewParamsCheckRegionWnam LoadBalancerPoolNewParamsCheckRegion = "WNAM"
- LoadBalancerPoolNewParamsCheckRegionEnam LoadBalancerPoolNewParamsCheckRegion = "ENAM"
- LoadBalancerPoolNewParamsCheckRegionWeu LoadBalancerPoolNewParamsCheckRegion = "WEU"
- LoadBalancerPoolNewParamsCheckRegionEeu LoadBalancerPoolNewParamsCheckRegion = "EEU"
- LoadBalancerPoolNewParamsCheckRegionNsam LoadBalancerPoolNewParamsCheckRegion = "NSAM"
- LoadBalancerPoolNewParamsCheckRegionSsam LoadBalancerPoolNewParamsCheckRegion = "SSAM"
- LoadBalancerPoolNewParamsCheckRegionOc LoadBalancerPoolNewParamsCheckRegion = "OC"
- LoadBalancerPoolNewParamsCheckRegionMe LoadBalancerPoolNewParamsCheckRegion = "ME"
- LoadBalancerPoolNewParamsCheckRegionNaf LoadBalancerPoolNewParamsCheckRegion = "NAF"
- LoadBalancerPoolNewParamsCheckRegionSaf LoadBalancerPoolNewParamsCheckRegion = "SAF"
- LoadBalancerPoolNewParamsCheckRegionSas LoadBalancerPoolNewParamsCheckRegion = "SAS"
- LoadBalancerPoolNewParamsCheckRegionSeas LoadBalancerPoolNewParamsCheckRegion = "SEAS"
- LoadBalancerPoolNewParamsCheckRegionNeas LoadBalancerPoolNewParamsCheckRegion = "NEAS"
- LoadBalancerPoolNewParamsCheckRegionAllRegions LoadBalancerPoolNewParamsCheckRegion = "ALL_REGIONS"
-)
-
-func (r LoadBalancerPoolNewParamsCheckRegion) IsKnown() bool {
- switch r {
- case LoadBalancerPoolNewParamsCheckRegionWnam, LoadBalancerPoolNewParamsCheckRegionEnam, LoadBalancerPoolNewParamsCheckRegionWeu, LoadBalancerPoolNewParamsCheckRegionEeu, LoadBalancerPoolNewParamsCheckRegionNsam, LoadBalancerPoolNewParamsCheckRegionSsam, LoadBalancerPoolNewParamsCheckRegionOc, LoadBalancerPoolNewParamsCheckRegionMe, LoadBalancerPoolNewParamsCheckRegionNaf, LoadBalancerPoolNewParamsCheckRegionSaf, LoadBalancerPoolNewParamsCheckRegionSas, LoadBalancerPoolNewParamsCheckRegionSeas, LoadBalancerPoolNewParamsCheckRegionNeas, LoadBalancerPoolNewParamsCheckRegionAllRegions:
- return true
- }
- return false
-}
-
type LoadBalancerPoolNewResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
@@ -504,10 +440,10 @@ type LoadBalancerPoolUpdateParams struct {
Name param.Field[string] `json:"name,required"`
// The list of origins within this pool. Traffic directed at this pool is balanced
// across all currently healthy origins, provided the pool itself is healthy.
- Origins param.Field[[]load_balancers.OriginParam] `json:"origins,required"`
+ Origins param.Field[[]load_balancers.OriginItemParam] `json:"origins,required"`
// A list of regions from which to run health checks. Null means every Cloudflare
// data center.
- CheckRegions param.Field[[]LoadBalancerPoolUpdateParamsCheckRegion] `json:"check_regions"`
+ CheckRegions param.Field[[]load_balancers.CheckRegion] `json:"check_regions"`
// A human-readable description of the pool.
Description param.Field[string] `json:"description"`
// Whether to enable (the default) or disable this pool. Disabled pools will not
@@ -547,38 +483,6 @@ func (r LoadBalancerPoolUpdateParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
-// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe,
-// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America,
-// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS:
-// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all
-// regions (ENTERPRISE customers only).
-type LoadBalancerPoolUpdateParamsCheckRegion string
-
-const (
- LoadBalancerPoolUpdateParamsCheckRegionWnam LoadBalancerPoolUpdateParamsCheckRegion = "WNAM"
- LoadBalancerPoolUpdateParamsCheckRegionEnam LoadBalancerPoolUpdateParamsCheckRegion = "ENAM"
- LoadBalancerPoolUpdateParamsCheckRegionWeu LoadBalancerPoolUpdateParamsCheckRegion = "WEU"
- LoadBalancerPoolUpdateParamsCheckRegionEeu LoadBalancerPoolUpdateParamsCheckRegion = "EEU"
- LoadBalancerPoolUpdateParamsCheckRegionNsam LoadBalancerPoolUpdateParamsCheckRegion = "NSAM"
- LoadBalancerPoolUpdateParamsCheckRegionSsam LoadBalancerPoolUpdateParamsCheckRegion = "SSAM"
- LoadBalancerPoolUpdateParamsCheckRegionOc LoadBalancerPoolUpdateParamsCheckRegion = "OC"
- LoadBalancerPoolUpdateParamsCheckRegionMe LoadBalancerPoolUpdateParamsCheckRegion = "ME"
- LoadBalancerPoolUpdateParamsCheckRegionNaf LoadBalancerPoolUpdateParamsCheckRegion = "NAF"
- LoadBalancerPoolUpdateParamsCheckRegionSaf LoadBalancerPoolUpdateParamsCheckRegion = "SAF"
- LoadBalancerPoolUpdateParamsCheckRegionSas LoadBalancerPoolUpdateParamsCheckRegion = "SAS"
- LoadBalancerPoolUpdateParamsCheckRegionSeas LoadBalancerPoolUpdateParamsCheckRegion = "SEAS"
- LoadBalancerPoolUpdateParamsCheckRegionNeas LoadBalancerPoolUpdateParamsCheckRegion = "NEAS"
- LoadBalancerPoolUpdateParamsCheckRegionAllRegions LoadBalancerPoolUpdateParamsCheckRegion = "ALL_REGIONS"
-)
-
-func (r LoadBalancerPoolUpdateParamsCheckRegion) IsKnown() bool {
- switch r {
- case LoadBalancerPoolUpdateParamsCheckRegionWnam, LoadBalancerPoolUpdateParamsCheckRegionEnam, LoadBalancerPoolUpdateParamsCheckRegionWeu, LoadBalancerPoolUpdateParamsCheckRegionEeu, LoadBalancerPoolUpdateParamsCheckRegionNsam, LoadBalancerPoolUpdateParamsCheckRegionSsam, LoadBalancerPoolUpdateParamsCheckRegionOc, LoadBalancerPoolUpdateParamsCheckRegionMe, LoadBalancerPoolUpdateParamsCheckRegionNaf, LoadBalancerPoolUpdateParamsCheckRegionSaf, LoadBalancerPoolUpdateParamsCheckRegionSas, LoadBalancerPoolUpdateParamsCheckRegionSeas, LoadBalancerPoolUpdateParamsCheckRegionNeas, LoadBalancerPoolUpdateParamsCheckRegionAllRegions:
- return true
- }
- return false
-}
-
type LoadBalancerPoolUpdateResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
@@ -691,7 +595,7 @@ func (r LoadBalancerPoolDeleteResponseEnvelopeSuccess) IsKnown() bool {
type LoadBalancerPoolEditParams struct {
// A list of regions from which to run health checks. Null means every Cloudflare
// data center.
- CheckRegions param.Field[[]LoadBalancerPoolEditParamsCheckRegion] `json:"check_regions"`
+ CheckRegions param.Field[[]load_balancers.CheckRegion] `json:"check_regions"`
// A human-readable description of the pool.
Description param.Field[string] `json:"description"`
// Whether to enable (the default) or disable this pool. Disabled pools will not
@@ -730,45 +634,13 @@ type LoadBalancerPoolEditParams struct {
OriginSteering param.Field[load_balancers.OriginSteeringParam] `json:"origin_steering"`
// The list of origins within this pool. Traffic directed at this pool is balanced
// across all currently healthy origins, provided the pool itself is healthy.
- Origins param.Field[[]load_balancers.OriginParam] `json:"origins"`
+ Origins param.Field[[]load_balancers.OriginItemParam] `json:"origins"`
}
func (r LoadBalancerPoolEditParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
-// WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe,
-// EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America,
-// OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS:
-// Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all
-// regions (ENTERPRISE customers only).
-type LoadBalancerPoolEditParamsCheckRegion string
-
-const (
- LoadBalancerPoolEditParamsCheckRegionWnam LoadBalancerPoolEditParamsCheckRegion = "WNAM"
- LoadBalancerPoolEditParamsCheckRegionEnam LoadBalancerPoolEditParamsCheckRegion = "ENAM"
- LoadBalancerPoolEditParamsCheckRegionWeu LoadBalancerPoolEditParamsCheckRegion = "WEU"
- LoadBalancerPoolEditParamsCheckRegionEeu LoadBalancerPoolEditParamsCheckRegion = "EEU"
- LoadBalancerPoolEditParamsCheckRegionNsam LoadBalancerPoolEditParamsCheckRegion = "NSAM"
- LoadBalancerPoolEditParamsCheckRegionSsam LoadBalancerPoolEditParamsCheckRegion = "SSAM"
- LoadBalancerPoolEditParamsCheckRegionOc LoadBalancerPoolEditParamsCheckRegion = "OC"
- LoadBalancerPoolEditParamsCheckRegionMe LoadBalancerPoolEditParamsCheckRegion = "ME"
- LoadBalancerPoolEditParamsCheckRegionNaf LoadBalancerPoolEditParamsCheckRegion = "NAF"
- LoadBalancerPoolEditParamsCheckRegionSaf LoadBalancerPoolEditParamsCheckRegion = "SAF"
- LoadBalancerPoolEditParamsCheckRegionSas LoadBalancerPoolEditParamsCheckRegion = "SAS"
- LoadBalancerPoolEditParamsCheckRegionSeas LoadBalancerPoolEditParamsCheckRegion = "SEAS"
- LoadBalancerPoolEditParamsCheckRegionNeas LoadBalancerPoolEditParamsCheckRegion = "NEAS"
- LoadBalancerPoolEditParamsCheckRegionAllRegions LoadBalancerPoolEditParamsCheckRegion = "ALL_REGIONS"
-)
-
-func (r LoadBalancerPoolEditParamsCheckRegion) IsKnown() bool {
- switch r {
- case LoadBalancerPoolEditParamsCheckRegionWnam, LoadBalancerPoolEditParamsCheckRegionEnam, LoadBalancerPoolEditParamsCheckRegionWeu, LoadBalancerPoolEditParamsCheckRegionEeu, LoadBalancerPoolEditParamsCheckRegionNsam, LoadBalancerPoolEditParamsCheckRegionSsam, LoadBalancerPoolEditParamsCheckRegionOc, LoadBalancerPoolEditParamsCheckRegionMe, LoadBalancerPoolEditParamsCheckRegionNaf, LoadBalancerPoolEditParamsCheckRegionSaf, LoadBalancerPoolEditParamsCheckRegionSas, LoadBalancerPoolEditParamsCheckRegionSeas, LoadBalancerPoolEditParamsCheckRegionNeas, LoadBalancerPoolEditParamsCheckRegionAllRegions:
- return true
- }
- return false
-}
-
type LoadBalancerPoolEditResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
diff --git a/user/loadbalancerpool_test.go b/user/loadbalancerpool_test.go
index 22d2aa0ce34..957b6cdd400 100644
--- a/user/loadbalancerpool_test.go
+++ b/user/loadbalancerpool_test.go
@@ -31,11 +31,11 @@ func TestLoadBalancerPoolNewWithOptionalParams(t *testing.T) {
)
_, err := client.User.LoadBalancers.Pools.New(context.TODO(), user.LoadBalancerPoolNewParams{
Name: cloudflare.F("primary-dc-1"),
- Origins: cloudflare.F([]load_balancers.OriginParam{{
+ Origins: cloudflare.F([]load_balancers.OriginItemParam{{
Address: cloudflare.F("0.0.0.0"),
Enabled: cloudflare.F(true),
Header: cloudflare.F(load_balancers.HeaderParam{
- Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}),
+ Host: cloudflare.F([]load_balancers.HostItemParam{"example.com", "example.com", "example.com"}),
}),
Name: cloudflare.F("app-server-1"),
VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"),
@@ -44,7 +44,7 @@ func TestLoadBalancerPoolNewWithOptionalParams(t *testing.T) {
Address: cloudflare.F("0.0.0.0"),
Enabled: cloudflare.F(true),
Header: cloudflare.F(load_balancers.HeaderParam{
- Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}),
+ Host: cloudflare.F([]load_balancers.HostItemParam{"example.com", "example.com", "example.com"}),
}),
Name: cloudflare.F("app-server-1"),
VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"),
@@ -53,13 +53,13 @@ func TestLoadBalancerPoolNewWithOptionalParams(t *testing.T) {
Address: cloudflare.F("0.0.0.0"),
Enabled: cloudflare.F(true),
Header: cloudflare.F(load_balancers.HeaderParam{
- Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}),
+ Host: cloudflare.F([]load_balancers.HostItemParam{"example.com", "example.com", "example.com"}),
}),
Name: cloudflare.F("app-server-1"),
VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"),
Weight: cloudflare.F(0.600000),
}}),
- CheckRegions: cloudflare.F([]user.LoadBalancerPoolNewParamsCheckRegion{user.LoadBalancerPoolNewParamsCheckRegionWeu, user.LoadBalancerPoolNewParamsCheckRegionEnam}),
+ CheckRegions: cloudflare.F([]load_balancers.CheckRegion{load_balancers.CheckRegionWeu, load_balancers.CheckRegionEnam}),
Description: cloudflare.F("Primary data center - Provider XYZ"),
Enabled: cloudflare.F(false),
Latitude: cloudflare.F(0.000000),
@@ -115,11 +115,11 @@ func TestLoadBalancerPoolUpdateWithOptionalParams(t *testing.T) {
"17b5962d775c646f3f9725cbc7a53df4",
user.LoadBalancerPoolUpdateParams{
Name: cloudflare.F("primary-dc-1"),
- Origins: cloudflare.F([]load_balancers.OriginParam{{
+ Origins: cloudflare.F([]load_balancers.OriginItemParam{{
Address: cloudflare.F("0.0.0.0"),
Enabled: cloudflare.F(true),
Header: cloudflare.F(load_balancers.HeaderParam{
- Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}),
+ Host: cloudflare.F([]load_balancers.HostItemParam{"example.com", "example.com", "example.com"}),
}),
Name: cloudflare.F("app-server-1"),
VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"),
@@ -128,7 +128,7 @@ func TestLoadBalancerPoolUpdateWithOptionalParams(t *testing.T) {
Address: cloudflare.F("0.0.0.0"),
Enabled: cloudflare.F(true),
Header: cloudflare.F(load_balancers.HeaderParam{
- Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}),
+ Host: cloudflare.F([]load_balancers.HostItemParam{"example.com", "example.com", "example.com"}),
}),
Name: cloudflare.F("app-server-1"),
VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"),
@@ -137,13 +137,13 @@ func TestLoadBalancerPoolUpdateWithOptionalParams(t *testing.T) {
Address: cloudflare.F("0.0.0.0"),
Enabled: cloudflare.F(true),
Header: cloudflare.F(load_balancers.HeaderParam{
- Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}),
+ Host: cloudflare.F([]load_balancers.HostItemParam{"example.com", "example.com", "example.com"}),
}),
Name: cloudflare.F("app-server-1"),
VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"),
Weight: cloudflare.F(0.600000),
}}),
- CheckRegions: cloudflare.F([]user.LoadBalancerPoolUpdateParamsCheckRegion{user.LoadBalancerPoolUpdateParamsCheckRegionWeu, user.LoadBalancerPoolUpdateParamsCheckRegionEnam}),
+ CheckRegions: cloudflare.F([]load_balancers.CheckRegion{load_balancers.CheckRegionWeu, load_balancers.CheckRegionEnam}),
Description: cloudflare.F("Primary data center - Provider XYZ"),
Enabled: cloudflare.F(false),
Latitude: cloudflare.F(0.000000),
@@ -255,7 +255,7 @@ func TestLoadBalancerPoolEditWithOptionalParams(t *testing.T) {
context.TODO(),
"17b5962d775c646f3f9725cbc7a53df4",
user.LoadBalancerPoolEditParams{
- CheckRegions: cloudflare.F([]user.LoadBalancerPoolEditParamsCheckRegion{user.LoadBalancerPoolEditParamsCheckRegionWeu, user.LoadBalancerPoolEditParamsCheckRegionEnam}),
+ CheckRegions: cloudflare.F([]load_balancers.CheckRegion{load_balancers.CheckRegionWeu, load_balancers.CheckRegionEnam}),
Description: cloudflare.F("Primary data center - Provider XYZ"),
Enabled: cloudflare.F(false),
Latitude: cloudflare.F(0.000000),
@@ -283,11 +283,11 @@ func TestLoadBalancerPoolEditWithOptionalParams(t *testing.T) {
OriginSteering: cloudflare.F(load_balancers.OriginSteeringParam{
Policy: cloudflare.F(load_balancers.OriginSteeringPolicyRandom),
}),
- Origins: cloudflare.F([]load_balancers.OriginParam{{
+ Origins: cloudflare.F([]load_balancers.OriginItemParam{{
Address: cloudflare.F("0.0.0.0"),
Enabled: cloudflare.F(true),
Header: cloudflare.F(load_balancers.HeaderParam{
- Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}),
+ Host: cloudflare.F([]load_balancers.HostItemParam{"example.com", "example.com", "example.com"}),
}),
Name: cloudflare.F("app-server-1"),
VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"),
@@ -296,7 +296,7 @@ func TestLoadBalancerPoolEditWithOptionalParams(t *testing.T) {
Address: cloudflare.F("0.0.0.0"),
Enabled: cloudflare.F(true),
Header: cloudflare.F(load_balancers.HeaderParam{
- Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}),
+ Host: cloudflare.F([]load_balancers.HostItemParam{"example.com", "example.com", "example.com"}),
}),
Name: cloudflare.F("app-server-1"),
VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"),
@@ -305,7 +305,7 @@ func TestLoadBalancerPoolEditWithOptionalParams(t *testing.T) {
Address: cloudflare.F("0.0.0.0"),
Enabled: cloudflare.F(true),
Header: cloudflare.F(load_balancers.HeaderParam{
- Host: cloudflare.F([]string{"example.com", "example.com", "example.com"}),
+ Host: cloudflare.F([]load_balancers.HostItemParam{"example.com", "example.com", "example.com"}),
}),
Name: cloudflare.F("app-server-1"),
VirtualNetworkID: cloudflare.F("a5624d4e-044a-4ff0-b3e1-e2465353d4b4"),
diff --git a/user/organization.go b/user/organization.go
index dcc692b2326..a59efa4ba00 100644
--- a/user/organization.go
+++ b/user/organization.go
@@ -85,7 +85,7 @@ type Organization struct {
// Organization name.
Name string `json:"name"`
// Access permissions for this User.
- Permissions []string `json:"permissions"`
+ Permissions []PermissionItem `json:"permissions"`
// List of roles that a user has within an organization.
Roles []string `json:"roles"`
// Whether the user is a member of the organization or has an inivitation pending.
diff --git a/user/subscription.go b/user/subscription.go
index 692fa1aa204..cf2eb5bfee9 100644
--- a/user/subscription.go
+++ b/user/subscription.go
@@ -68,7 +68,7 @@ func (r *SubscriptionService) Edit(ctx context.Context, identifier string, body
}
// Lists all of a user's subscriptions.
-func (r *SubscriptionService) Get(ctx context.Context, opts ...option.RequestOption) (res *[]SubscriptionGetResponse, err error) {
+func (r *SubscriptionService) Get(ctx context.Context, opts ...option.RequestOption) (res *[]Subscription, err error) {
opts = append(r.Options[:], opts...)
var env SubscriptionGetResponseEnvelope
path := "user/subscriptions"
@@ -80,34 +80,12 @@ func (r *SubscriptionService) Get(ctx context.Context, opts ...option.RequestOpt
return
}
-type SubscriptionDeleteResponse struct {
- // Subscription identifier tag.
- SubscriptionID string `json:"subscription_id"`
- JSON subscriptionDeleteResponseJSON `json:"-"`
-}
-
-// subscriptionDeleteResponseJSON contains the JSON metadata for the struct
-// [SubscriptionDeleteResponse]
-type subscriptionDeleteResponseJSON struct {
- SubscriptionID apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionDeleteResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionDeleteResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type SubscriptionGetResponse struct {
+type Subscription struct {
// Subscription identifier tag.
- ID string `json:"id"`
- App SubscriptionGetResponseApp `json:"app"`
+ ID string `json:"id"`
+ App SubscriptionApp `json:"app"`
// The list of add-ons subscribed to.
- ComponentValues []SubscriptionGetResponseComponentValue `json:"component_values"`
+ ComponentValues []SubscriptionComponentValue `json:"component_values"`
// The monetary unit in which pricing information is displayed.
Currency string `json:"currency"`
// The end of the current period and also when the next billing is due.
@@ -116,21 +94,20 @@ type SubscriptionGetResponse struct {
// is the first period.
CurrentPeriodStart time.Time `json:"current_period_start" format:"date-time"`
// How often the subscription is renewed automatically.
- Frequency SubscriptionGetResponseFrequency `json:"frequency"`
+ Frequency SubscriptionFrequency `json:"frequency"`
// The price of the subscription that will be billed, in US dollars.
Price float64 `json:"price"`
// The rate plan applied to the subscription.
- RatePlan SubscriptionGetResponseRatePlan `json:"rate_plan"`
+ RatePlan SubscriptionRatePlan `json:"rate_plan"`
// The state that the subscription is in.
- State SubscriptionGetResponseState `json:"state"`
+ State SubscriptionState `json:"state"`
// A simple zone object. May have null properties if not a zone subscription.
- Zone SubscriptionGetResponseZone `json:"zone"`
- JSON subscriptionGetResponseJSON `json:"-"`
+ Zone SubscriptionZone `json:"zone"`
+ JSON subscriptionJSON `json:"-"`
}
-// subscriptionGetResponseJSON contains the JSON metadata for the struct
-// [SubscriptionGetResponse]
-type subscriptionGetResponseJSON struct {
+// subscriptionJSON contains the JSON metadata for the struct [Subscription]
+type subscriptionJSON struct {
ID apijson.Field
App apijson.Field
ComponentValues apijson.Field
@@ -146,38 +123,37 @@ type subscriptionGetResponseJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *SubscriptionGetResponse) UnmarshalJSON(data []byte) (err error) {
+func (r *Subscription) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r subscriptionGetResponseJSON) RawJSON() string {
+func (r subscriptionJSON) RawJSON() string {
return r.raw
}
-type SubscriptionGetResponseApp struct {
+type SubscriptionApp struct {
// app install id.
- InstallID string `json:"install_id"`
- JSON subscriptionGetResponseAppJSON `json:"-"`
+ InstallID string `json:"install_id"`
+ JSON subscriptionAppJSON `json:"-"`
}
-// subscriptionGetResponseAppJSON contains the JSON metadata for the struct
-// [SubscriptionGetResponseApp]
-type subscriptionGetResponseAppJSON struct {
+// subscriptionAppJSON contains the JSON metadata for the struct [SubscriptionApp]
+type subscriptionAppJSON struct {
InstallID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *SubscriptionGetResponseApp) UnmarshalJSON(data []byte) (err error) {
+func (r *SubscriptionApp) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r subscriptionGetResponseAppJSON) RawJSON() string {
+func (r subscriptionAppJSON) RawJSON() string {
return r.raw
}
// A component value for a subscription.
-type SubscriptionGetResponseComponentValue struct {
+type SubscriptionComponentValue struct {
// The default amount assigned.
Default float64 `json:"default"`
// The name of the component value.
@@ -185,13 +161,13 @@ type SubscriptionGetResponseComponentValue struct {
// The unit price for the component value.
Price float64 `json:"price"`
// The amount of the component value assigned.
- Value float64 `json:"value"`
- JSON subscriptionGetResponseComponentValueJSON `json:"-"`
+ Value float64 `json:"value"`
+ JSON subscriptionComponentValueJSON `json:"-"`
}
-// subscriptionGetResponseComponentValueJSON contains the JSON metadata for the
-// struct [SubscriptionGetResponseComponentValue]
-type subscriptionGetResponseComponentValueJSON struct {
+// subscriptionComponentValueJSON contains the JSON metadata for the struct
+// [SubscriptionComponentValue]
+type subscriptionComponentValueJSON struct {
Default apijson.Field
Name apijson.Field
Price apijson.Field
@@ -200,34 +176,34 @@ type subscriptionGetResponseComponentValueJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *SubscriptionGetResponseComponentValue) UnmarshalJSON(data []byte) (err error) {
+func (r *SubscriptionComponentValue) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r subscriptionGetResponseComponentValueJSON) RawJSON() string {
+func (r subscriptionComponentValueJSON) RawJSON() string {
return r.raw
}
// How often the subscription is renewed automatically.
-type SubscriptionGetResponseFrequency string
+type SubscriptionFrequency string
const (
- SubscriptionGetResponseFrequencyWeekly SubscriptionGetResponseFrequency = "weekly"
- SubscriptionGetResponseFrequencyMonthly SubscriptionGetResponseFrequency = "monthly"
- SubscriptionGetResponseFrequencyQuarterly SubscriptionGetResponseFrequency = "quarterly"
- SubscriptionGetResponseFrequencyYearly SubscriptionGetResponseFrequency = "yearly"
+ SubscriptionFrequencyWeekly SubscriptionFrequency = "weekly"
+ SubscriptionFrequencyMonthly SubscriptionFrequency = "monthly"
+ SubscriptionFrequencyQuarterly SubscriptionFrequency = "quarterly"
+ SubscriptionFrequencyYearly SubscriptionFrequency = "yearly"
)
-func (r SubscriptionGetResponseFrequency) IsKnown() bool {
+func (r SubscriptionFrequency) IsKnown() bool {
switch r {
- case SubscriptionGetResponseFrequencyWeekly, SubscriptionGetResponseFrequencyMonthly, SubscriptionGetResponseFrequencyQuarterly, SubscriptionGetResponseFrequencyYearly:
+ case SubscriptionFrequencyWeekly, SubscriptionFrequencyMonthly, SubscriptionFrequencyQuarterly, SubscriptionFrequencyYearly:
return true
}
return false
}
// The rate plan applied to the subscription.
-type SubscriptionGetResponseRatePlan struct {
+type SubscriptionRatePlan struct {
// The ID of the rate plan.
ID string `json:"id"`
// The currency applied to the rate plan subscription.
@@ -241,13 +217,13 @@ type SubscriptionGetResponseRatePlan struct {
// The scope that this rate plan applies to.
Scope string `json:"scope"`
// The list of sets this rate plan applies to.
- Sets []string `json:"sets"`
- JSON subscriptionGetResponseRatePlanJSON `json:"-"`
+ Sets []string `json:"sets"`
+ JSON subscriptionRatePlanJSON `json:"-"`
}
-// subscriptionGetResponseRatePlanJSON contains the JSON metadata for the struct
-// [SubscriptionGetResponseRatePlan]
-type subscriptionGetResponseRatePlanJSON struct {
+// subscriptionRatePlanJSON contains the JSON metadata for the struct
+// [SubscriptionRatePlan]
+type subscriptionRatePlanJSON struct {
ID apijson.Field
Currency apijson.Field
ExternallyManaged apijson.Field
@@ -259,58 +235,80 @@ type subscriptionGetResponseRatePlanJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *SubscriptionGetResponseRatePlan) UnmarshalJSON(data []byte) (err error) {
+func (r *SubscriptionRatePlan) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r subscriptionGetResponseRatePlanJSON) RawJSON() string {
+func (r subscriptionRatePlanJSON) RawJSON() string {
return r.raw
}
// The state that the subscription is in.
-type SubscriptionGetResponseState string
+type SubscriptionState string
const (
- SubscriptionGetResponseStateTrial SubscriptionGetResponseState = "Trial"
- SubscriptionGetResponseStateProvisioned SubscriptionGetResponseState = "Provisioned"
- SubscriptionGetResponseStatePaid SubscriptionGetResponseState = "Paid"
- SubscriptionGetResponseStateAwaitingPayment SubscriptionGetResponseState = "AwaitingPayment"
- SubscriptionGetResponseStateCancelled SubscriptionGetResponseState = "Cancelled"
- SubscriptionGetResponseStateFailed SubscriptionGetResponseState = "Failed"
- SubscriptionGetResponseStateExpired SubscriptionGetResponseState = "Expired"
+ SubscriptionStateTrial SubscriptionState = "Trial"
+ SubscriptionStateProvisioned SubscriptionState = "Provisioned"
+ SubscriptionStatePaid SubscriptionState = "Paid"
+ SubscriptionStateAwaitingPayment SubscriptionState = "AwaitingPayment"
+ SubscriptionStateCancelled SubscriptionState = "Cancelled"
+ SubscriptionStateFailed SubscriptionState = "Failed"
+ SubscriptionStateExpired SubscriptionState = "Expired"
)
-func (r SubscriptionGetResponseState) IsKnown() bool {
+func (r SubscriptionState) IsKnown() bool {
switch r {
- case SubscriptionGetResponseStateTrial, SubscriptionGetResponseStateProvisioned, SubscriptionGetResponseStatePaid, SubscriptionGetResponseStateAwaitingPayment, SubscriptionGetResponseStateCancelled, SubscriptionGetResponseStateFailed, SubscriptionGetResponseStateExpired:
+ case SubscriptionStateTrial, SubscriptionStateProvisioned, SubscriptionStatePaid, SubscriptionStateAwaitingPayment, SubscriptionStateCancelled, SubscriptionStateFailed, SubscriptionStateExpired:
return true
}
return false
}
// A simple zone object. May have null properties if not a zone subscription.
-type SubscriptionGetResponseZone struct {
+type SubscriptionZone struct {
// Identifier
ID string `json:"id"`
// The domain name
- Name string `json:"name"`
- JSON subscriptionGetResponseZoneJSON `json:"-"`
+ Name string `json:"name"`
+ JSON subscriptionZoneJSON `json:"-"`
}
-// subscriptionGetResponseZoneJSON contains the JSON metadata for the struct
-// [SubscriptionGetResponseZone]
-type subscriptionGetResponseZoneJSON struct {
+// subscriptionZoneJSON contains the JSON metadata for the struct
+// [SubscriptionZone]
+type subscriptionZoneJSON struct {
ID apijson.Field
Name apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
-func (r *SubscriptionGetResponseZone) UnmarshalJSON(data []byte) (err error) {
+func (r *SubscriptionZone) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r subscriptionGetResponseZoneJSON) RawJSON() string {
+func (r subscriptionZoneJSON) RawJSON() string {
+ return r.raw
+}
+
+type SubscriptionDeleteResponse struct {
+ // Subscription identifier tag.
+ SubscriptionID string `json:"subscription_id"`
+ JSON subscriptionDeleteResponseJSON `json:"-"`
+}
+
+// subscriptionDeleteResponseJSON contains the JSON metadata for the struct
+// [SubscriptionDeleteResponse]
+type subscriptionDeleteResponseJSON struct {
+ SubscriptionID apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *SubscriptionDeleteResponse) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r subscriptionDeleteResponseJSON) RawJSON() string {
return r.raw
}
@@ -589,7 +587,7 @@ func (r SubscriptionEditResponseEnvelopeSuccess) IsKnown() bool {
type SubscriptionGetResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
- Result []SubscriptionGetResponse `json:"result,required,nullable"`
+ Result []Subscription `json:"result,required,nullable"`
// Whether the API call was successful
Success SubscriptionGetResponseEnvelopeSuccess `json:"success,required"`
ResultInfo SubscriptionGetResponseEnvelopeResultInfo `json:"result_info"`
diff --git a/user/tokenpermissiongroup.go b/user/tokenpermissiongroup.go
index 7169a80adad..c8bb7790d85 100644
--- a/user/tokenpermissiongroup.go
+++ b/user/tokenpermissiongroup.go
@@ -116,4 +116,6 @@ func (r PermissionParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
+type PermissionItem = string
+
type TokenPermissionGroupListResponse = interface{}
diff --git a/waiting_rooms/waitingroom.go b/waiting_rooms/waitingroom.go
index 12f8d51cf76..d631b9789da 100644
--- a/waiting_rooms/waitingroom.go
+++ b/waiting_rooms/waitingroom.go
@@ -276,7 +276,7 @@ type WaitingRoom struct {
// and path combinations to which this waiting room will be applied. There is an
// implied wildcard at the end of the path. The hostname and path combination must
// be unique to this and all other waiting rooms.
- AdditionalRoutes []WaitingRoomAdditionalRoute `json:"additional_routes"`
+ AdditionalRoutes []AdditionalRoutesItem `json:"additional_routes"`
// Configures cookie attributes for the waiting room cookie. This encrypted cookie
// stores a user's status in the waiting room, such as queue position.
CookieAttributes CookieAttributes `json:"cookie_attributes"`
@@ -574,36 +574,6 @@ func (r waitingRoomJSON) RawJSON() string {
return r.raw
}
-type WaitingRoomAdditionalRoute struct {
- // The hostname to which this waiting room will be applied (no wildcards). The
- // hostname must be the primary domain, subdomain, or custom hostname (if using SSL
- // for SaaS) of this zone. Please do not include the scheme (http:// or https://).
- Host string `json:"host"`
- // Sets the path within the host to enable the waiting room on. The waiting room
- // will be enabled for all subpaths as well. If there are two waiting rooms on the
- // same subpath, the waiting room for the most specific path will be chosen.
- // Wildcards and query parameters are not supported.
- Path string `json:"path"`
- JSON waitingRoomAdditionalRouteJSON `json:"-"`
-}
-
-// waitingRoomAdditionalRouteJSON contains the JSON metadata for the struct
-// [WaitingRoomAdditionalRoute]
-type waitingRoomAdditionalRouteJSON struct {
- Host apijson.Field
- Path apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *WaitingRoomAdditionalRoute) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r waitingRoomAdditionalRouteJSON) RawJSON() string {
- return r.raw
-}
-
// The language of the default page template. If no default_template_language is
// provided, then `en-US` (English) will be used.
type WaitingRoomDefaultTemplateLanguage string
diff --git a/workers/script.go b/workers/script.go
index 8f4df56f825..9d9163dfbbe 100644
--- a/workers/script.go
+++ b/workers/script.go
@@ -128,7 +128,7 @@ type Script struct {
// Specifies the placement mode for the Worker (e.g. 'smart').
PlacementMode string `json:"placement_mode"`
// List of Workers that will consume logs from the attached Worker.
- TailConsumers []ConsumerScript `json:"tail_consumers"`
+ TailConsumers []ConsumerScriptItem `json:"tail_consumers"`
// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
UsageModel string `json:"usage_model"`
JSON scriptJSON `json:"-"`
@@ -203,8 +203,8 @@ type SettingsItem struct {
// Whether Logpush is turned on for the Worker.
Logpush bool `json:"logpush"`
// List of Workers that will consume logs from the attached Worker.
- TailConsumers []ConsumerScript `json:"tail_consumers"`
- JSON settingsItemJSON `json:"-"`
+ TailConsumers []ConsumerScriptItem `json:"tail_consumers"`
+ JSON settingsItemJSON `json:"-"`
}
// settingsItemJSON contains the JSON metadata for the struct [SettingsItem]
@@ -227,7 +227,7 @@ type SettingsItemParam struct {
// Whether Logpush is turned on for the Worker.
Logpush param.Field[bool] `json:"logpush"`
// List of Workers that will consume logs from the attached Worker.
- TailConsumers param.Field[[]ConsumerScriptParam] `json:"tail_consumers"`
+ TailConsumers param.Field[[]ConsumerScriptItemParam] `json:"tail_consumers"`
}
func (r SettingsItemParam) MarshalJSON() (data []byte, err error) {
@@ -317,7 +317,7 @@ type ScriptUpdateParamsVariant0Metadata struct {
// List of strings to use as tags for this Worker
Tags param.Field[[]string] `json:"tags"`
// List of Workers that will consume logs from the attached Worker.
- TailConsumers param.Field[[]ConsumerScriptParam] `json:"tail_consumers"`
+ TailConsumers param.Field[[]ConsumerScriptItemParam] `json:"tail_consumers"`
// Usage model to apply to invocations.
UsageModel param.Field[ScriptUpdateParamsVariant0MetadataUsageModel] `json:"usage_model"`
// Key-value pairs to use as tags for this version of this Worker
diff --git a/workers/script_test.go b/workers/script_test.go
index 07cfa5f8bf7..4237762f223 100644
--- a/workers/script_test.go
+++ b/workers/script_test.go
@@ -84,7 +84,7 @@ func TestScriptUpdateWithOptionalParams(t *testing.T) {
Mode: cloudflare.F(workers.PlacementConfigurationModeSmart),
}),
Tags: cloudflare.F([]string{"string", "string", "string"}),
- TailConsumers: cloudflare.F([]workers.ConsumerScriptParam{{
+ TailConsumers: cloudflare.F([]workers.ConsumerScriptItemParam{{
Environment: cloudflare.F("production"),
Namespace: cloudflare.F("my-namespace"),
Service: cloudflare.F("my-log-consumer"),
diff --git a/workers/scriptsetting.go b/workers/scriptsetting.go
index 8096977e779..8d2d931f126 100644
--- a/workers/scriptsetting.go
+++ b/workers/scriptsetting.go
@@ -68,7 +68,7 @@ type ScriptSettingEditParams struct {
// Whether Logpush is turned on for the Worker.
Logpush param.Field[bool] `json:"logpush"`
// List of Workers that will consume logs from the attached Worker.
- TailConsumers param.Field[[]ConsumerScriptParam] `json:"tail_consumers"`
+ TailConsumers param.Field[[]ConsumerScriptItemParam] `json:"tail_consumers"`
}
func (r ScriptSettingEditParams) MarshalJSON() (data []byte, err error) {
diff --git a/workers/scriptsetting_test.go b/workers/scriptsetting_test.go
index 028e598f069..32ff7967b5a 100644
--- a/workers/scriptsetting_test.go
+++ b/workers/scriptsetting_test.go
@@ -34,7 +34,7 @@ func TestScriptSettingEditWithOptionalParams(t *testing.T) {
workers.ScriptSettingEditParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Logpush: cloudflare.F(false),
- TailConsumers: cloudflare.F([]workers.ConsumerScriptParam{{
+ TailConsumers: cloudflare.F([]workers.ConsumerScriptItemParam{{
Environment: cloudflare.F("production"),
Namespace: cloudflare.F("my-namespace"),
Service: cloudflare.F("my-log-consumer"),
diff --git a/workers/scripttail.go b/workers/scripttail.go
index e3a7e4347ac..75a9ef88d6d 100644
--- a/workers/scripttail.go
+++ b/workers/scripttail.go
@@ -71,18 +71,19 @@ func (r *ScriptTailService) Get(ctx context.Context, scriptName string, query Sc
}
// A reference to a script that will consume logs from the attached Worker.
-type ConsumerScript struct {
+type ConsumerScriptItem struct {
// Name of Worker that is to be the consumer.
Service string `json:"service,required"`
// Optional environment if the Worker utilizes one.
Environment string `json:"environment"`
// Optional dispatch namespace the script belongs to.
- Namespace string `json:"namespace"`
- JSON consumerScriptJSON `json:"-"`
+ Namespace string `json:"namespace"`
+ JSON consumerScriptItemJSON `json:"-"`
}
-// consumerScriptJSON contains the JSON metadata for the struct [ConsumerScript]
-type consumerScriptJSON struct {
+// consumerScriptItemJSON contains the JSON metadata for the struct
+// [ConsumerScriptItem]
+type consumerScriptItemJSON struct {
Service apijson.Field
Environment apijson.Field
Namespace apijson.Field
@@ -90,16 +91,16 @@ type consumerScriptJSON struct {
ExtraFields map[string]apijson.Field
}
-func (r *ConsumerScript) UnmarshalJSON(data []byte) (err error) {
+func (r *ConsumerScriptItem) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
-func (r consumerScriptJSON) RawJSON() string {
+func (r consumerScriptItemJSON) RawJSON() string {
return r.raw
}
// A reference to a script that will consume logs from the attached Worker.
-type ConsumerScriptParam struct {
+type ConsumerScriptItemParam struct {
// Name of Worker that is to be the consumer.
Service param.Field[string] `json:"service,required"`
// Optional environment if the Worker utilizes one.
@@ -108,7 +109,7 @@ type ConsumerScriptParam struct {
Namespace param.Field[string] `json:"namespace"`
}
-func (r ConsumerScriptParam) MarshalJSON() (data []byte, err error) {
+func (r ConsumerScriptItemParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
diff --git a/workers/scriptversionsetting.go b/workers/scriptversionsetting.go
index 5ac6dccc606..6577d6989ec 100644
--- a/workers/scriptversionsetting.go
+++ b/workers/scriptversionsetting.go
@@ -320,9 +320,9 @@ type SettingsItem struct {
Migrations SettingsItemMigrations `json:"migrations"`
Placement PlacementConfiguration `json:"placement"`
// Tags to help you manage your Workers
- Tags []string `json:"tags"`
+ Tags []TagsItem `json:"tags"`
// List of Workers that will consume logs from the attached Worker.
- TailConsumers []ConsumerScript `json:"tail_consumers"`
+ TailConsumers []ConsumerScriptItem `json:"tail_consumers"`
// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
UsageModel string `json:"usage_model"`
JSON settingsItemJSON `json:"-"`
@@ -432,9 +432,9 @@ type SettingsItemParam struct {
Migrations param.Field[SettingsItemMigrationsUnionParam] `json:"migrations"`
Placement param.Field[PlacementConfigurationParam] `json:"placement"`
// Tags to help you manage your Workers
- Tags param.Field[[]string] `json:"tags"`
+ Tags param.Field[[]TagsItemParam] `json:"tags"`
// List of Workers that will consume logs from the attached Worker.
- TailConsumers param.Field[[]ConsumerScriptParam] `json:"tail_consumers"`
+ TailConsumers param.Field[[]ConsumerScriptItemParam] `json:"tail_consumers"`
// Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
UsageModel param.Field[string] `json:"usage_model"`
}
@@ -471,6 +471,10 @@ type SettingsItemMigrationsUnionParam interface {
implementsWorkersSettingsItemMigrationsUnionParam()
}
+type TagsItem = string
+
+type TagsItemParam = string
+
type ScriptVersionSettingEditParams struct {
// Identifier
AccountID param.Field[string] `path:"account_id,required"`
diff --git a/workers/scriptversionsetting_test.go b/workers/scriptversionsetting_test.go
index 4a678f93c74..b18d34fec1d 100644
--- a/workers/scriptversionsetting_test.go
+++ b/workers/scriptversionsetting_test.go
@@ -76,8 +76,8 @@ func TestScriptVersionSettingEditWithOptionalParams(t *testing.T) {
Placement: cloudflare.F(workers.PlacementConfigurationParam{
Mode: cloudflare.F(workers.PlacementConfigurationModeSmart),
}),
- Tags: cloudflare.F([]string{"my-tag", "my-tag", "my-tag"}),
- TailConsumers: cloudflare.F([]workers.ConsumerScriptParam{{
+ Tags: cloudflare.F([]workers.TagsItemParam{"my-tag", "my-tag", "my-tag"}),
+ TailConsumers: cloudflare.F([]workers.ConsumerScriptItemParam{{
Environment: cloudflare.F("production"),
Namespace: cloudflare.F("my-namespace"),
Service: cloudflare.F("my-log-consumer"),
diff --git a/workers/serviceenvironmentsetting_test.go b/workers/serviceenvironmentsetting_test.go
index 72e80e93a6a..e77212938d5 100644
--- a/workers/serviceenvironmentsetting_test.go
+++ b/workers/serviceenvironmentsetting_test.go
@@ -57,7 +57,7 @@ func TestServiceEnvironmentSettingEditWithOptionalParams(t *testing.T) {
}}),
Result: cloudflare.F(workers.SettingsItemParam{
Logpush: cloudflare.F(false),
- TailConsumers: cloudflare.F([]workers.ConsumerScriptParam{{
+ TailConsumers: cloudflare.F([]workers.ConsumerScriptItemParam{{
Environment: cloudflare.F("production"),
Namespace: cloudflare.F("my-namespace"),
Service: cloudflare.F("my-log-consumer"),
diff --git a/workers_for_platforms/dispatchnamespacescript.go b/workers_for_platforms/dispatchnamespacescript.go
index f93d67310de..27e0105234e 100644
--- a/workers_for_platforms/dispatchnamespacescript.go
+++ b/workers_for_platforms/dispatchnamespacescript.go
@@ -183,7 +183,7 @@ type DispatchNamespaceScriptUpdateParamsVariant0Metadata struct {
// List of strings to use as tags for this Worker
Tags param.Field[[]string] `json:"tags"`
// List of Workers that will consume logs from the attached Worker.
- TailConsumers param.Field[[]workers.ConsumerScriptParam] `json:"tail_consumers"`
+ TailConsumers param.Field[[]workers.ConsumerScriptItemParam] `json:"tail_consumers"`
// Usage model to apply to invocations.
UsageModel param.Field[DispatchNamespaceScriptUpdateParamsVariant0MetadataUsageModel] `json:"usage_model"`
// Key-value pairs to use as tags for this version of this Worker
diff --git a/workers_for_platforms/dispatchnamespacescript_test.go b/workers_for_platforms/dispatchnamespacescript_test.go
index 56722a4c586..03458588f4a 100644
--- a/workers_for_platforms/dispatchnamespacescript_test.go
+++ b/workers_for_platforms/dispatchnamespacescript_test.go
@@ -83,7 +83,7 @@ func TestDispatchNamespaceScriptUpdateWithOptionalParams(t *testing.T) {
Mode: cloudflare.F(workers.PlacementConfigurationModeSmart),
}),
Tags: cloudflare.F([]string{"string", "string", "string"}),
- TailConsumers: cloudflare.F([]workers.ConsumerScriptParam{{
+ TailConsumers: cloudflare.F([]workers.ConsumerScriptItemParam{{
Environment: cloudflare.F("production"),
Namespace: cloudflare.F("my-namespace"),
Service: cloudflare.F("my-log-consumer"),
diff --git a/workers_for_platforms/dispatchnamespacescriptsetting_test.go b/workers_for_platforms/dispatchnamespacescriptsetting_test.go
index 4a5c5fe7155..37a7d120af2 100644
--- a/workers_for_platforms/dispatchnamespacescriptsetting_test.go
+++ b/workers_for_platforms/dispatchnamespacescriptsetting_test.go
@@ -58,7 +58,7 @@ func TestDispatchNamespaceScriptSettingEditWithOptionalParams(t *testing.T) {
}}),
Result: cloudflare.F(workers.SettingsItemParam{
Logpush: cloudflare.F(false),
- TailConsumers: cloudflare.F([]workers.ConsumerScriptParam{{
+ TailConsumers: cloudflare.F([]workers.ConsumerScriptItemParam{{
Environment: cloudflare.F("production"),
Namespace: cloudflare.F("my-namespace"),
Service: cloudflare.F("my-log-consumer"),
diff --git a/zero_trust/access.go b/zero_trust/access.go
index 9453ddb3ae6..e75f1efc331 100644
--- a/zero_trust/access.go
+++ b/zero_trust/access.go
@@ -75,6 +75,10 @@ func (r AnyValidServiceTokenRule) implementsZeroTrustIncludeItem() {}
func (r AnyValidServiceTokenRule) implementsZeroTrustRule() {}
+func (r AnyValidServiceTokenRule) implementsZeroTrustExcludeItem() {}
+
+func (r AnyValidServiceTokenRule) implementsZeroTrustRequireItem() {}
+
// Matches any valid Access Service Token
type AnyValidServiceTokenRuleParam struct {
// An empty object which matches on all service tokens.
@@ -91,11 +95,11 @@ func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -105,11 +109,11 @@ func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam(
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -117,35 +121,35 @@ func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam(
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -153,13 +157,13 @@ func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam(
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -167,29 +171,29 @@ func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam(
func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AnyValidServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
// Enforce different MFA options
type AuthenticationMethodRule struct {
@@ -217,6 +221,10 @@ func (r AuthenticationMethodRule) implementsZeroTrustIncludeItem() {}
func (r AuthenticationMethodRule) implementsZeroTrustRule() {}
+func (r AuthenticationMethodRule) implementsZeroTrustExcludeItem() {}
+
+func (r AuthenticationMethodRule) implementsZeroTrustRequireItem() {}
+
type AuthenticationMethodRuleAuthMethod struct {
// The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176.
AuthMethod string `json:"auth_method,required"`
@@ -254,11 +262,11 @@ func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -268,11 +276,11 @@ func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam(
func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -280,35 +288,35 @@ func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam(
func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -316,13 +324,13 @@ func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam(
func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -330,29 +338,29 @@ func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam(
func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AuthenticationMethodRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AuthenticationMethodRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type AuthenticationMethodRuleAuthMethodParam struct {
// The type of authentication method https://datatracker.ietf.org/doc/html/rfc8176.
@@ -388,6 +396,10 @@ func (r AzureGroupRule) implementsZeroTrustIncludeItem() {}
func (r AzureGroupRule) implementsZeroTrustRule() {}
+func (r AzureGroupRule) implementsZeroTrustExcludeItem() {}
+
+func (r AzureGroupRule) implementsZeroTrustRequireItem() {}
+
type AzureGroupRuleAzureAd struct {
// The ID of an Azure group.
ID string `json:"id,required"`
@@ -428,11 +440,11 @@ func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -442,11 +454,11 @@ func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -454,35 +466,35 @@ func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -490,13 +502,13 @@ func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -504,29 +516,29 @@ func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r AzureGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r AzureGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type AzureGroupRuleAzureAdParam struct {
// The ID of an Azure group.
@@ -564,6 +576,10 @@ func (r CertificateRule) implementsZeroTrustIncludeItem() {}
func (r CertificateRule) implementsZeroTrustRule() {}
+func (r CertificateRule) implementsZeroTrustExcludeItem() {}
+
+func (r CertificateRule) implementsZeroTrustRequireItem() {}
+
// Matches any valid client certificate.
type CertificateRuleParam struct {
Certificate param.Field[interface{}] `json:"certificate,required"`
@@ -579,11 +595,11 @@ func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -593,11 +609,11 @@ func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -605,35 +621,35 @@ func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -641,13 +657,13 @@ func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -655,29 +671,29 @@ func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CertificateRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CertificateRuleParam) implementsZeroTrustRequireItemUnionParam() {}
// Matches a specific country
type CountryRule struct {
@@ -704,6 +720,10 @@ func (r CountryRule) implementsZeroTrustIncludeItem() {}
func (r CountryRule) implementsZeroTrustRule() {}
+func (r CountryRule) implementsZeroTrustExcludeItem() {}
+
+func (r CountryRule) implementsZeroTrustRequireItem() {}
+
type CountryRuleGeo struct {
// The country code that should be matched.
CountryCode string `json:"country_code,required"`
@@ -740,11 +760,11 @@ func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -754,11 +774,11 @@ func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -766,35 +786,35 @@ func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -802,13 +822,13 @@ func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -816,29 +836,29 @@ func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r CountryRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r CountryRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type CountryRuleGeoParam struct {
// The country code that should be matched.
@@ -875,6 +895,10 @@ func (r DevicePostureRule) implementsZeroTrustIncludeItem() {}
func (r DevicePostureRule) implementsZeroTrustRule() {}
+func (r DevicePostureRule) implementsZeroTrustExcludeItem() {}
+
+func (r DevicePostureRule) implementsZeroTrustRequireItem() {}
+
type DevicePostureRuleDevicePosture struct {
// The ID of a device posture integration.
IntegrationUid string `json:"integration_uid,required"`
@@ -912,11 +936,11 @@ func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -926,11 +950,11 @@ func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -938,35 +962,35 @@ func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -974,13 +998,13 @@ func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -988,29 +1012,29 @@ func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type DevicePostureRuleDevicePostureParam struct {
// The ID of a device posture integration.
@@ -1046,6 +1070,10 @@ func (r DomainRule) implementsZeroTrustIncludeItem() {}
func (r DomainRule) implementsZeroTrustRule() {}
+func (r DomainRule) implementsZeroTrustExcludeItem() {}
+
+func (r DomainRule) implementsZeroTrustRequireItem() {}
+
type DomainRuleEmailDomain struct {
// The email domain to match.
Domain string `json:"domain,required"`
@@ -1083,11 +1111,11 @@ func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -1097,11 +1125,11 @@ func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1109,35 +1137,35 @@ func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1145,13 +1173,13 @@ func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1159,29 +1187,29 @@ func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DomainRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DomainRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type DomainRuleEmailDomainParam struct {
// The email domain to match.
@@ -1217,6 +1245,10 @@ func (r EmailListRule) implementsZeroTrustIncludeItem() {}
func (r EmailListRule) implementsZeroTrustRule() {}
+func (r EmailListRule) implementsZeroTrustExcludeItem() {}
+
+func (r EmailListRule) implementsZeroTrustRequireItem() {}
+
type EmailListRuleEmailList struct {
// The ID of a previously created email list.
ID string `json:"id,required"`
@@ -1254,11 +1286,11 @@ func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -1268,11 +1300,11 @@ func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1280,35 +1312,35 @@ func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1316,13 +1348,13 @@ func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1330,29 +1362,29 @@ func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type EmailListRuleEmailListParam struct {
// The ID of a previously created email list.
@@ -1388,6 +1420,10 @@ func (r EmailRule) implementsZeroTrustIncludeItem() {}
func (r EmailRule) implementsZeroTrustRule() {}
+func (r EmailRule) implementsZeroTrustExcludeItem() {}
+
+func (r EmailRule) implementsZeroTrustRequireItem() {}
+
type EmailRuleEmail struct {
// The email of the user.
Email string `json:"email,required" format:"email"`
@@ -1424,11 +1460,11 @@ func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -1438,11 +1474,11 @@ func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1450,35 +1486,35 @@ func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1486,13 +1522,13 @@ func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1500,29 +1536,29 @@ func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EmailRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EmailRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type EmailRuleEmailParam struct {
// The email of the user.
@@ -1559,6 +1595,10 @@ func (r EveryoneRule) implementsZeroTrustIncludeItem() {}
func (r EveryoneRule) implementsZeroTrustRule() {}
+func (r EveryoneRule) implementsZeroTrustExcludeItem() {}
+
+func (r EveryoneRule) implementsZeroTrustRequireItem() {}
+
// Matches everyone.
type EveryoneRuleParam struct {
// An empty object which matches on all users.
@@ -1575,11 +1615,11 @@ func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -1589,11 +1629,11 @@ func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1601,35 +1641,35 @@ func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1637,13 +1677,13 @@ func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1651,29 +1691,29 @@ func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r EveryoneRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r EveryoneRuleParam) implementsZeroTrustRequireItemUnionParam() {}
// Create Allow or Block policies which evaluate the user based on custom criteria.
type ExternalEvaluationRule struct {
@@ -1701,6 +1741,10 @@ func (r ExternalEvaluationRule) implementsZeroTrustIncludeItem() {}
func (r ExternalEvaluationRule) implementsZeroTrustRule() {}
+func (r ExternalEvaluationRule) implementsZeroTrustExcludeItem() {}
+
+func (r ExternalEvaluationRule) implementsZeroTrustRequireItem() {}
+
type ExternalEvaluationRuleExternalEvaluation struct {
// The API endpoint containing your business logic.
EvaluateURL string `json:"evaluate_url,required"`
@@ -1742,11 +1786,11 @@ func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -1756,11 +1800,11 @@ func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam()
func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1768,35 +1812,35 @@ func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam()
func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1804,13 +1848,13 @@ func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam()
func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1818,29 +1862,29 @@ func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam()
func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ExternalEvaluationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ExternalEvaluationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type ExternalEvaluationRuleExternalEvaluationParam struct {
// The API endpoint containing your business logic.
@@ -1880,6 +1924,10 @@ func (r GitHubOrganizationRule) implementsZeroTrustIncludeItem() {}
func (r GitHubOrganizationRule) implementsZeroTrustRule() {}
+func (r GitHubOrganizationRule) implementsZeroTrustExcludeItem() {}
+
+func (r GitHubOrganizationRule) implementsZeroTrustRequireItem() {}
+
type GitHubOrganizationRuleGitHubOrganization struct {
// The ID of your Github identity provider.
ConnectionID string `json:"connection_id,required"`
@@ -1920,11 +1968,11 @@ func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -1934,11 +1982,11 @@ func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam()
func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1946,35 +1994,35 @@ func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam()
func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1982,13 +2030,13 @@ func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam()
func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -1996,29 +2044,29 @@ func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam()
func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GitHubOrganizationRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GitHubOrganizationRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type GitHubOrganizationRuleGitHubOrganizationParam struct {
// The ID of your Github identity provider.
@@ -2056,6 +2104,10 @@ func (r GroupRule) implementsZeroTrustIncludeItem() {}
func (r GroupRule) implementsZeroTrustRule() {}
+func (r GroupRule) implementsZeroTrustExcludeItem() {}
+
+func (r GroupRule) implementsZeroTrustRequireItem() {}
+
type GroupRuleGroup struct {
// The ID of a previously created Access group.
ID string `json:"id,required"`
@@ -2092,11 +2144,11 @@ func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -2106,11 +2158,11 @@ func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2118,35 +2170,35 @@ func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2154,13 +2206,13 @@ func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2168,29 +2220,29 @@ func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type GroupRuleGroupParam struct {
// The ID of a previously created Access group.
@@ -2227,6 +2279,10 @@ func (r GsuiteGroupRule) implementsZeroTrustIncludeItem() {}
func (r GsuiteGroupRule) implementsZeroTrustRule() {}
+func (r GsuiteGroupRule) implementsZeroTrustExcludeItem() {}
+
+func (r GsuiteGroupRule) implementsZeroTrustRequireItem() {}
+
type GsuiteGroupRuleGsuite struct {
// The ID of your Google Workspace identity provider.
ConnectionID string `json:"connection_id,required"`
@@ -2268,11 +2324,11 @@ func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -2282,11 +2338,11 @@ func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2294,35 +2350,35 @@ func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2330,13 +2386,13 @@ func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2344,29 +2400,29 @@ func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r GsuiteGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r GsuiteGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type GsuiteGroupRuleGsuiteParam struct {
// The ID of your Google Workspace identity provider.
@@ -2614,6 +2670,10 @@ func (r IPListRule) implementsZeroTrustIncludeItem() {}
func (r IPListRule) implementsZeroTrustRule() {}
+func (r IPListRule) implementsZeroTrustExcludeItem() {}
+
+func (r IPListRule) implementsZeroTrustRequireItem() {}
+
type IPListRuleIPList struct {
// The ID of a previously created IP list.
ID string `json:"id,required"`
@@ -2651,11 +2711,11 @@ func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -2665,11 +2725,11 @@ func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2677,35 +2737,35 @@ func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2713,13 +2773,13 @@ func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2727,29 +2787,29 @@ func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPListRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPListRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type IPListRuleIPListParam struct {
// The ID of a previously created IP list.
@@ -2785,6 +2845,10 @@ func (r IPRule) implementsZeroTrustIncludeItem() {}
func (r IPRule) implementsZeroTrustRule() {}
+func (r IPRule) implementsZeroTrustExcludeItem() {}
+
+func (r IPRule) implementsZeroTrustRequireItem() {}
+
type IPRuleIP struct {
// An IPv4 or IPv6 CIDR block.
IP string `json:"ip,required"`
@@ -2821,11 +2885,11 @@ func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -2835,11 +2899,11 @@ func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2847,35 +2911,35 @@ func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2883,13 +2947,13 @@ func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -2897,29 +2961,29 @@ func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r IPRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r IPRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type IPRuleIPParam struct {
// An IPv4 or IPv6 CIDR block.
@@ -2955,6 +3019,10 @@ func (r OktaGroupRule) implementsZeroTrustIncludeItem() {}
func (r OktaGroupRule) implementsZeroTrustRule() {}
+func (r OktaGroupRule) implementsZeroTrustExcludeItem() {}
+
+func (r OktaGroupRule) implementsZeroTrustRequireItem() {}
+
type OktaGroupRuleOkta struct {
// The ID of your Okta identity provider.
ConnectionID string `json:"connection_id,required"`
@@ -2995,11 +3063,11 @@ func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -3009,11 +3077,11 @@ func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -3021,35 +3089,35 @@ func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -3057,13 +3125,13 @@ func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -3071,29 +3139,29 @@ func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r OktaGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r OktaGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type OktaGroupRuleOktaParam struct {
// The ID of your Okta identity provider.
@@ -3341,6 +3409,10 @@ func (r SamlGroupRule) implementsZeroTrustIncludeItem() {}
func (r SamlGroupRule) implementsZeroTrustRule() {}
+func (r SamlGroupRule) implementsZeroTrustExcludeItem() {}
+
+func (r SamlGroupRule) implementsZeroTrustRequireItem() {}
+
type SamlGroupRuleSaml struct {
// The name of the SAML attribute.
AttributeName string `json:"attribute_name,required"`
@@ -3381,11 +3453,11 @@ func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -3395,11 +3467,11 @@ func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -3407,35 +3479,35 @@ func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -3443,13 +3515,13 @@ func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -3457,29 +3529,29 @@ func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r SamlGroupRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r SamlGroupRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type SamlGroupRuleSamlParam struct {
// The name of the SAML attribute.
@@ -3518,6 +3590,10 @@ func (r ServiceTokenRule) implementsZeroTrustIncludeItem() {}
func (r ServiceTokenRule) implementsZeroTrustRule() {}
+func (r ServiceTokenRule) implementsZeroTrustExcludeItem() {}
+
+func (r ServiceTokenRule) implementsZeroTrustRequireItem() {}
+
type ServiceTokenRuleServiceToken struct {
// The ID of a Service Token.
TokenID string `json:"token_id,required"`
@@ -3555,11 +3631,11 @@ func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -3569,11 +3645,11 @@ func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -3581,35 +3657,35 @@ func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -3617,13 +3693,13 @@ func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -3631,29 +3707,29 @@ func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r ServiceTokenRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r ServiceTokenRuleParam) implementsZeroTrustRequireItemUnionParam() {}
type ServiceTokenRuleServiceTokenParam struct {
// The ID of a Service Token.
diff --git a/zero_trust/accessapplicationpolicy.go b/zero_trust/accessapplicationpolicy.go
index 82a401cc2c8..18094a1c247 100644
--- a/zero_trust/accessapplicationpolicy.go
+++ b/zero_trust/accessapplicationpolicy.go
@@ -6,6 +6,7 @@ import (
"context"
"fmt"
"net/http"
+ "reflect"
"time"
"github.com/cloudflare/cloudflare-go/v2/internal/apijson"
@@ -14,6 +15,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/internal/requestconfig"
"github.com/cloudflare/cloudflare-go/v2/internal/shared"
"github.com/cloudflare/cloudflare-go/v2/option"
+ "github.com/tidwall/gjson"
)
// AccessApplicationPolicyService contains methods and other services that help
@@ -197,6 +199,170 @@ func (r ApprovalGroupItemParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
+// Matches a specific email.
+type ExcludeItem struct {
+ Email interface{} `json:"email,required"`
+ EmailList interface{} `json:"email_list,required"`
+ EmailDomain interface{} `json:"email_domain,required"`
+ Everyone interface{} `json:"everyone,required"`
+ IP interface{} `json:"ip,required"`
+ IPList interface{} `json:"ip_list,required"`
+ Certificate interface{} `json:"certificate,required"`
+ Group interface{} `json:"group,required"`
+ AzureAd interface{} `json:"azureAD,required"`
+ GitHubOrganization interface{} `json:"github-organization,required"`
+ Gsuite interface{} `json:"gsuite,required"`
+ Okta interface{} `json:"okta,required"`
+ Saml interface{} `json:"saml,required"`
+ ServiceToken interface{} `json:"service_token,required"`
+ AnyValidServiceToken interface{} `json:"any_valid_service_token,required"`
+ ExternalEvaluation interface{} `json:"external_evaluation,required"`
+ Geo interface{} `json:"geo,required"`
+ AuthMethod interface{} `json:"auth_method,required"`
+ DevicePosture interface{} `json:"device_posture,required"`
+ JSON excludeItemJSON `json:"-"`
+ union ExcludeItemUnion
+}
+
+// excludeItemJSON contains the JSON metadata for the struct [ExcludeItem]
+type excludeItemJSON struct {
+ Email apijson.Field
+ EmailList apijson.Field
+ EmailDomain apijson.Field
+ Everyone apijson.Field
+ IP apijson.Field
+ IPList apijson.Field
+ Certificate apijson.Field
+ Group apijson.Field
+ AzureAd apijson.Field
+ GitHubOrganization apijson.Field
+ Gsuite apijson.Field
+ Okta apijson.Field
+ Saml apijson.Field
+ ServiceToken apijson.Field
+ AnyValidServiceToken apijson.Field
+ ExternalEvaluation apijson.Field
+ Geo apijson.Field
+ AuthMethod apijson.Field
+ DevicePosture apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r excludeItemJSON) RawJSON() string {
+ return r.raw
+}
+
+func (r *ExcludeItem) UnmarshalJSON(data []byte) (err error) {
+ err = apijson.UnmarshalRoot(data, &r.union)
+ if err != nil {
+ return err
+ }
+ return apijson.Port(r.union, &r)
+}
+
+func (r ExcludeItem) AsUnion() ExcludeItemUnion {
+ return r.union
+}
+
+// Matches a specific email.
+//
+// Union satisfied by [zero_trust.EmailRule], [zero_trust.EmailListRule],
+// [zero_trust.DomainRule], [zero_trust.EveryoneRule], [zero_trust.IPRule],
+// [zero_trust.IPListRule], [zero_trust.CertificateRule], [zero_trust.GroupRule],
+// [zero_trust.AzureGroupRule], [zero_trust.GitHubOrganizationRule],
+// [zero_trust.GsuiteGroupRule], [zero_trust.OktaGroupRule],
+// [zero_trust.SamlGroupRule], [zero_trust.ServiceTokenRule],
+// [zero_trust.AnyValidServiceTokenRule], [zero_trust.ExternalEvaluationRule],
+// [zero_trust.CountryRule], [zero_trust.AuthenticationMethodRule] or
+// [zero_trust.DevicePostureRule].
+type ExcludeItemUnion interface {
+ implementsZeroTrustExcludeItem()
+}
+
+func init() {
+ apijson.RegisterUnion(
+ reflect.TypeOf((*ExcludeItemUnion)(nil)).Elem(),
+ "",
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EmailRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EmailListRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DomainRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EveryoneRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(IPRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(IPListRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(CertificateRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AzureGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GitHubOrganizationRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GsuiteGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(OktaGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(SamlGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(ServiceTokenRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AnyValidServiceTokenRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(ExternalEvaluationRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(CountryRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AuthenticationMethodRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DevicePostureRule{}),
+ },
+ )
+}
+
// Matches a specific email.
type ExcludeItemParam struct {
Email param.Field[interface{}] `json:"email,required"`
@@ -247,7 +413,7 @@ type Policy struct {
// UUID
ID string `json:"id"`
// Administrators who can approve a temporary authentication request.
- ApprovalGroups []ApprovalGroup `json:"approval_groups"`
+ ApprovalGroups []ApprovalGroupItem `json:"approval_groups"`
// Requires the user to request access from an administrator at the start of each
// session.
ApprovalRequired bool `json:"approval_required"`
@@ -256,7 +422,7 @@ type Policy struct {
Decision PolicyDecision `json:"decision"`
// Rules evaluated with a NOT logical operator. To match the policy, a user cannot
// meet any of the Exclude rules.
- Exclude []Rule `json:"exclude"`
+ Exclude []ExcludeItem `json:"exclude"`
// Rules evaluated with an OR logical operator. A user needs to meet only one of
// the Include rules.
Include []IncludeItem `json:"include"`
@@ -274,7 +440,7 @@ type Policy struct {
PurposeJustificationRequired bool `json:"purpose_justification_required"`
// Rules evaluated with an AND logical operator. To match the policy, a user must
// meet all of the Require rules.
- Require []Rule `json:"require"`
+ Require []RequireItem `json:"require"`
// 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.
@@ -332,7 +498,7 @@ func (r PolicyDecision) IsKnown() bool {
type PolicyParam struct {
// Administrators who can approve a temporary authentication request.
- ApprovalGroups param.Field[[]ApprovalGroupParam] `json:"approval_groups"`
+ ApprovalGroups param.Field[[]ApprovalGroupItemParam] `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"`
@@ -340,7 +506,7 @@ type PolicyParam struct {
Decision param.Field[PolicyDecision] `json:"decision"`
// Rules evaluated with a NOT logical operator. To match the policy, a user cannot
// meet any of the Exclude rules.
- Exclude param.Field[[]RuleUnionParam] `json:"exclude"`
+ Exclude param.Field[[]ExcludeItemUnionParam] `json:"exclude"`
// Rules evaluated with an OR logical operator. A user needs to meet only one of
// the Include rules.
Include param.Field[[]IncludeItemUnionParam] `json:"include"`
@@ -358,7 +524,7 @@ type PolicyParam struct {
PurposeJustificationRequired param.Field[bool] `json:"purpose_justification_required"`
// Rules evaluated with an AND logical operator. To match the policy, a user must
// meet all of the Require rules.
- Require param.Field[[]RuleUnionParam] `json:"require"`
+ Require param.Field[[]RequireItemUnionParam] `json:"require"`
// 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.
@@ -369,6 +535,170 @@ func (r PolicyParam) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
+// Matches a specific email.
+type RequireItem struct {
+ Email interface{} `json:"email,required"`
+ EmailList interface{} `json:"email_list,required"`
+ EmailDomain interface{} `json:"email_domain,required"`
+ Everyone interface{} `json:"everyone,required"`
+ IP interface{} `json:"ip,required"`
+ IPList interface{} `json:"ip_list,required"`
+ Certificate interface{} `json:"certificate,required"`
+ Group interface{} `json:"group,required"`
+ AzureAd interface{} `json:"azureAD,required"`
+ GitHubOrganization interface{} `json:"github-organization,required"`
+ Gsuite interface{} `json:"gsuite,required"`
+ Okta interface{} `json:"okta,required"`
+ Saml interface{} `json:"saml,required"`
+ ServiceToken interface{} `json:"service_token,required"`
+ AnyValidServiceToken interface{} `json:"any_valid_service_token,required"`
+ ExternalEvaluation interface{} `json:"external_evaluation,required"`
+ Geo interface{} `json:"geo,required"`
+ AuthMethod interface{} `json:"auth_method,required"`
+ DevicePosture interface{} `json:"device_posture,required"`
+ JSON requireItemJSON `json:"-"`
+ union RequireItemUnion
+}
+
+// requireItemJSON contains the JSON metadata for the struct [RequireItem]
+type requireItemJSON struct {
+ Email apijson.Field
+ EmailList apijson.Field
+ EmailDomain apijson.Field
+ Everyone apijson.Field
+ IP apijson.Field
+ IPList apijson.Field
+ Certificate apijson.Field
+ Group apijson.Field
+ AzureAd apijson.Field
+ GitHubOrganization apijson.Field
+ Gsuite apijson.Field
+ Okta apijson.Field
+ Saml apijson.Field
+ ServiceToken apijson.Field
+ AnyValidServiceToken apijson.Field
+ ExternalEvaluation apijson.Field
+ Geo apijson.Field
+ AuthMethod apijson.Field
+ DevicePosture apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r requireItemJSON) RawJSON() string {
+ return r.raw
+}
+
+func (r *RequireItem) UnmarshalJSON(data []byte) (err error) {
+ err = apijson.UnmarshalRoot(data, &r.union)
+ if err != nil {
+ return err
+ }
+ return apijson.Port(r.union, &r)
+}
+
+func (r RequireItem) AsUnion() RequireItemUnion {
+ return r.union
+}
+
+// Matches a specific email.
+//
+// Union satisfied by [zero_trust.EmailRule], [zero_trust.EmailListRule],
+// [zero_trust.DomainRule], [zero_trust.EveryoneRule], [zero_trust.IPRule],
+// [zero_trust.IPListRule], [zero_trust.CertificateRule], [zero_trust.GroupRule],
+// [zero_trust.AzureGroupRule], [zero_trust.GitHubOrganizationRule],
+// [zero_trust.GsuiteGroupRule], [zero_trust.OktaGroupRule],
+// [zero_trust.SamlGroupRule], [zero_trust.ServiceTokenRule],
+// [zero_trust.AnyValidServiceTokenRule], [zero_trust.ExternalEvaluationRule],
+// [zero_trust.CountryRule], [zero_trust.AuthenticationMethodRule] or
+// [zero_trust.DevicePostureRule].
+type RequireItemUnion interface {
+ implementsZeroTrustRequireItem()
+}
+
+func init() {
+ apijson.RegisterUnion(
+ reflect.TypeOf((*RequireItemUnion)(nil)).Elem(),
+ "",
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EmailRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EmailListRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DomainRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EveryoneRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(IPRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(IPListRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(CertificateRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AzureGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GitHubOrganizationRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GsuiteGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(OktaGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(SamlGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(ServiceTokenRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AnyValidServiceTokenRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(ExternalEvaluationRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(CountryRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AuthenticationMethodRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DevicePostureRule{}),
+ },
+ )
+}
+
// Matches a specific email.
type RequireItemParam struct {
Email param.Field[interface{}] `json:"email,required"`
diff --git a/zero_trust/accesscertificate.go b/zero_trust/accesscertificate.go
index 9395145fb3d..d3ba80c378e 100644
--- a/zero_trust/accesscertificate.go
+++ b/zero_trust/accesscertificate.go
@@ -164,9 +164,9 @@ type Certificate struct {
// The ID of the application that will use this certificate.
ID string `json:"id"`
// The hostnames of the applications that will use this certificate.
- AssociatedHostnames []string `json:"associated_hostnames"`
- CreatedAt time.Time `json:"created_at" format:"date-time"`
- ExpiresOn time.Time `json:"expires_on" format:"date-time"`
+ AssociatedHostnames []AssociatedHostnamesItem `json:"associated_hostnames"`
+ CreatedAt time.Time `json:"created_at" format:"date-time"`
+ ExpiresOn time.Time `json:"expires_on" format:"date-time"`
// The MD5 fingerprint of the certificate.
Fingerprint string `json:"fingerprint"`
// The name of the certificate.
diff --git a/zero_trust/accessgroup.go b/zero_trust/accessgroup.go
index 9b10248b589..2d0264b0c1a 100644
--- a/zero_trust/accessgroup.go
+++ b/zero_trust/accessgroup.go
@@ -6,6 +6,7 @@ import (
"context"
"fmt"
"net/http"
+ "reflect"
"time"
"github.com/cloudflare/cloudflare-go/v2/internal/apijson"
@@ -14,6 +15,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/internal/requestconfig"
"github.com/cloudflare/cloudflare-go/v2/internal/shared"
"github.com/cloudflare/cloudflare-go/v2/option"
+ "github.com/tidwall/gjson"
)
// AccessGroupService contains methods and other services that help with
@@ -154,6 +156,170 @@ func (r *AccessGroupService) Get(ctx context.Context, uuid string, query AccessG
return
}
+// Matches a specific email.
+type ExcludeItem struct {
+ Email interface{} `json:"email,required"`
+ EmailList interface{} `json:"email_list,required"`
+ EmailDomain interface{} `json:"email_domain,required"`
+ Everyone interface{} `json:"everyone,required"`
+ IP interface{} `json:"ip,required"`
+ IPList interface{} `json:"ip_list,required"`
+ Certificate interface{} `json:"certificate,required"`
+ Group interface{} `json:"group,required"`
+ AzureAd interface{} `json:"azureAD,required"`
+ GitHubOrganization interface{} `json:"github-organization,required"`
+ Gsuite interface{} `json:"gsuite,required"`
+ Okta interface{} `json:"okta,required"`
+ Saml interface{} `json:"saml,required"`
+ ServiceToken interface{} `json:"service_token,required"`
+ AnyValidServiceToken interface{} `json:"any_valid_service_token,required"`
+ ExternalEvaluation interface{} `json:"external_evaluation,required"`
+ Geo interface{} `json:"geo,required"`
+ AuthMethod interface{} `json:"auth_method,required"`
+ DevicePosture interface{} `json:"device_posture,required"`
+ JSON excludeItemJSON `json:"-"`
+ union ExcludeItemUnion
+}
+
+// excludeItemJSON contains the JSON metadata for the struct [ExcludeItem]
+type excludeItemJSON struct {
+ Email apijson.Field
+ EmailList apijson.Field
+ EmailDomain apijson.Field
+ Everyone apijson.Field
+ IP apijson.Field
+ IPList apijson.Field
+ Certificate apijson.Field
+ Group apijson.Field
+ AzureAd apijson.Field
+ GitHubOrganization apijson.Field
+ Gsuite apijson.Field
+ Okta apijson.Field
+ Saml apijson.Field
+ ServiceToken apijson.Field
+ AnyValidServiceToken apijson.Field
+ ExternalEvaluation apijson.Field
+ Geo apijson.Field
+ AuthMethod apijson.Field
+ DevicePosture apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r excludeItemJSON) RawJSON() string {
+ return r.raw
+}
+
+func (r *ExcludeItem) UnmarshalJSON(data []byte) (err error) {
+ err = apijson.UnmarshalRoot(data, &r.union)
+ if err != nil {
+ return err
+ }
+ return apijson.Port(r.union, &r)
+}
+
+func (r ExcludeItem) AsUnion() ExcludeItemUnion {
+ return r.union
+}
+
+// Matches a specific email.
+//
+// Union satisfied by [zero_trust.EmailRule], [zero_trust.EmailListRule],
+// [zero_trust.DomainRule], [zero_trust.EveryoneRule], [zero_trust.IPRule],
+// [zero_trust.IPListRule], [zero_trust.CertificateRule], [zero_trust.GroupRule],
+// [zero_trust.AzureGroupRule], [zero_trust.GitHubOrganizationRule],
+// [zero_trust.GsuiteGroupRule], [zero_trust.OktaGroupRule],
+// [zero_trust.SamlGroupRule], [zero_trust.ServiceTokenRule],
+// [zero_trust.AnyValidServiceTokenRule], [zero_trust.ExternalEvaluationRule],
+// [zero_trust.CountryRule], [zero_trust.AuthenticationMethodRule] or
+// [zero_trust.DevicePostureRule].
+type ExcludeItemUnion interface {
+ implementsZeroTrustExcludeItem()
+}
+
+func init() {
+ apijson.RegisterUnion(
+ reflect.TypeOf((*ExcludeItemUnion)(nil)).Elem(),
+ "",
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EmailRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EmailListRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DomainRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EveryoneRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(IPRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(IPListRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(CertificateRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AzureGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GitHubOrganizationRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GsuiteGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(OktaGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(SamlGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(ServiceTokenRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AnyValidServiceTokenRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(ExternalEvaluationRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(CountryRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AuthenticationMethodRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DevicePostureRule{}),
+ },
+ )
+}
+
// Matches a specific email.
type ExcludeItemParam struct {
Email param.Field[interface{}] `json:"email,required"`
@@ -200,6 +366,170 @@ type ExcludeItemUnionParam interface {
implementsZeroTrustExcludeItemUnionParam()
}
+// Matches a specific email.
+type RequireItem struct {
+ Email interface{} `json:"email,required"`
+ EmailList interface{} `json:"email_list,required"`
+ EmailDomain interface{} `json:"email_domain,required"`
+ Everyone interface{} `json:"everyone,required"`
+ IP interface{} `json:"ip,required"`
+ IPList interface{} `json:"ip_list,required"`
+ Certificate interface{} `json:"certificate,required"`
+ Group interface{} `json:"group,required"`
+ AzureAd interface{} `json:"azureAD,required"`
+ GitHubOrganization interface{} `json:"github-organization,required"`
+ Gsuite interface{} `json:"gsuite,required"`
+ Okta interface{} `json:"okta,required"`
+ Saml interface{} `json:"saml,required"`
+ ServiceToken interface{} `json:"service_token,required"`
+ AnyValidServiceToken interface{} `json:"any_valid_service_token,required"`
+ ExternalEvaluation interface{} `json:"external_evaluation,required"`
+ Geo interface{} `json:"geo,required"`
+ AuthMethod interface{} `json:"auth_method,required"`
+ DevicePosture interface{} `json:"device_posture,required"`
+ JSON requireItemJSON `json:"-"`
+ union RequireItemUnion
+}
+
+// requireItemJSON contains the JSON metadata for the struct [RequireItem]
+type requireItemJSON struct {
+ Email apijson.Field
+ EmailList apijson.Field
+ EmailDomain apijson.Field
+ Everyone apijson.Field
+ IP apijson.Field
+ IPList apijson.Field
+ Certificate apijson.Field
+ Group apijson.Field
+ AzureAd apijson.Field
+ GitHubOrganization apijson.Field
+ Gsuite apijson.Field
+ Okta apijson.Field
+ Saml apijson.Field
+ ServiceToken apijson.Field
+ AnyValidServiceToken apijson.Field
+ ExternalEvaluation apijson.Field
+ Geo apijson.Field
+ AuthMethod apijson.Field
+ DevicePosture apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r requireItemJSON) RawJSON() string {
+ return r.raw
+}
+
+func (r *RequireItem) UnmarshalJSON(data []byte) (err error) {
+ err = apijson.UnmarshalRoot(data, &r.union)
+ if err != nil {
+ return err
+ }
+ return apijson.Port(r.union, &r)
+}
+
+func (r RequireItem) AsUnion() RequireItemUnion {
+ return r.union
+}
+
+// Matches a specific email.
+//
+// Union satisfied by [zero_trust.EmailRule], [zero_trust.EmailListRule],
+// [zero_trust.DomainRule], [zero_trust.EveryoneRule], [zero_trust.IPRule],
+// [zero_trust.IPListRule], [zero_trust.CertificateRule], [zero_trust.GroupRule],
+// [zero_trust.AzureGroupRule], [zero_trust.GitHubOrganizationRule],
+// [zero_trust.GsuiteGroupRule], [zero_trust.OktaGroupRule],
+// [zero_trust.SamlGroupRule], [zero_trust.ServiceTokenRule],
+// [zero_trust.AnyValidServiceTokenRule], [zero_trust.ExternalEvaluationRule],
+// [zero_trust.CountryRule], [zero_trust.AuthenticationMethodRule] or
+// [zero_trust.DevicePostureRule].
+type RequireItemUnion interface {
+ implementsZeroTrustRequireItem()
+}
+
+func init() {
+ apijson.RegisterUnion(
+ reflect.TypeOf((*RequireItemUnion)(nil)).Elem(),
+ "",
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EmailRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EmailListRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DomainRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(EveryoneRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(IPRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(IPListRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(CertificateRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AzureGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GitHubOrganizationRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(GsuiteGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(OktaGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(SamlGroupRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(ServiceTokenRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AnyValidServiceTokenRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(ExternalEvaluationRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(CountryRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(AuthenticationMethodRule{}),
+ },
+ apijson.UnionVariant{
+ TypeFilter: gjson.JSON,
+ Type: reflect.TypeOf(DevicePostureRule{}),
+ },
+ )
+}
+
// Matches a specific email.
type RequireItemParam struct {
Email param.Field[interface{}] `json:"email,required"`
@@ -252,18 +582,18 @@ type ZeroTrustGroup struct {
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Rules evaluated with a NOT logical operator. To match a policy, a user cannot
// meet any of the Exclude rules.
- Exclude []Rule `json:"exclude"`
+ Exclude []ExcludeItem `json:"exclude"`
// Rules evaluated with an OR logical operator. A user needs to meet only one of
// the Include rules.
- Include []Rule `json:"include"`
+ Include []IncludeItem `json:"include"`
// Rules evaluated with an AND logical operator. To match a policy, a user must
// meet all of the Require rules.
- IsDefault []Rule `json:"is_default"`
+ IsDefault []RequireItem `json:"is_default"`
// The name of the Access group.
Name string `json:"name"`
// Rules evaluated with an AND logical operator. To match a policy, a user must
// meet all of the Require rules.
- Require []Rule `json:"require"`
+ Require []RequireItem `json:"require"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON zeroTrustGroupJSON `json:"-"`
}
diff --git a/zero_trust/deviceposture.go b/zero_trust/deviceposture.go
index 87b361cca8e..759cae2da92 100644
--- a/zero_trust/deviceposture.go
+++ b/zero_trust/deviceposture.go
@@ -161,6 +161,10 @@ func (r DevicePostureRule) implementsZeroTrustIncludeItem() {}
func (r DevicePostureRule) implementsZeroTrustRule() {}
+func (r DevicePostureRule) implementsZeroTrustExcludeItem() {}
+
+func (r DevicePostureRule) implementsZeroTrustRequireItem() {}
+
// The type of device posture rule.
type DevicePostureRuleType string
@@ -225,11 +229,11 @@ func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
@@ -239,11 +243,11 @@ func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -251,35 +255,35 @@ func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -287,13 +291,13 @@ func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
@@ -301,29 +305,29 @@ func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustExcludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustIncludeItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
-func (r DevicePostureRuleParam) implementsZeroTrustRuleUnionParam() {}
+func (r DevicePostureRuleParam) implementsZeroTrustRequireItemUnionParam() {}
// The value to be checked against.
type Input struct {
diff --git a/zero_trust/gatewaylist.go b/zero_trust/gatewaylist.go
index 2735293b308..58e2a9882c1 100644
--- a/zero_trust/gatewaylist.go
+++ b/zero_trust/gatewaylist.go
@@ -246,7 +246,7 @@ type GatewayListNewParams struct {
// The description of the list.
Description param.Field[string] `json:"description"`
// The items in the list.
- Items param.Field[[]GatewayListNewParamsItem] `json:"items"`
+ Items param.Field[[]ListsItemParam] `json:"items"`
}
func (r GatewayListNewParams) MarshalJSON() (data []byte, err error) {
@@ -272,15 +272,6 @@ func (r GatewayListNewParamsType) IsKnown() bool {
return false
}
-type GatewayListNewParamsItem struct {
- // The value of the item in a list.
- Value param.Field[string] `json:"value"`
-}
-
-func (r GatewayListNewParamsItem) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
type GatewayListNewResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
@@ -438,7 +429,7 @@ func (r GatewayListDeleteResponseEnvelopeSuccess) IsKnown() bool {
type GatewayListEditParams struct {
AccountID param.Field[string] `path:"account_id,required"`
// The items in the list.
- Append param.Field[[]GatewayListEditParamsAppend] `json:"append"`
+ Append param.Field[[]ListsItemParam] `json:"append"`
// A list of the item values you want to remove.
Remove param.Field[[]string] `json:"remove"`
}
@@ -447,15 +438,6 @@ func (r GatewayListEditParams) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}
-type GatewayListEditParamsAppend struct {
- // The value of the item in a list.
- Value param.Field[string] `json:"value"`
-}
-
-func (r GatewayListEditParamsAppend) MarshalJSON() (data []byte, err error) {
- return apijson.MarshalRoot(r)
-}
-
type GatewayListEditResponseEnvelope struct {
Errors []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"errors,required"`
Messages []shared.UnnamedSchemaRef3248f24329456e19dfa042fff9986f72 `json:"messages,required"`
diff --git a/zero_trust/gatewaylist_test.go b/zero_trust/gatewaylist_test.go
index edfee94c3ab..ba5c8983206 100644
--- a/zero_trust/gatewaylist_test.go
+++ b/zero_trust/gatewaylist_test.go
@@ -33,7 +33,7 @@ func TestGatewayListNewWithOptionalParams(t *testing.T) {
Name: cloudflare.F("Admin Serial Numbers"),
Type: cloudflare.F(zero_trust.GatewayListNewParamsTypeSerial),
Description: cloudflare.F("The serial numbers for administrators"),
- Items: cloudflare.F([]zero_trust.GatewayListNewParamsItem{{
+ Items: cloudflare.F([]zero_trust.ListsItemParam{{
Value: cloudflare.F("8GE8721REF"),
}, {
Value: cloudflare.F("8GE8721REF"),
@@ -158,7 +158,7 @@ func TestGatewayListEditWithOptionalParams(t *testing.T) {
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
zero_trust.GatewayListEditParams{
AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"),
- Append: cloudflare.F([]zero_trust.GatewayListEditParamsAppend{{
+ Append: cloudflare.F([]zero_trust.ListsItemParam{{
Value: cloudflare.F("8GE8721REF"),
}, {
Value: cloudflare.F("8GE8721REF"),
diff --git a/zero_trust/gatewaylistitem.go b/zero_trust/gatewaylistitem.go
index 8d2d4c77bb5..e893e667e76 100644
--- a/zero_trust/gatewaylistitem.go
+++ b/zero_trust/gatewaylistitem.go
@@ -79,6 +79,15 @@ func (r listsItemJSON) RawJSON() string {
return r.raw
}
+type ListsItemParam struct {
+ // The value of the item in a list.
+ Value param.Field[string] `json:"value"`
+}
+
+func (r ListsItemParam) MarshalJSON() (data []byte, err error) {
+ return apijson.MarshalRoot(r)
+}
+
type GatewayListItemListParams struct {
AccountID param.Field[string] `path:"account_id,required"`
}
diff --git a/zero_trust/gatewaylocation.go b/zero_trust/gatewaylocation.go
index 1b0f85a1a10..558c770649e 100644
--- a/zero_trust/gatewaylocation.go
+++ b/zero_trust/gatewaylocation.go
@@ -126,9 +126,9 @@ type Location struct {
// The name of the location.
Name string `json:"name"`
// A list of network ranges that requests from this location would originate from.
- Networks []Network `json:"networks"`
- UpdatedAt time.Time `json:"updated_at" format:"date-time"`
- JSON locationJSON `json:"-"`
+ Networks []NetworkItem `json:"networks"`
+ UpdatedAt time.Time `json:"updated_at" format:"date-time"`
+ JSON locationJSON `json:"-"`
}
// locationJSON contains the JSON metadata for the struct [Location]
@@ -175,6 +175,27 @@ func (r networkJSON) RawJSON() string {
return r.raw
}
+type NetworkItem struct {
+ // The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.
+ Network string `json:"network,required"`
+ JSON networkItemJSON `json:"-"`
+}
+
+// networkItemJSON contains the JSON metadata for the struct [NetworkItem]
+type networkItemJSON struct {
+ Network apijson.Field
+ raw string
+ ExtraFields map[string]apijson.Field
+}
+
+func (r *NetworkItem) UnmarshalJSON(data []byte) (err error) {
+ return apijson.UnmarshalRoot(data, r)
+}
+
+func (r networkItemJSON) RawJSON() string {
+ return r.raw
+}
+
type NetworkItemParam struct {
// The IPv4 address or IPv4 CIDR. IPv4 CIDRs are limited to a maximum of /24.
Network param.Field[string] `json:"network,required"`
diff --git a/zero_trust/gatewayproxyendpoint.go b/zero_trust/gatewayproxyendpoint.go
index b983086d469..b6d86b339d2 100644
--- a/zero_trust/gatewayproxyendpoint.go
+++ b/zero_trust/gatewayproxyendpoint.go
@@ -117,7 +117,7 @@ type ProxyEndpoint struct {
ID string `json:"id"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
// A list of CIDRs to restrict ingress connections.
- IPs []string `json:"ips"`
+ IPs []GatewayIPsItem `json:"ips"`
// The name of the proxy endpoint.
Name string `json:"name"`
// The subdomain to be used as the destination in the proxy client.
diff --git a/zero_trust/gatewayrule.go b/zero_trust/gatewayrule.go
index 903ca5073b5..4d9bae7d1c7 100644
--- a/zero_trust/gatewayrule.go
+++ b/zero_trust/gatewayrule.go
@@ -244,7 +244,7 @@ type Rule struct {
Enabled bool `json:"enabled"`
// The protocol or layer to evaluate the traffic, identity, and device posture
// expressions.
- Filters []RuleFilter `json:"filters"`
+ Filters []FilterItem `json:"filters"`
// The wirefilter expression used for identity matching.
Identity string `json:"identity"`
// The name of the rule.
@@ -323,24 +323,6 @@ func (r RuleAction) IsKnown() bool {
return false
}
-// The protocol or layer to use.
-type RuleFilter string
-
-const (
- RuleFilterHTTP RuleFilter = "http"
- RuleFilterDNS RuleFilter = "dns"
- RuleFilterL4 RuleFilter = "l4"
- RuleFilterEgress RuleFilter = "egress"
-)
-
-func (r RuleFilter) IsKnown() bool {
- switch r {
- case RuleFilterHTTP, RuleFilterDNS, RuleFilterL4, RuleFilterEgress:
- return true
- }
- return false
-}
-
type RuleParam struct {
// The API resource UUID.
ID param.Field[string] `json:"id"`
@@ -355,7 +337,7 @@ type RuleParam struct {
Enabled param.Field[bool] `json:"enabled"`
// The protocol or layer to evaluate the traffic, identity, and device posture
// expressions.
- Filters param.Field[[]RuleFilter] `json:"filters"`
+ Filters param.Field[[]FilterItem] `json:"filters"`
// The wirefilter expression used for identity matching.
Identity param.Field[string] `json:"identity"`
// The name of the rule.
diff --git a/zones/subscription.go b/zones/subscription.go
index 82781a5fa83..2a7adc4d0ea 100644
--- a/zones/subscription.go
+++ b/zones/subscription.go
@@ -6,7 +6,6 @@ import (
"context"
"fmt"
"net/http"
- "time"
"github.com/cloudflare/cloudflare-go/v2/internal/apijson"
"github.com/cloudflare/cloudflare-go/v2/internal/pagination"
@@ -14,6 +13,7 @@ import (
"github.com/cloudflare/cloudflare-go/v2/internal/requestconfig"
"github.com/cloudflare/cloudflare-go/v2/internal/shared"
"github.com/cloudflare/cloudflare-go/v2/option"
+ "github.com/cloudflare/cloudflare-go/v2/user"
)
// SubscriptionService contains methods and other services that help with
@@ -48,7 +48,7 @@ func (r *SubscriptionService) New(ctx context.Context, identifier string, body S
}
// Lists all of an account's subscriptions.
-func (r *SubscriptionService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[SubscriptionListResponse], err error) {
+func (r *SubscriptionService) List(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) (res *pagination.SinglePage[user.Subscription], err error) {
var raw *http.Response
opts = append(r.Options, opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
@@ -66,7 +66,7 @@ func (r *SubscriptionService) List(ctx context.Context, accountIdentifier string
}
// Lists all of an account's subscriptions.
-func (r *SubscriptionService) ListAutoPaging(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[SubscriptionListResponse] {
+func (r *SubscriptionService) ListAutoPaging(ctx context.Context, accountIdentifier string, opts ...option.RequestOption) *pagination.SinglePageAutoPager[user.Subscription] {
return pagination.NewSinglePageAutoPager(r.List(ctx, accountIdentifier, opts...))
}
@@ -83,218 +83,6 @@ func (r *SubscriptionService) Get(ctx context.Context, identifier string, opts .
return
}
-type SubscriptionListResponse struct {
- // Subscription identifier tag.
- ID string `json:"id"`
- App SubscriptionListResponseApp `json:"app"`
- // The list of add-ons subscribed to.
- ComponentValues []SubscriptionListResponseComponentValue `json:"component_values"`
- // The monetary unit in which pricing information is displayed.
- Currency string `json:"currency"`
- // The end of the current period and also when the next billing is due.
- CurrentPeriodEnd time.Time `json:"current_period_end" format:"date-time"`
- // When the current billing period started. May match initial_period_start if this
- // is the first period.
- CurrentPeriodStart time.Time `json:"current_period_start" format:"date-time"`
- // How often the subscription is renewed automatically.
- Frequency SubscriptionListResponseFrequency `json:"frequency"`
- // The price of the subscription that will be billed, in US dollars.
- Price float64 `json:"price"`
- // The rate plan applied to the subscription.
- RatePlan SubscriptionListResponseRatePlan `json:"rate_plan"`
- // The state that the subscription is in.
- State SubscriptionListResponseState `json:"state"`
- // A simple zone object. May have null properties if not a zone subscription.
- Zone SubscriptionListResponseZone `json:"zone"`
- JSON subscriptionListResponseJSON `json:"-"`
-}
-
-// subscriptionListResponseJSON contains the JSON metadata for the struct
-// [SubscriptionListResponse]
-type subscriptionListResponseJSON struct {
- ID apijson.Field
- App apijson.Field
- ComponentValues apijson.Field
- Currency apijson.Field
- CurrentPeriodEnd apijson.Field
- CurrentPeriodStart apijson.Field
- Frequency apijson.Field
- Price apijson.Field
- RatePlan apijson.Field
- State apijson.Field
- Zone apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponse) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseJSON) RawJSON() string {
- return r.raw
-}
-
-type SubscriptionListResponseApp struct {
- // app install id.
- InstallID string `json:"install_id"`
- JSON subscriptionListResponseAppJSON `json:"-"`
-}
-
-// subscriptionListResponseAppJSON contains the JSON metadata for the struct
-// [SubscriptionListResponseApp]
-type subscriptionListResponseAppJSON struct {
- InstallID apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponseApp) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseAppJSON) RawJSON() string {
- return r.raw
-}
-
-// A component value for a subscription.
-type SubscriptionListResponseComponentValue struct {
- // The default amount assigned.
- Default float64 `json:"default"`
- // The name of the component value.
- Name string `json:"name"`
- // The unit price for the component value.
- Price float64 `json:"price"`
- // The amount of the component value assigned.
- Value float64 `json:"value"`
- JSON subscriptionListResponseComponentValueJSON `json:"-"`
-}
-
-// subscriptionListResponseComponentValueJSON contains the JSON metadata for the
-// struct [SubscriptionListResponseComponentValue]
-type subscriptionListResponseComponentValueJSON struct {
- Default apijson.Field
- Name apijson.Field
- Price apijson.Field
- Value apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponseComponentValue) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseComponentValueJSON) RawJSON() string {
- return r.raw
-}
-
-// How often the subscription is renewed automatically.
-type SubscriptionListResponseFrequency string
-
-const (
- SubscriptionListResponseFrequencyWeekly SubscriptionListResponseFrequency = "weekly"
- SubscriptionListResponseFrequencyMonthly SubscriptionListResponseFrequency = "monthly"
- SubscriptionListResponseFrequencyQuarterly SubscriptionListResponseFrequency = "quarterly"
- SubscriptionListResponseFrequencyYearly SubscriptionListResponseFrequency = "yearly"
-)
-
-func (r SubscriptionListResponseFrequency) IsKnown() bool {
- switch r {
- case SubscriptionListResponseFrequencyWeekly, SubscriptionListResponseFrequencyMonthly, SubscriptionListResponseFrequencyQuarterly, SubscriptionListResponseFrequencyYearly:
- return true
- }
- return false
-}
-
-// The rate plan applied to the subscription.
-type SubscriptionListResponseRatePlan struct {
- // The ID of the rate plan.
- ID string `json:"id"`
- // The currency applied to the rate plan subscription.
- Currency string `json:"currency"`
- // Whether this rate plan is managed externally from Cloudflare.
- ExternallyManaged bool `json:"externally_managed"`
- // Whether a rate plan is enterprise-based (or newly adopted term contract).
- IsContract bool `json:"is_contract"`
- // The full name of the rate plan.
- PublicName string `json:"public_name"`
- // The scope that this rate plan applies to.
- Scope string `json:"scope"`
- // The list of sets this rate plan applies to.
- Sets []string `json:"sets"`
- JSON subscriptionListResponseRatePlanJSON `json:"-"`
-}
-
-// subscriptionListResponseRatePlanJSON contains the JSON metadata for the struct
-// [SubscriptionListResponseRatePlan]
-type subscriptionListResponseRatePlanJSON struct {
- ID apijson.Field
- Currency apijson.Field
- ExternallyManaged apijson.Field
- IsContract apijson.Field
- PublicName apijson.Field
- Scope apijson.Field
- Sets apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponseRatePlan) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseRatePlanJSON) RawJSON() string {
- return r.raw
-}
-
-// The state that the subscription is in.
-type SubscriptionListResponseState string
-
-const (
- SubscriptionListResponseStateTrial SubscriptionListResponseState = "Trial"
- SubscriptionListResponseStateProvisioned SubscriptionListResponseState = "Provisioned"
- SubscriptionListResponseStatePaid SubscriptionListResponseState = "Paid"
- SubscriptionListResponseStateAwaitingPayment SubscriptionListResponseState = "AwaitingPayment"
- SubscriptionListResponseStateCancelled SubscriptionListResponseState = "Cancelled"
- SubscriptionListResponseStateFailed SubscriptionListResponseState = "Failed"
- SubscriptionListResponseStateExpired SubscriptionListResponseState = "Expired"
-)
-
-func (r SubscriptionListResponseState) IsKnown() bool {
- switch r {
- case SubscriptionListResponseStateTrial, SubscriptionListResponseStateProvisioned, SubscriptionListResponseStatePaid, SubscriptionListResponseStateAwaitingPayment, SubscriptionListResponseStateCancelled, SubscriptionListResponseStateFailed, SubscriptionListResponseStateExpired:
- return true
- }
- return false
-}
-
-// A simple zone object. May have null properties if not a zone subscription.
-type SubscriptionListResponseZone struct {
- // Identifier
- ID string `json:"id"`
- // The domain name
- Name string `json:"name"`
- JSON subscriptionListResponseZoneJSON `json:"-"`
-}
-
-// subscriptionListResponseZoneJSON contains the JSON metadata for the struct
-// [SubscriptionListResponseZone]
-type subscriptionListResponseZoneJSON struct {
- ID apijson.Field
- Name apijson.Field
- raw string
- ExtraFields map[string]apijson.Field
-}
-
-func (r *SubscriptionListResponseZone) UnmarshalJSON(data []byte) (err error) {
- return apijson.UnmarshalRoot(data, r)
-}
-
-func (r subscriptionListResponseZoneJSON) RawJSON() string {
- return r.raw
-}
-
type SubscriptionNewParams struct {
App param.Field[SubscriptionNewParamsApp] `json:"app"`
// The list of add-ons subscribed to.